Beispiel #1
0
        public static LoadLevelFinishEventArgs Create(int levelId, object userData = null)
        {
            LoadLevelFinishEventArgs loadLevelEventArgs = ReferencePool.Acquire <LoadLevelFinishEventArgs>();

            loadLevelEventArgs.LevelId  = levelId;
            loadLevelEventArgs.UserData = userData;
            return(loadLevelEventArgs);
        }
        private void OnLoadSceneSuccess(object sender, GameEventArgs e)
        {
            LoadSceneSuccessEventArgs ne = (LoadSceneSuccessEventArgs)e;

            if (ne.UserData != this)
            {
                return;
            }

            loadSceneCompleted = true;

            GameEntry.Event.Fire(this, LoadLevelFinishEventArgs.Create(loadingSceneId));
            Log.Info("Load scene '{0}' OK.", ne.SceneAssetName);
        }