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); }
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."); } }