コード例 #1
0
 protected override void OnCollisionResponse(IProjectile projectile, CollisionSide side)
 {
     if (projectile is KoopaShellProjectile)
     {
         currentState = KoopaShellStates.Idle;
     }
 }
コード例 #2
0
        protected override void OnCollisionResponse(IPlayer player, CollisionSide side)
        {
            if (currentState != KoopaShellStates.Sliding)
            {
                if (side.Equals(CollisionSide.Right))
                {
                    isMovingRight = false;
                }
                else if (side.Equals(CollisionSide.Left))
                {
                    isMovingRight = true;
                }
                SoundEffectFactory.Instance.PlayKick();
                CorrectPosition(side, player);
            }

            hitCount++;
            if (hitCount >= 1)
            {
                currentState = KoopaShellStates.Sliding;
                isKicked     = true;
            }
        }
コード例 #3
0
 public override void DestroyShell()
 {
     currentState  = KoopaShellStates.Gone;
     CurrentSprite = null;
 }