当前位置: 首页>>代码示例>>C#>>正文


C# GameScenes类代码示例

本文整理汇总了C#中GameScenes的典型用法代码示例。如果您正苦于以下问题:C# GameScenes类的具体用法?C# GameScenes怎么用?C# GameScenes使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


GameScenes类属于命名空间,在下文中一共展示了GameScenes类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: ChangeScene

    private void ChangeScene(GameScenes pNewScene)
    {
        for (int i = 0; i < Cameras.Count; ++i)
        {
            Cameras[i].gameObject.SetActive(false);
            if (i == (int)pNewScene)
            {
                Cameras[i].gameObject.SetActive(true);
            }
        }

        switch (pNewScene)
        {
            case GameScenes.LOGO:
                break;
            case GameScenes.MAIN_MENU:
                break;
            case GameScenes.OPTIONS:
                break;
            case GameScenes.CREDITS:
                break;
            case GameScenes.GAME:
                GameObject.Find("GameManager").GetComponent<GameManager>().Initialize();
                break;

        }

        mCurrentGameScene = pNewScene;
    }
开发者ID:miscoined,项目名称:gg2016-FISH,代码行数:29,代码来源:ScenesManager.cs

示例2: gameSceneEvent

        public void gameSceneEvent(GameScenes scene)
        {
            if (!KCT_GameStates.settings.enabledForSave) return;
            List<GameScenes> validScenes = new List<GameScenes> { GameScenes.SPACECENTER, GameScenes.TRACKSTATION, GameScenes.SPH, GameScenes.EDITOR };
            if (validScenes.Contains(scene))
            {
                //Check for simulation save and load it.
                if (System.IO.File.Exists(KSPUtil.ApplicationRootPath + "saves/" + HighLogic.SaveFolder + "/KCT_simulation_backup.sfs"))
                {
                    KCT_Utilities.LoadSimulationSave();
                }
            }
            if (!HighLogic.LoadedSceneIsFlight && scene == GameScenes.FLIGHT && KCT_GameStates.flightSimulated) //Backup save at simulation start
            {
                KCT_Utilities.MakeSimulationSave();
            }

            if (HighLogic.LoadedScene == scene && (scene == GameScenes.EDITOR || scene == GameScenes.SPH)) //Fix for null reference when using new or load buttons in editor
            {
                GamePersistence.SaveGame("persistent", HighLogic.SaveFolder, SaveMode.OVERWRITE);
            }

            if (scene == GameScenes.MAINMENU)
            {
                KCT_GameStates.reset();
                KCT_GameStates.firstStart = true;
                KCT_Utilities.disableSimulationLocks();
                InputLockManager.RemoveControlLock("KCTLaunchLock");
            }
        }
开发者ID:ntwest,项目名称:KCT,代码行数:30,代码来源:KCT_Events.cs

示例3: SetTargetScene

 private static void SetTargetScene(ProtoScenarioModule psm, GameScenes scene)
 {
     if (!psm.targetScenes.Any(s => s == scene))
     {
         psm.targetScenes.Add(scene);
     }
 }
开发者ID:vzwick,项目名称:DangIt,代码行数:7,代码来源:ScenarioInjector.cs

示例4: OnGameSceneLoadRequested

 void OnGameSceneLoadRequested(GameScenes scene)
 {
     if (scene == GameScenes.SPACECENTER)
     {
         if (Planetarium.GetUniversalTime() > 300)
         {
             DefaultSystem();
             showGUI = false;
         }
         else if (File.Exists(KSPUtil.ApplicationRootPath + "/saves/" + HighLogic.SaveFolder + "/PlanetRandomizer.cfg"))
         {
             print("Loading System");
             PlanetSettings.Load(KSPUtil.ApplicationRootPath + "/saves/" + HighLogic.SaveFolder + "/PlanetRandomizer.cfg");
             RebuildSystem();
         }
         else if (!File.Exists(KSPUtil.ApplicationRootPath + "/saves/" + HighLogic.SaveFolder + "/PlanetRandomizer.cfg"))
         {
             DefaultSystem();
             print("Showing GUI");
             showGUI = true;
         }
     }
     /*if (scene == GameScenes.MAINMENU)
     {
         PlanetSettings.Load(KSPUtil.ApplicationRootPath + "/GameData/PlanetRandomizer/Resources/PlanetRandomizer.cfg");
         DefaultSystem();
     }*/
 }
开发者ID:metaphor05,项目名称:PlanetRandomizer,代码行数:28,代码来源:PlanetSystem.cs

示例5: GameSceneLoadRequested

 private void GameSceneLoadRequested(GameScenes scene)
 {
     if (scene != GameScenes.MAINMENU) {
         GameEvents.onGameSceneLoadRequested.Remove(GameSceneLoadRequested);
         mainMenu.envLogic.GoToStage(0);
     }
 }
开发者ID:Tommassino,项目名称:KerbalMultiPlayer,代码行数:7,代码来源:KMPMenuItem.cs

示例6: OnLevelLoaded

 private void OnLevelLoaded(GameScenes scene)
 {
     //call this every scene that needs BetterTimeWarp
     if (scene == GameScenes.FLIGHT || scene == GameScenes.SPACECENTER || scene == GameScenes.TRACKSTATION)
     {
         BetterTimeWarp.Instance = gameObject.AddComponent<BetterTimeWarp> ();
     }
 }
开发者ID:Kerbas-ad-astra,项目名称:BetterTimeWarp,代码行数:8,代码来源:Initialization.cs

示例7: removeButton

 private void removeButton(GameScenes scene)
 {
     if (stockToolbarButton != null)
     {
         ApplicationLauncher.Instance.RemoveModApplication(stockToolbarButton);
         stockToolbarButton = null;
     }
 }
开发者ID:Kerbas-ad-astra,项目名称:CapCom,代码行数:8,代码来源:CC_StockToolbar.cs

示例8: onGameSceneLoadRequested

 public void onGameSceneLoadRequested(GameScenes GameScene)
 {
     if (GameScene == GameScenes.MAINMENU)
       {
     setIcon(Utilities.getTexture("FPSLimiter", "SmallUtilities/FPSLimiter/Textures"));
     GameEvents.onGameSceneLoadRequested.Remove(onGameSceneLoadRequested);
       }
 }
开发者ID:Kerbas-ad-astra,项目名称:SmallUtilities,代码行数:8,代码来源:FPSLimiter.cs

示例9: removeButton

		private void removeButton(GameScenes scene)
		{
			if (SCANappLauncherButton != null)
			{
				ApplicationLauncher.Instance.RemoveModApplication(SCANappLauncherButton);
				SCANappLauncherButton = null;
			}
		}
开发者ID:DBT85,项目名称:SCANsat,代码行数:8,代码来源:SCANappLauncher.cs

示例10: Event_OnGameSceneLoadRequested

 public void Event_OnGameSceneLoadRequested(GameScenes scene)
 {
     Log("Destroying Flight HUD");
     hud.Shutdown();
     Destroy(hud);
     hud = null;
     Log("Unhooking event");
     GameEvents.onGameSceneLoadRequested.Remove(Event_OnGameSceneLoadRequested);
 }
开发者ID:Corax,项目名称:TestFlight,代码行数:9,代码来源:TestFlightWindow.cs

示例11: dEstroy

        public void dEstroy(GameScenes g)
        {
            GameEvents.onGUIApplicationLauncherReady.Remove(OnGUIReady);

            if (appButton != null)
            {
                ApplicationLauncher.Instance.RemoveModApplication(appButton);
            }
        }
开发者ID:kujuman,项目名称:ksp-ksf-advSRB,代码行数:9,代码来源:EditorController.cs

示例12: DisableMapSO

 private void DisableMapSO(GameScenes scene)
 {
     if (!isHomeworld && isLoaded)
     {
         if (OnDemandStorage.DisableBody(base.sphere.name))
         {
             Debug.Log("[OD]: Disabled Body " + base.sphere.name);
             isLoaded = false;
         }
     }
 }
开发者ID:Teknoman117,项目名称:Kopernicus,代码行数:11,代码来源:PQSMod_OnDemandHandler.cs

示例13: onLevelWasLoaded

        // Note: KSP's GameEvents.onLevelWasLoaded has the lower-case 'on' instead of usual 'On'
        private void onLevelWasLoaded(GameScenes scene)
        {
            if (scene != GameScenes.SPACECENTER)
                return;

            if (!RTSettings.Instance.FirstStart)
                return;

            // open here the option dialog for the first start
            RTLog.Notify("First start of RemoteTech!");
            _optionWindow.Show();
            RTSettings.Instance.FirstStart = false;
        }
开发者ID:RemoteTechnologiesGroup,项目名称:RemoteTech,代码行数:14,代码来源:RTSpaceCentre.cs

示例14: onSceneChange

		private void onSceneChange(GameScenes g)
		{
			switch (g)
			{
				case GameScenes.LOADING:
				case GameScenes.CREDITS:
				case GameScenes.LOADINGBUFFER:
				case GameScenes.MAINMENU:
				case GameScenes.PSYSTEM:
				case GameScenes.SETTINGS:
				case GameScenes.EDITOR:
					return;
			}

			progressParser.Loaded = false;

			Debug.Log("[Progress Tracking Parser] Initializing Progress Parser...");

			progressParser.initialize();
		}
开发者ID:DMagic1,项目名称:KSP_Progress_Parser,代码行数:20,代码来源:progressController.cs

示例15: OnLevelLoaded

 private void OnLevelLoaded(GameScenes scene)
 {
     if (Settings.AllowEditors)
     {
         foreach (var editor in editorTypes.Where(e => e.Value.Contains(scene)))
         {
             try
             {
                 GameObject obj = new GameObject (editor.Key.Name);
                 obj.AddComponent (editor.Key);
                 obj.SetActive (true);
                 Utils.Log ("IngameEditor " + editor.Key.Name + " created");
             }
             catch(Exception e)
             {
                 Utils.LogError ("Failed to load editor: " + editor.Key.Name);
                 Debug.LogException (e);
             }
         }
     }
 }
开发者ID:Kerbas-ad-astra,项目名称:KopernicusExpansion,代码行数:21,代码来源:IngameEditors.cs


注:本文中的GameScenes类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。