public void WavesFinished(WavesController controller) { if (panelLose.gameObject.activeSelf == false) { panelWin.gameObject.SetActive(true); } }
public static void Create() { money = 160; health = 25; color = Colorable.TeamColor.Red; wavesController = new WavesController(Colorable.TeamColor.Blue); wavesController.Load(Settings.settingsPath); }
public static void Create() { money = 150; health = 25; playProgress = 0; color = Colorable.TeamColor.Blue; wavesController = new WavesController(color); wavesController.Load(Settings.settingsPath); }
// Start is called before the first frame update void Start() { text = GetComponentInChildren <TextMeshProUGUI>(); controller = FindObjectOfType <WavesController>(); animator = GetComponent <Animator>(); controller.OnChangeWaves += StartNextWave; StartNextWave(controller); }
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; } } }
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); } } }
// Use this for initialization void Start() { controller = GetComponent <WavesController>(); init(); }
// Start is called before the first frame update void Start() { controller = FindObjectOfType <WavesController>(); controller.OnFinishWaves += WavesFinished; }
public void StartNextWave(WavesController wave) { text.text = "Wave " + waveNumber.ToString(); StartCoroutine(ActivateNextWave(DelayBetweenWaves)); }