public override void draw(SpriteBatch spriteBatch) { if (eating == true) { Moose.drawCentered(spriteBatch, m_scale, m_rotation, m_position, SpriteEffects.None); } else if (Die == false) { MooseWalk.drawCentered(spriteBatch, m_scale, m_rotation, m_position, SpriteEffects.None); } else if (Die == true) { MooseDie.drawCentered(spriteBatch, m_scale, m_rotation, m_position, SpriteEffects.None); } }
public override void update(GameTime gameTime) { if (target == false) { Search(gameTime); } else if (target == true) { Hunt(gameTime); } if (eating == true) { Moose.update(gameTime); } else if (Die == false) { MooseWalk.update(gameTime); } if (Moose.finished()) { target = false; theObj.toBeDeleted = true; eating = false; Moose.reset(); } //hacked timer timeLived += (float)gameTime.ElapsedGameTime.TotalSeconds; if (timeLived > 50f) { Die = true; MooseDie.update(gameTime); if (MooseDie.finished()) { this.toBeDeleted = true; } } }