Exemplo n.º 1
0
    /**
     * Acting!
     */
    public IEnumerator InputAttack()
    {
        yield return(new WaitForSeconds(reactTime * Time.deltaTime));

        for (int c = 0; c < lagTolerance; c++)
        {
            opponent.Attack();
            yield return(null);
        }
        StartCoroutine(Evaluate());
    }
Exemplo n.º 2
0
 void Update()
 {
     if (Input.GetButtonDown("Fire1"))
     {
         fencer.Attack();
         return;
     }
     if (Input.GetButtonDown("Fire2"))
     {
         StartCoroutine(fencer.Parry());
         return;
     }
 }