Esempio n. 1
0
    IEnumerator DanceOff()
    {
        BattleEventData data = new BattleEventData(myStats, currentOpponent.myStats);

        GameEvents.BeginBattle(data);
        controller.enabled = false;
        currentOpponent.transform.LookAt(transform.position);
        body.velocity = Vector3.zero;
        currentOpponent.uiCanvas.SetActive(false);

        yield return(new WaitForSeconds(3f));

        currentOpponent.uiCanvas.SetActive(true);
        BattleHandler.Battle(data);
        controller.enabled = true;
        currentOpponent.transform.LookAt(transform.position + Vector3.forward);
    }