Esempio n. 1
0
    void Start()
    {
        spawner.OnCountdown.AddListener(CountdownTextSituation);
        spawner.OnCountdown.AddListener(UpdateCrosses);
        spawner.OnLevelComplete.AddListener(Win);
        moneyHolder.OnMoneyChange.AddListener(OnMoneyChanged);

        LevelManager.Instance.OnSaving.AddListener(ChangeSavingState);

        moneyChange.text = "$" + moneyHolder.ActualMoney;

        imgCrosses = new Image[spawner.GetMountOfWaves()];

        for (int i = spawner.GetMountOfWaves() - 1; i > -1; i--)
        {
            imgCrosses[i] = Instantiate(cross, new Vector3(crosses.position.x - 80 * (spawner.GetMountOfWaves() - i), crosses.position.y, crosses.position.z), crosses.rotation, crosses);
        }

        timeSavingLeft = 0;
    }