Example #1
0
 public void Update(GameTime gameTime)
 {
     if (deadTime.Update(gameTime)) //if deadTimer has ended
     {
         deadTime.Stop();           //stop the invulnerability timer
     }
     showDead.Update(gameTime);     //toggle the showdead timer repeatedly
 }
        public void Move(GameObject obj, ShipUpdateInfo info)
        {
            timer.Update(info.gameTime);

            switch (timer.Current)
            {
            case Timer2.TimerNum.First:
                obj.SetRotation(VecUtil.GetNormLeft());
                break;

            case Timer2.TimerNum.Second:
                obj.SetRotation(VecUtil.GetNormRight());
                break;
            }

            obj.SetFaceDir(VecUtil.GetNormDown());
        }