Пример #1
0
    void Awake()
    {
        instance = this;

        //Force creation off an resultsholder object
        ResultsHolder.instance();
    }
Пример #2
0
    private void CountTime()
    {
        time -= 0.01f;

        // Game over
        if (time <= 0f)
        {
            // Fill the object with important data and change scene
            ResultsHolder.instance().score           = score;
            ResultsHolder.instance().treesDestroyed  = treesDestroyed;
            ResultsHolder.instance().trunksDestroyed = trunksDestroyed;

            sceneController.LoadResuls();
        }
        else
        {
            VisualController.instance.UpdateTimeValue(time);
        }
    }
Пример #3
0
 void Awake()
 {
     holder = ResultsHolder.instance();
 }