本文整理汇总了C#中Controller.SceneName方法的典型用法代码示例。如果您正苦于以下问题:C# Controller.SceneName方法的具体用法?C# Controller.SceneName怎么用?C# Controller.SceneName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Controller
的用法示例。
在下文中一共展示了Controller.SceneName方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: OnAnySceneLoaded
public override void OnAnySceneLoaded(Controller controller)
{
if (controller.SceneName().CompareTo("DemoTab") == 0)
{
((DemoTabController)controller).isDemoClear = isDemoClear;
}
}
示例2: ExcuteSceneType
static void ExcuteSceneType(Controller controller, SceneType sceneType)
{
switch (sceneType)
{
case SceneType.DEFAULT:
m_SceneTransition.FadeInScene();
controller.Supporter.ActiveEventSystem(true);
m_CurrentSceneController = controller;
m_CurrentSceneName = controller.SceneName();
break;
case SceneType.SCENE:
m_SceneTransition.FadeInScene();
controller.Supporter.DestroyEventSystem();
controller.Supporter.ReplaceEventSystem(m_CurrentSceneController);
m_CurrentSceneController = controller;
m_CurrentSceneName = controller.SceneName();
DeactivePrevSceneOnShown(controller);
break;
case SceneType.SCENE_CLEAR_ALL:
m_SceneTransition.FadeInScene();
m_CurrentSceneController = controller;
m_CurrentSceneName = controller.SceneName();
controller.Supporter.ActiveEventSystem(true);
break;
case SceneType.POPUP:
controller.Supporter.CreateShields();
controller.Supporter.DestroyEventSystem();
break;
case SceneType.VIEW:
controller.Supporter.DestroyEventSystem();
break;
case SceneType.VIEW_FULL_SCREEN:
controller.Supporter.DestroyEventSystem();
break;
case SceneType.LOADING:
ExcuteFixController(ref m_LoadingController, controller, m_LoadingActive);
break;
case SceneType.TAB:
ExcuteFixController(ref m_TabController, controller, m_TabActive);
break;
}
}
示例3: OnLoaded
public static void OnLoaded(Controller controller)
{
m_Scenes.Add(controller.SceneName(), controller);
foreach (var scene in m_Scenes)
{
scene.Value.OnAnySceneLoaded(controller);
}
Resources.UnloadUnusedAssets();
System.GC.Collect();
ExcuteCommand(controller.SceneName());
}