Пример #1
0
    public IEnumerator InputParry()
    {
        yield return(new WaitForSeconds(reactTime * Time.deltaTime));

        for (int c = 0; c < lagTolerance; c++)
        {
            StartCoroutine(opponent.Parry());
            yield return(null);
        }
        StartCoroutine(Evaluate());
    }
Пример #2
0
 void Update()
 {
     if (Input.GetButtonDown("Fire1"))
     {
         fencer.Attack();
         return;
     }
     if (Input.GetButtonDown("Fire2"))
     {
         StartCoroutine(fencer.Parry());
         return;
     }
 }