示例#1
0
        protected void MoveStateUpdate()
        {
            shiftMove = InputContllorer.IsPress(Keys.LeftShift);

            if (InputContllorer.IsPush(Keys.X) && bomb > 0)
            {
                bomb--;
                Invincible((int)State.BOMB);
                StateSet(State.BOMB);
            }
        }
示例#2
0
 protected void BulletUpdate()
 {
     if (state == State.BOMB)
     {
         if (time / bombShootInterval > shootCount)
         {
             ShootBomb();
         }
     }
     else if (state == State.MOVE && InputContllorer.IsPress(Keys.Z))
     {
         if (time / shootInterval > shootCount)
         {
             ShootBullet();
         }
     }
 }
示例#3
0
        protected void MoveUpdate(int deltaTime)
        {
            if (state == State.REBIRTH)
            {
                position.X = BattleMain.BattleWindow.Center.X;
                position.Y = BattleMain.BattleWindow.Down + radius * 2 - time / 10f;
                return;
            }

            if (state == State.WAIT || state == State.PICHUN)
            {
                return;
            }

            float s = (shiftMove) ? shiftSpeed : speed;

            drawRect.Y = 0;
            if (InputContllorer.IsPress(Keys.Left))
            {
                drawRect.Y = 64;
                LeftMove(s * deltaTime);
            }
            if (InputContllorer.IsPress(Keys.Right))
            {
                drawRect.Y = 128;
                RightMove(s * deltaTime);
            }
            if (InputContllorer.IsPress(Keys.Up))
            {
                UpMove(s * deltaTime);
            }

            if (InputContllorer.IsPress(Keys.Down))
            {
                DownMove(s * deltaTime);
            }
        }