Exemple #1
0
 private void ResetWave()
 {
     if (!weveReset)
     {
         managerCorountine.StartCoroutine(SetupWave());
     }
 }
    public void OnAwake()
    {
        ToolBox.Get <ManagerEvent>().Subscribe(this);
        managerCorountine = ToolBox.Get <ManagerCorountine>().CoroutineComponent;

        var canvas = GameObject.Find("Canvas");


        newWaveText = GameObject.Instantiate(newWaveTextPrefab, canvas.transform);
        diedMenu    = GameObject.Instantiate(diedMenuPrefab, canvas.transform);

        diedMenu.SetActive(false);
        newWaveText.SetActive(false);

        var healthBar = GameObject.Instantiate(HealthBarBrefab, canvas.transform).GetComponent <Slider>();

        healthBar.maxValue = PlayerHP.MaxHealth;
        healthBar.value    = PlayerHP.Health;

        managerCorountine.StartCoroutine(HealthBarChange(healthBar));
    }
 public void ShowNewWaveText()
 {
     managerCorountine.StartCoroutine(ReloadWaveText());
 }