예제 #1
0
 private void Attack()
 {
     if (CanAttackAgain() && Input.GetKeyDown(KeyCode.Q))
     {
         G_Anim.SetTrigger("BasicAttack");
         G_Rigibody2D.velocity = Vector2.zero;
     }
 }
예제 #2
0
    private void Jump()
    {
        if (!inTheGround)
        {
            return;
        }

        if (Input.GetKeyDown(KeyCode.Space))
        {
            G_Rigibody2D.velocity += new Vector2(0, G_Jump_Force);
            G_Anim.SetTrigger("Jump");
        }
    }