Esempio n. 1
0
        public override void isHitByItem(Auction_Boxing_2.ItemInstance item, Auction_Boxing_2.Boxing.PlayerStates.State expectedHitState)
        {
            if (timer <= 0)
            {
                if ((player.direction == 1 && player.position.X < item.position.X)
                || (player.direction == -1 && player.position.X > item.position.X))
                {
                    timer = waitTime;
                    player.position.X += item.moveDirection * hitVelocity;

                    // and some chip damage
                    //player.CurrentHealth -= 5;
                }
                else
                {
                    // You're facing the wrong way and get knocked down, homie!
                    base.isHitByItem(item, expectedHitState);
                }
            }
        }
Esempio n. 2
0
 public override void isHit(Auction_Boxing_2.BoxingPlayer attackingPlayer, State expectedHitState, int damage)
 {
     ChangeState(new StateKnockedDown(player,attackingPlayer.direction, true));
 }