Beispiel #1
0
    void Awake()
    {
        DontDestroyOnLoad(this.gameObject);


        if (tallentTreeInstance == null)
        {
            tallentTreeInstance = this;
        }
        else
        {
            tallentTreeInstance.currentScene = SceneManager.GetActiveScene().buildIndex;
            tallentTreeInstance.showButton   = true;
            Destroy(this.gameObject);
        }
    }
Beispiel #2
0
    // Use this for initialization
    void Awake()
    {
        DontDestroyOnLoad(this.gameObject);
        tallentTree = GameObject.FindWithTag("TallentTree").GetComponent <TallentTree>();

        cleardLevels = new bool[4];

        if (gameStateInstance == null)
        {
            for (int i = 0; i < 2; ++i)
            {
                cleardLevels[i] = false;
            }
            gameStateInstance = this;
        }
        else
        {
            Destroy(this.gameObject);
        }
    }
Beispiel #3
0
 // Use this for initialization
 void Awake()
 {
     tallentTree  = GameObject.FindWithTag("TallentTree").GetComponent <TallentTree>();
     soundEffects = GameObject.FindWithTag("Script").GetComponent <SoundEffects>();
     timers       = gameObject.GetComponent <Timer>();
 }