void Start() { Time.timeScale = timescale; DontDestroyOnLoad(transform.gameObject); camera_.Start(); statistic.Start(); Global.Server().postDisconnected += ListenBeforeDisconnected; }
void Start() { Time.timeScale = timescale; DontDestroyOnLoad(transform.gameObject); if (networkView == null) { gameObject.AddComponent <NetworkView>(); } networkView.stateSynchronization = NetworkStateSynchronization.Off; networkView.observed = null; camera_.Start(); statistic.Start(); character.game = this; character.Start(); if (progress == null) { progress = gameObject.GetComponent <GameProgress>(); if (progress == null) { progress = gameObject.AddComponent <GameProgress>(); } } if (result == null) { result = gameObject.GetComponent <GameResult>(); if (result == null) { result = gameObject.AddComponent <GameResult>(); } result.game = this; } hud.Start(); MasterServerManager.postBeforeDisconnected += ListenBeforeDisconnected; }