Esempio n. 1
0
File: Game.cs Progetto: Puebebe/LD43
    void StartGame()
    {
        ShowGameScreen();

        int numberOfAllies = allies.transform.childCount;

        for (int i = numberOfAllies - 1; i >= 0; i--)
        {
            Destroy(allies.transform.GetChild(i).gameObject);
        }

        if (cameraZoom != null)
        {
            StopCoroutine(cameraZoom);
        }
        StartCoroutine(ZoomOutCamera());
        Score = 0;
        StartCoroutine(EnergyBarBehavior.EnergyLoading());
        EnergyBarBehavior.isRegenerationOn = true;
    }
Esempio n. 2
0
 void OnDestroy()
 {
     instance = null;
 }
Esempio n. 3
0
 void Awake()
 {
     instance = this;
 }
Esempio n. 4
0
 void Start()
 {
     energybar = EnergyBarBehavior.instance;
     button    = GetComponent <Button>();
     Debug.Assert(skillActivator != null, "no skill activator set", this);
 }