private void OnLoadingError() { Loading.OnComplete -= OnLoadingComplete; Loading.OnError -= OnLoadingError; //here we will start with default game values! TransitionScript.OnComplete += () => { TransitionScript.RemoveEvents(); loading.Hide(); InitializeGame(); TransitionScript.Instance.FadeOut(transitionSpeed); }; TransitionScript.Instance.FadeIn(transitionSpeed); }
private void OnLoadingComplete(GameData data) { Loading.OnComplete -= OnLoadingComplete; Loading.OnError -= OnLoadingError; this.gameData = data; TransitionScript.OnComplete += () => { TransitionScript.RemoveEvents(); loading.Hide(); InitializeGame(); TransitionScript.Instance.FadeOut(transitionSpeed); }; TransitionScript.Instance.FadeIn(transitionSpeed); }