public virtual void Update(GameTime gameTime) { latestGameTime = gameTime; if (!active) { return; } if (texture != null) { texture.Update(gameTime, this); } hitbox.Update(this); }
public void setTexture(AnimatedTexture tex) { if (texture != null) { foreach (Hitbox hitbox in texture.onFrameHitboxes) { if (hitbox != null) { hitbox.active = false; } } } texture = tex; texture.Update(null, this); if (texture.onStart != null) { texture.onStart(); } }
public void setTexture(AnimatedTexture tex) { if (texture != null) foreach (Hitbox hitbox in texture.onFrameHitboxes) if (hitbox != null) { hitbox.active = false; } texture = tex; texture.Update(null, this); if (texture.onStart != null) texture.onStart(); }