public EntityWorld() { _systemManager = new SystemManager(this); _entityManager = new EntityManager(this); _tagManager = new TagManager(this); _gameTime = new AmphibianGameTime(); }
public override void Update(AmphibianGameTime gameTime) { _anims[(int)_currentDirection].Update(gameTime); }
public virtual void Update(AmphibianGameTime gameTime) { }
public override void Update(AmphibianGameTime gameTime) { if (_animData.RefClock != null) { if (_animData.RefClock.Triggered) { if (_animData.Delay == 0) AdvanceFrame(); else { _animData.Delay--; if (_animData.Delay == 0) Start(); } } } else if (IsAnimating) { _animData.TimeAccum += (float)gameTime.ElapsedGameTime.TotalSeconds; if (_animData.TimeAccum > _definition.Frames[_animData.CurrentFrameIndex].Duration) { _animData.TimeAccum -= _definition.Frames[_animData.CurrentFrameIndex].Duration; AdvanceFrame(); } } }
public override void Update(AmphibianGameTime time) { float elapsed = time.ElapsedGameTime.Milliseconds / 1000f; if (CanEmit) SpawnParticles(elapsed); StageUpdate(); UpdateParticleLifetime(elapsed); UpdateParticlePosition(elapsed); UpdateParticleSpin(elapsed); UpdateParticleColor(); ExpireParticles(); ExpireEmitter(); }