コード例 #1
0
    void Update()
    {
        if (!playerDamage.IsDead())
        {
            if (IsGrounded())
            {
                GroundMove();
            }
            else
            {
                AirMove();
            }

            velocity.y += gravity;
            velocity.x  = Mathf.Clamp(velocity.x, -maxSpeed, maxSpeed);
        }
    }
コード例 #2
0
ファイル: PlayerInput.cs プロジェクト: MaloData/Chromatix
 public bool IsFirePressed()
 {
     return(!playerDamage.IsDead() && Input.GetButton(fire));
 }