示例#1
0
 public void Stun(float time, DirectionHorizontal moveDirection)
 {
     cdStun = Time.time + time;
     if (moveDirection != DirectionHorizontal.NONE)
     {
         mgMovement.ForceMove(moveDirection, time);
     }
 }
 void OnHitEnemy(GameObject enemy)
 {
     enemy.GetComponent <Health>().Decrease(damage);
     if (attackDir == Direction.DOWN)
     {
         mgJump.ForceJump(0.25f);             //Pogo
         player.ResetDash();
     }
     else if (attackDir == Direction.RIGHT)
     {
         mgMovement.ForceMove(DirectionHorizontal.LEFT, 0.2f);
     }
     else if (attackDir == Direction.LEFT)
     {
         mgMovement.ForceMove(DirectionHorizontal.RIGHT, 0.2f);
     }
 }