Example #1
0
        protected void PichunStateUpdate()
        {
            if (state == State.PICHUN)
            {
                if (time > (int)State.PICHUN)
                {
                    Invincible((int)State.REBIRTH);
                    StateSet(State.REBIRTH);
                    life--;
                    bomb = 3;

                    if (life < 0)
                    {
                        parent.BattleEnd(score);
                    }
                    else
                    {
                        parent.ConvertEnemyBulletToItem(false);
                    }
                }
                if (InputContllorer.IsPush(Keys.X) && bomb > 1)
                {
                    Invincible((int)State.BOMB);
                    StateSet(State.BOMB);
                    bomb -= 2;
                }
            }
        }
Example #2
0
        protected void MoveStateUpdate()
        {
            shiftMove = InputContllorer.IsPress(Keys.LeftShift);

            if (InputContllorer.IsPush(Keys.X) && bomb > 0)
            {
                bomb--;
                Invincible((int)State.BOMB);
                StateSet(State.BOMB);
            }
        }
Example #3
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();
         }
     }
 }
Example #4
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);
            }
        }