Comments (2)
Yes, tick sources are supported. You can use the timer struct to set your tick source's properties and pass it into a RoutineBuilder
using TickSource
. In the next release, I'll add an overload to TickSource
that takes a timer argument instead of an entity.
using System;
using Flecs.NET.Core;
using World world = World.Create();
// Run the system roughly every second.
Timer tickSource = world.Timer().Interval(1);
Routine routine = world.Routine(
routine: world.RoutineBuilder().TickSource(tickSource.Entity),
callback: (Iter it) => Console.WriteLine("1 second has passed")
);
world.App().Run();
from flecs.net.
Thank you!
This would be a welcome addition to the docs, too.
from flecs.net.
Related Issues (16)
- Avoid heap allocation with native strings whenever possible
- Modify examples to use new source-generated Iter/Each callbacks. HOT 1
- Make the high-level wrapper usable in reflection-free mode HOT 1
- Add NativeAOT examples and tests
- Unity Editor crashes when initializing world with Monitor and Metrics modules HOT 2
- Ambiguous definitions of Routine. HOT 2
- Use C# arrays as pluggable storage for managed types
- FromJson and ToJson don't seem to work correctly HOT 3
- [v4] Replace usage of ecs_world_t* with World in public apis
- [v4] Implement component id lookup support for System.Type HOT 4
- [v4] Ensure all callback methods have overloads that take managed function pointers instead of delegates
- Add support for Id Indicies HOT 1
- Docs update: rename `EcsOnUpdate` to `Ecs.OnUpdate` HOT 1
- How to register a system that doesn't query for any components? HOT 7
- Compile support for iOS & Android HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flecs.net.