Exemplo n.º 1
0
 public void onDispose()
 {
     managerPool         = null;
     EnemySpawnPosition  = null;
     PlayerSpawnPosition = null;
     managerCorountine   = null;
     enemyInWave.Clear();
 }
Exemplo n.º 2
0
    public void OnAwake()
    {
        EnemySpawnPosition  = GameObject.FindGameObjectWithTag("SpawnEnemy");
        PlayerSpawnPosition = GameObject.FindGameObjectWithTag("SpawnPlayer");

        managerPool = ToolBox.Get <ManagerPool>();
        ToolBox.Get <ManagerEvent>().Subscribe(this);

        LaserWall         = GameObject.Instantiate(LaserWall.gameObject).transform;
        managerCorountine = ToolBox.Get <ManagerCorountine>().CoroutineComponent;
        StartGame();
    }
Exemplo n.º 3
0
    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));
    }
Exemplo n.º 4
0
 public void onDispose()
 {
     CoroutineComponent.StopAllCoroutines();
     Component.Destroy(CoroutineComponent);
     CoroutineComponent = null;
 }
Exemplo n.º 5
0
 public void OnAwake()
 {
     CoroutineComponent = GameObject.Find("[SETUP]").AddComponent <ManagerCoroutineComponent>();
 }