Exemple #1
0
    // Update is called once per frame
    void Update()
    {
        if (Input.GetKeyDown(KeyCode.J))
        {
            attack = true;
            switch (Random.Range(0, 4))
            {
            case 0:
                animator.SetTrigger("Attack 01");
                break;

            case 1:
                animator.SetTrigger("Attack 02");
                break;

            case 3:
                animator.SetTrigger("Double Attack");
                break;

            default:
                animator.SetTrigger("Jump Attack");
                break;
            }
        }
        if (Input.GetKeyDown(KeyCode.K))
        {
            if (Ins.Check(10))
            {
                Ins.Use(10);
                DoubleDamage = true;
                Invoke("CancelDoubleDamage", 5f);
                DoubleAnim.Play();
            }
        }
    }
Exemple #2
0
 // Update is called once per frame
 void Update()
 {
     attack = false;
     if (Input.GetKeyDown(KeyCode.Return))
     {
         if (Ins.Check(10))
         {
             animator.SetTrigger("Projectile Attack");
             Ins.Use(10);
             attack = true;
         }
     }
 }