Пример #1
0
 /// <summary>
 /// 设置当前场景并进入当前场景
 /// </summary>
 /// <param name="state"></param>
 public void SetScene(SceneState state)
 {
     if (sceneState != null)
     {
         sceneState.OnExit();
     }
     sceneState = state;
     if (sceneState != null)
     {
         sceneState.OnEnter();
     }
 }
Пример #2
0
 /// <summary>
 /// 设置并进入当前场景
 /// </summary>
 /// <param name="state">场景类</param>
 public void SetScene(SceneState state)
 {
     sceneState?.OnExit();
     sceneState = state;
     sceneState?.OnEnter();
 }