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