Exemplo n.º 1
0
 public void WavesFinished(WavesController controller)
 {
     if (panelLose.gameObject.activeSelf == false)
     {
         panelWin.gameObject.SetActive(true);
     }
 }
Exemplo n.º 2
0
 public static void Create()
 {
     money           = 160;
     health          = 25;
     color           = Colorable.TeamColor.Red;
     wavesController = new WavesController(Colorable.TeamColor.Blue);
     wavesController.Load(Settings.settingsPath);
 }
Exemplo n.º 3
0
 public static void Create()
 {
     money           = 150;
     health          = 25;
     playProgress    = 0;
     color           = Colorable.TeamColor.Blue;
     wavesController = new WavesController(color);
     wavesController.Load(Settings.settingsPath);
 }
Exemplo n.º 4
0
    // Start is called before the first frame update
    void Start()
    {
        text       = GetComponentInChildren <TextMeshProUGUI>();
        controller = FindObjectOfType <WavesController>();
        animator   = GetComponent <Animator>();
        controller.OnChangeWaves += StartNextWave;

        StartNextWave(controller);
    }
Exemplo n.º 5
0
    public void Clone()
    {
        _clone = Instantiate(wc, transform);

        foreach (var wave in _clone.waves)
        {
            if (flockPopulatorsSwap.ContainsKey(wave.populator))
            {
                wave.populator = flockPopulatorsSwap[wave.populator];
                wave.seconds  += timeOffset;
            }
        }
    }
Exemplo n.º 6
0
    private void Start()
    {
        wavesController = GetComponent <WavesController>();

        restartButton = GameObject.Find("RestartButton");
        restartButton.SetActive(false);

        classChoiceMenu = GameObject.Find("ClassChoiceMenu");

        spawnPoints = GameObject.FindGameObjectsWithTag("SpawnPoint");
        playerUIs   = FindObjectsOfType <PlayerUI>().OrderBy(m => m.transform.name).ToArray();

        for (int i = 0; i < playerUIs.Length; i++)
        {
            if (i >= maxPlayers)
            {
                playerUIs[i].gameObject.SetActive(false);
            }
        }
    }
Exemplo n.º 7
0
 // Use this for initialization
 void Start()
 {
     controller = GetComponent <WavesController>();
     init();
 }
Exemplo n.º 8
0
 // Start is called before the first frame update
 void Start()
 {
     controller = FindObjectOfType <WavesController>();
     controller.OnFinishWaves += WavesFinished;
 }
Exemplo n.º 9
0
 public void StartNextWave(WavesController wave)
 {
     text.text = "Wave " + waveNumber.ToString();
     StartCoroutine(ActivateNextWave(DelayBetweenWaves));
 }