Esempio n. 1
0
    void Awake()
    {
                #if UNITY_EDITOR
        DebugHelper.CreateGameStatsPersistor();
                #endif

        this.GameStatsPersistor = GameObject.FindGameObjectWithTag("GameStatsPersistor")
                                  .GetComponent <GameStatsPersistor> ();
        this.GameStats = this.GameStatsPersistor.GameStats;

        GameObject.Find("Button").GetComponent <Button> ().onClick.AddListener(() => {
            SceneManager.LoadScene("mapScene");
        });
    }
Esempio n. 2
0
    // Use this for initialization
    void Start()
    {
#if UNITY_EDITOR
        DebugHelper.CreateGameStatsPersistor();
#endif

        this.GameStatsPersistor = GameObject.FindGameObjectWithTag("GameStatsPersistor")
                                  .GetComponent <GameStatsPersistor> ();
        this.GameStats = this.GameStatsPersistor.GameStats;

        initUIElements();

        startFight();
    }