Exemplo n.º 1
0
    private IEnumerator GameStarting( )
    {
        player.Reset( );
        player.DisablePlayer( );

        opponentLord.Reset( );
        opponentLord.DisableOpponents( );

        if (test)
        {
            opponentLord.gameObject.SetActive(false);
        }
        text.text = "It's your birthday! Hit the pinata.";

        yield return(textWait);
    }
Exemplo n.º 2
0
    private void InitOpponentLord( )
    {
        GameObject temp = Instantiate(opponentLordPrefab);

        if (temp.GetComponentInChildren <OpponentLord> ( ) != null)
        {
            opponentLord = temp.GetComponentInChildren <OpponentLord> ( );
            opponentLord.Init(opponentCount, opponentPrefab);
            opponentLord.DisableOpponents( );
        }
        else
        {
            Debug.LogError("OpponentLord component not found.");
        }
    }