Open cchandel opened 2 years ago
func (f *FakeSystem) Update(e ecs.Event) {
f.elapse += e.Delta
if f.elapse < time.Second * 5 {
return
} else {
f.elapse = 0
}
//TODO something you want to do
}
Thanks.
Hi, Is there a way I can use different updates rates for systems ?
For eg, the movement system might need updating every 33 ms, but say the inventory system might only need to be updated on an event like the player firing a gun. Another system - say fuel system - might need updating only every 5 secs.
How do I achieve this?
Thanks