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"); }); }
// 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(); }