/// <summary> /// フェードアウト管理クラス /// </summary> /// <param name="conent"></param> /// <param name="graphicsDevice"></param> public FadeOut(ContentManager content,GraphicsDevice graphicsDevice,SceneType scenetype) { this.content = content; this.graphicsDevice = graphicsDevice; LoadContent(); this.scenetype = scenetype; //フェードアウトの初期化 m_alpha = 0.0f; switch (scenetype) { case SceneType.InGame: m_alphaIncAmout = 0.02f; break; case SceneType.OutGame: m_alphaIncAmout = 0.04f; break; } //フェードアウト描画サイズ screenBound = new Rectangle(0, 0, GameMain.ScreenWidth, GameMain.ScreenHeight); //黒色でフェードアウト color = new Color(0.0f, 0.0f, 0.0f, m_alpha); EndFadeOut = false; }
public void SwitchScene(SceneType sceneType , params object[] sceneArgs) { string name = sceneType.ToString(); //GameObject scene = ResourceMgr.GetInstance().CreateGameObject("Game/UI/"+name, false); GameObject scene = new GameObject(name); SceneBase baseObj = scene.AddComponent(Type.GetType(name)) as SceneBase; //baseObj.Init(sceneArgs); baseObj.OnInit(sceneArgs); if (parentObj == null) { parentObj = GameObject.Find("UI Root").transform; } scene.transform.parent = parentObj; scene.transform.parent.localEulerAngles = Vector3.zero; scene.transform.localScale = Vector3.one; scene.transform.localPosition = Vector3.zero; LayerMgr.GetInstance().SetLayer(baseObj.gameObject, LayerType.Scene); if (name.Equals(mainSceneName)) {//如果进入主场景,则清空记录 switchRecorder.Clear(); } switchRecorder.Add(new SwitchRecorder(sceneType, sceneArgs)); if (curren != null) { GameObject.Destroy(curren); } curren = scene; }
public void SceneChange(SceneType type) { UserScript user = GameObject.FindGameObjectWithTag("Network").GetComponent<UserScript>(); string sceneName = ""; switch (type) { case SceneType.GAME: sceneName = "GameScene"; user.State = UserState.GAME; break; case SceneType.TITLE: sceneName = "TitleScene"; user.State = UserState.START; break; case SceneType.LOBBY: sceneName = "LobbyScene"; user.State = UserState.LOBBY; break; case SceneType.PICK: sceneName = "PickScene"; user.State = UserState.PICK; break; default: break; } Application.LoadLevel(sceneName); }
public static void SwitchToScene(SceneType sceneType) { FStage oldScene = null; oldScene = currentScene; if (sceneType == SceneType.MergeNamesScene) currentScene = new TMergeNamesScene(); else if (sceneType == SceneType.ClickHeartsScene) currentScene = new TClickHeartsScene(); else if (sceneType == SceneType.PeopleSceneGoalOne) { currentScene = new TPeopleScene(GoalType.GoalOne); goalOneTutorialIsDone = true; } else if (sceneType == SceneType.PeopleSceneGoalTwo) currentScene = new TPeopleScene(GoalType.GoalTwo); else if (sceneType == SceneType.PeopleSceneGoalThree) currentScene = new TPeopleScene(GoalType.GoalThree); else if (sceneType == SceneType.DreamSceneOne) currentScene = new TDreamScene(DreamSceneType.DreamSceneOne); else if (sceneType == SceneType.DreamSceneTwo) currentScene = new TDreamScene(DreamSceneType.DreamSceneTwo); if (oldScene != null) { currentScene.alpha = 0; Go.to(oldScene, 0.3f, new TweenConfig().floatProp("alpha", 0.0f).onComplete(OnOldSceneCompletedFadingOut)); Go.to(currentScene, 0.3f, new TweenConfig().floatProp("alpha", 1.0f)); } Futile.AddStage(currentScene); Futile.AddStage(labelDisplayLayer); // move to top }
public SceneData(string sn, object dt, SSCallBackDelegate onActive, SSCallBackDelegate onDeactive, SceneType type) { SceneName = sn; Data = dt; Type = type; OnActive = onActive; OnDeactive = onDeactive; }
public SceneData(SceneType sceneType, Vector3 position, Data data, bool hasAnimation, int minDepth, bool inStack) { SceneType = sceneType; Position = position; Data = data; HasAnimation = hasAnimation; MinDepth = minDepth; InStack = inStack; }
public static void LoadGameScene() { CurrentScene = SceneType.Game; //Application.LoadLevel("BombermanScene"); AsyncOperation async = Application.LoadLevelAsync("BombermanScene"); //yield return async; Debug.Log ("Loading complete"); }
public void SwitchToScene(SceneType sceneType) { if (currentScene != null) Futile.RemoveStage(currentScene); if (sceneType == SceneType.Immunity) currentScene = new WTImmunity(); if (sceneType == SceneType.None) currentScene = null; if (currentScene != null) Futile.AddStage(currentScene); }
public static void TransferToPreviousScene(SceneType defaultScene) { // remove current scene. _log.RemoveLast(); // transfer to previous scene. var scene = _log.PopOrDefault(defaultScene); Transfer(scene); }
private string GetSceneNameFromType(SceneType sceneType) { string sceneName; if (sceneType == SceneType.play) sceneName = "AppPlay"; else if(sceneType == SceneType.main) sceneName = "AppMain"; else sceneName = ""; return sceneName; }
public void loadScene(SceneType sceneType, Dictionary<string, System.Object> sceneData = null) { string sceneName = GetSceneNameFromType(sceneType); if(sceneName.Length > 0) { currSceneType = sceneType; currSceneData = sceneData; Application.LoadLevel(sceneName); } }
private Main() { currSceneType = GetSceneTypeFromName(Application.loadedLevelName); currSceneData = null; SceneType firstScene = SceneType.main; if(currSceneType != firstScene) { loadScene(firstScene); } }
public void SwitchToScene(SceneType sceneType) { if (currentScene != null) Futile.RemoveStage(currentScene); if (sceneType == SceneType.Compartments) currentScene = new WTCompartments(); if (sceneType == SceneType.BlahGame) currentScene = new WTBlahGame(); if (sceneType == SceneType.FrendenGame) currentScene = new WTFrendenGame(); if (sceneType == SceneType.Hexagon) currentScene = new WTHexagon(); if (sceneType == SceneType.None) currentScene = null; if (currentScene != null) Futile.AddStage(currentScene); }
GameObject CreateScene(SceneType scene_type) { var scene_prefab = scene_list_.ContainsKey(scene_type) ? scene_list_[scene_type] : scene_list_[SceneType.TITLE]; var scene = Instantiate(scene_prefab); scene.name = scene_prefab.name; current_scene_ = scene; return scene; }
public void SetScene(SceneType sceneType) { if((Scene)_sceneList[sceneType]) { if(_currentScene) _currentScene.Deactivate(); _currentScene = (Scene)_sceneList[sceneType]; _currentSceneType = sceneType; _currentScene.Activate(); } else { Debug.LogError("No scene of type " + sceneType + " exists!"); } }
public static void SwitchToScene(SceneType sceneType) { if (currentScene != null) Futile.RemoveStage(currentScene); if (sceneType == SceneType.GameScene) { currentScene = new SBGameScene(true); FSoundManager.StopMusic(); } if (sceneType == SceneType.TitleScene) { currentScene = new SBTitleScene(); Futile.AddStage(currentScene); } if (sceneType == SceneType.HelpScene) { currentScene = new SBHelpScene(); Futile.AddStage(currentScene); } if (sceneType == SceneType.None) currentScene = null; }
public void StartFade(Type type, SceneType scene, float length) { this.targetScene = scene; this.length = length; this.elapsedTime = 0; switch (type) { case Type.FadeIn: this.type = Type.FadeIn; alpha = 1; break; case Type.FadeOut: this.type = Type.FadeOut; alpha = 0; break; case Type.FadeOutIn: this.type = Type.FadeOutIn; alpha = 0; break; } }
/// <summary> /// Switchs the scene. /// </summary> /// <param name="name">要创建的资源路径</param> /// <param name="objParams">可变参数</param> public void SwitchScene(SceneType sceneType , params object[] objParams)//GameObject { //GameObject obj = ResourceMsg.GetInstance ().CreateGameObject (name, cache); string name = sceneType.ToString (); GameObject go = new GameObject(name); SceneBase scene = go.AddComponent(Type.GetType(name)) as SceneBase; //scene.Init(); scene.OnInit(objParams); if (parentObj == null) { //此处写法欠妥,还需要改进 parentObj = GameObject.Find("UI Root").transform; } go.transform.SetParent(parentObj); go.transform.localEulerAngles = Vector3.zero; go.transform.localScale = Vector3.one; go.transform.localPosition = Vector3.zero; //如果是进入到主场景,清空记录 if (name.Equals(mainScene)) { switchRecorders.Clear(); } switchRecorders.Add(new SwitchRecorder(sceneType, objParams)); if (currentShow != null) { GameObject.Destroy (currentShow); } currentShow = go; LayerMgr.GetInstance().SetLayer(go, LayerType.Scene); }
public void SceneChangedEvent(SceneType type) { }
public void ShowScene(SceneType type) { // Hide all child scenes foreach (var scene in SceneChildren) { scene.HasFocus = false; } // Hide all child-scene controls (the first four are static and shouldnt be hidden) for (int i = 4; i < gui.Elements.Count; i++) { gui.Elements[i].Visibility = Visibility.Hidden; } switch (type) { case SceneType.Main: title.Text = "MAIN MENU"; gui.Elements[4].Visibility = Visibility.Visible; break; case SceneType.NewGame: title.Text = "NEW GAME"; gui.Elements[5].Visibility = Visibility.Visible; break; case SceneType.JoinGame: title.Text = "JOIN GAME"; gui.Elements[6].Visibility = Visibility.Visible; break; } }
public static extern Handle CreateSceneManager( Handle self, SceneType sceneType);
public static void LoadNewScene(SceneType type) { SceneManager.LoadScene((int)type); }
public void Remove(SceneType type) { sceneToRemove.Add(type); }
/// <summary> /// 切り替えたいシーンを設定します。 /// </summary> /// <param name="nextScene"></param> public static void ChangeScene(SceneType nextScene) { NextScene = nextScene; Instance.enabled = true; }
public static async ETTask <Scene> Create(Entity parent, long id, long instanceId, int zone, string name, SceneType sceneType, StartSceneConfig startSceneConfig = null) { await ETTask.CompletedTask; Scene scene = EntitySceneFactory.CreateScene(id, instanceId, zone, sceneType, name, parent); scene.AddComponent <MailBoxComponent, MailboxType>(MailboxType.UnOrderMessageDispatcher); switch (scene.SceneType) { case SceneType.Router: scene.AddComponent <RouterComponent, IPEndPoint, string>(startSceneConfig.OuterIPPort, startSceneConfig.StartProcessConfig.InnerIP ); break; case SceneType.RouterManager: scene.AddComponent <HttpComponent, string>($"http://{startSceneConfig.OuterIPPort}/"); break; case SceneType.Realm: scene.AddComponent <NetKcpComponent, IPEndPoint, int>(startSceneConfig.InnerIPOutPort, CallbackType.SessionStreamDispatcherServerOuter); break; case SceneType.Gate: scene.AddComponent <NetKcpComponent, IPEndPoint, int>(startSceneConfig.InnerIPOutPort, CallbackType.SessionStreamDispatcherServerOuter); scene.AddComponent <PlayerComponent>(); scene.AddComponent <GateSessionKeyComponent>(); break; case SceneType.Map: scene.AddComponent <UnitComponent>(); scene.AddComponent <AOIManagerComponent>(); break; case SceneType.Location: scene.AddComponent <LocationComponent>(); break; case SceneType.Robot: scene.AddComponent <RobotManagerComponent>(); break; } return(scene); }
public void SwitchScene(SceneType sceneType) { _switchingScene = true; _switchingSceneType = sceneType; }
public static Scene CreateScene(long id, long instanceId, int zone, SceneType sceneType, string name, Entity parent = null) { Scene scene = new Scene(id, instanceId, zone, sceneType, name, parent); return(scene); }
/// <summary> /// Internal method to handle scene loads /// </summary> private async Task LoadScenesInternal( IEnumerable <string> scenesToLoad, SceneType sceneType, SceneActivationToken activationToken = null, float progressOffset = 0, float progressTarget = 1, bool sceneOpInProgressWhenFinished = false) { // If we're using an activation token let it know that we're NOT ready to proceed activationToken?.SetReadyToProceed(false); SetSceneOpProgress(true, progressOffset, sceneType); // Validate our scenes List <string> validNames = new List <string>(); List <int> validIndexes = new List <int>(); foreach (string sceneName in scenesToLoad) { // See if scene exists Scene scene; int sceneIndex; if (!RuntimeSceneUtils.FindScene(sceneName, out scene, out sceneIndex)) { Debug.LogError("Can't load invalid scene " + sceneName); } else { validIndexes.Add(sceneIndex); validNames.Add(sceneName); } } int totalSceneOps = validIndexes.Count; if (totalSceneOps < 1) { Debug.LogWarning("No valid scenes found to load."); SetSceneOpProgress(sceneOpInProgressWhenFinished, progressTarget, sceneType); return; } // We're about to load scenes - let everyone know InvokeWillLoadActions(validNames, sceneType); // Load our scenes if (validIndexes.Count > 0) { List <AsyncOperation> loadSceneOps = new List <AsyncOperation>(); foreach (int sceneIndex in validIndexes) { Scene scene = SceneManager.GetSceneByBuildIndex(sceneIndex); if (scene.isLoaded) { continue; } AsyncOperation sceneOp = SceneManager.LoadSceneAsync(sceneIndex, LoadSceneMode.Additive); // Set this to true unless we have an activation token sceneOp.allowSceneActivation = (activationToken != null) ? activationToken.AllowSceneActivation : true; loadSceneOps.Add(sceneOp); } // Now wait for all async operations to complete bool completedAllSceneOps = false; while (!completedAllSceneOps) { if (!Application.isPlaying) { // Break out of this loop if we've stopped playmode return; } completedAllSceneOps = true; bool readyToProceed = false; bool allowSceneActivation = (activationToken != null) ? activationToken.AllowSceneActivation : true; // Go through all the load scene ops and see if we're ready to be activated float sceneOpProgress = 0; for (int i = 0; i < loadSceneOps.Count; i++) { // Set allow scene activation // (This can be set to true by user before ReadyToProceed is set) loadSceneOps[i].allowSceneActivation = allowSceneActivation; if (loadSceneOps[i].isDone) { // Sometimes if a scene is small enough, progress will get reset to 0 before you even have a chance to check it // This is true EVEN IF you've set allowSceneActivation to false // So use isDone as a failsafe sceneOpProgress += 1; } else { readyToProceed |= loadSceneOps[i].progress >= SceneActivationLoadProgress; sceneOpProgress += loadSceneOps[i].progress; completedAllSceneOps = false; } } // Let the activation know whether we're ready activationToken?.SetReadyToProceed(readyToProceed); sceneOpProgress = Mathf.Clamp01(SceneOperationProgress / totalSceneOps); SetSceneOpProgress(true, Mathf.Lerp(progressOffset, progressTarget, sceneOpProgress), sceneType); await Task.Yield(); } } // Wait for all scenes to be fully loaded before proceeding bool scenesLoadedAndActivated = false; while (!scenesLoadedAndActivated) { if (!Application.isPlaying) { // Break out of this loop if we've stopped playmode return; } scenesLoadedAndActivated = true; foreach (int sceneIndex in validIndexes) { Scene scene = SceneManager.GetSceneByBuildIndex(sceneIndex); scenesLoadedAndActivated &= (scene.IsValid() & scene.isLoaded); } await Task.Yield(); } // Make sure our content tracker is refreshed contentTracker.RefreshLoadedContent(); // We're done! SetSceneOpProgress(sceneOpInProgressWhenFinished, progressTarget, sceneType); InvokeLoadedActions(validNames, sceneType); }
public static async ETTask <Scene> Create(Entity parent, long id, int zone, string name, SceneType sceneType, StartSceneConfig startSceneConfig = null) { Scene scene = EntitySceneFactory.CreateScene(id, zone, sceneType, name); scene.Parent = parent; scene.AddComponent <MailBoxComponent, MailboxType>(MailboxType.UnOrderMessageDispatcher); switch (scene.SceneType) { case SceneType.Realm: scene.AddComponent <NetOuterComponent, string>(startSceneConfig.OuterAddress); break; case SceneType.Gate: scene.AddComponent <NetOuterComponent, string>(startSceneConfig.OuterAddress); scene.AddComponent <PlayerComponent>(); scene.AddComponent <GateSessionKeyComponent>(); break; case SceneType.Map: scene.AddComponent <UnitComponent>(); break; case SceneType.Location: scene.AddComponent <LocationComponent>(); break; } return(scene); }
public Scene(SceneType sceneType) { this.SceneType = sceneType; }
public SceneLoadedEventArgs(SceneType scene) { Scene = scene; }
public void goToScene(MainGame mG, SceneType sT) { mG.gameState.ChangeScene(sT); }
private void HandleKeyboardShortcuts(KeyboardState keyState) { if (GamePad.GetState(PlayerIndex.One).Buttons.Back == ButtonState.Pressed) this.Exit(); if (keyState.IsKeyDown(Keys.R) && keyDelay.ElapsedMilliseconds > 400) { ResetScene(true); keyDelay.Restart(); } if (keyState.IsKeyDown(Keys.S) && keyDelay.ElapsedMilliseconds > 400) { currentScene = (SceneType) (((int) currentScene + 1)%2); ResetScene(true); keyDelay.Restart(); } if (keyState.IsKeyDown(Keys.D) && keyDelay.ElapsedMilliseconds > 400) { foreach (var object3D in this.scene.Objects) object3D.DebugLevel = (Object3D.DebugLevelType) (((int)object3D.DebugLevel + 1)%3); keyDelay.Restart(); } }
protected Scene(Session session, SceneType type) { Session = session; Type = type; }
public static void Update() { if(Window.Keyboard[OpenTK.Input.Key.E]) sceneType = SceneType.Emblems; else if(Window.Keyboard[OpenTK.Input.Key.N]) sceneType = SceneType.Numad; Scene.Update(); }
public static void LoadMainScene() { CurrentScene = SceneType.MainMenu; Application.LoadLevel("MainMenu"); }
//public IEnumerator StartGamemode(string gameMode) public IEnumerator StartGamemode(SceneType gameMode) { currentRoomSize = RoomSize; switch (gameMode) { case SceneType.Corrida: CorridaFade.SetActive(true); spawnHUBPoints.Value = 5; yield return(new WaitForSeconds(tempoPraFade)); DelayStartWaitingRoomController.minPlayerToStart = 2; DelayStartWaitingRoomController.tutorialMode = false; DelayStartWaitingRoomController.gameMode = gameMode; gameModeAtual = "Corrida"; if (PhotonNetwork.OfflineMode == false) { OnJoinRoomButton(gameModeAtual); } else { CreateRoomWithMode(gameModeAtual); } break; case SceneType.Coleta: ColetaFade.SetActive(true); spawnHUBPoints.Value = 1; yield return(new WaitForSeconds(tempoPraFade)); DelayStartWaitingRoomController.minPlayerToStart = 2; DelayStartWaitingRoomController.tutorialMode = false; DelayStartWaitingRoomController.gameMode = gameMode; gameModeAtual = "Coleta"; if (PhotonNetwork.OfflineMode == false) { OnJoinRoomButton(gameModeAtual); } else { CreateRoomWithMode(gameModeAtual); } break; case SceneType.Futebol: FutebolFade.SetActive(true); spawnHUBPoints.Value = 2; yield return(new WaitForSeconds(tempoPraFade)); currentRoomSize = 2; DelayStartWaitingRoomController.minPlayerToStart = 2; DelayStartWaitingRoomController.tutorialMode = false; DelayStartWaitingRoomController.gameMode = gameMode; gameModeAtual = "Futebol"; if (PhotonNetwork.OfflineMode == false) { OnJoinRoomButton(gameModeAtual); } else { CreateRoomWithMode(gameModeAtual); } break; case SceneType.Volei: VoleiFade.SetActive(true); spawnHUBPoints.Value = 4; yield return(new WaitForSeconds(tempoPraFade)); currentRoomSize = 2; DelayStartWaitingRoomController.minPlayerToStart = 2; DelayStartWaitingRoomController.tutorialMode = false; DelayStartWaitingRoomController.gameMode = gameMode; gameModeAtual = "Volei"; if (PhotonNetwork.OfflineMode == false) { OnJoinRoomButton(gameModeAtual); } else { CreateRoomWithMode(gameModeAtual); } break; case SceneType.Moto: MotoFade.SetActive(true); spawnHUBPoints.Value = 3; yield return(new WaitForSeconds(tempoPraFade)); DelayStartWaitingRoomController.minPlayerToStart = 2; DelayStartWaitingRoomController.tutorialMode = false; DelayStartWaitingRoomController.gameMode = gameMode; gameModeAtual = "Moto"; if (PhotonNetwork.OfflineMode == false) { OnJoinRoomButton(gameModeAtual); } else { CreateRoomWithMode(gameModeAtual); } break; default: //Caso padrão vai pro Tutorial ColetaFade.SetActive(true); spawnHUBPoints.Value = 1; yield return(new WaitForSeconds(tempoPraFade)); DelayStartWaitingRoomController.minPlayerToStart = 2; DelayStartWaitingRoomController.tutorialMode = false; DelayStartWaitingRoomController.gameMode = gameMode; gameModeAtual = "Tutorial"; if (PhotonNetwork.OfflineMode == false) { OnJoinRoomButton(gameModeAtual); } else { CreateRoomWithMode(gameModeAtual); } break; } }
/// <summary> /// 切换到LogOn场景 /// </summary> public void LoadLogOn() { m_CurtType = SceneType.LogOn; SceneManager.LoadScene("02UIRoot_Loading"); }
/// <summary> /// シーンのアンロード /// </summary> /// <param name="type"></param> public void UnloadScene(SceneType type, System.Action EndCallBack = null) { EndLoadCallback = EndCallBack; StartCoroutine(IESceneUnload(type, EndCallBack)); }
public void Push(SceneType scene) { _stack.AddLast(scene); while (_stack.Count > Capacity) _stack.RemoveFirst(); }
public static async ETTask <Scene> Create(Entity parent, string name, SceneType sceneType) { long id = IdGenerater.GenerateId(); return(await Create(parent, id, parent.DomainZone(), name, sceneType)); }
public void TransitScene(SceneType next) { StartCoroutine(TransitSceneCoroutine(next)); }
/// <summary> /// Internal method to handles scene unloads /// </summary> private async Task UnloadScenesInternal( IEnumerable <string> scenesToUnload, SceneType sceneType, float progressOffset = 0, float progressTarget = 1, bool sceneOpInProgressWhenFinished = false) { SetSceneOpProgress(true, progressOffset, sceneType); List <string> validNames = new List <string>(); List <int> validIndexes = new List <int>(); foreach (string sceneName in scenesToUnload) { // See if scene exists Scene scene; int sceneIndex; if (!RuntimeSceneUtils.FindScene(sceneName, out scene, out sceneIndex)) { Debug.LogError("Can't unload invalid scene " + sceneName); } else { validIndexes.Add(sceneIndex); validNames.Add(sceneName); } } int totalSceneOps = validIndexes.Count; if (totalSceneOps < 1) { Debug.LogWarning("No valid scenes found to unload."); SetSceneOpProgress(sceneOpInProgressWhenFinished, progressTarget, sceneType); return; } // Invoke our actions InvokeWillUnloadActions(validNames, sceneType); // Unload our scenes if (validIndexes.Count > 0) { List <AsyncOperation> unloadSceneOps = new List <AsyncOperation>(); foreach (int sceneIndex in validIndexes) { Scene scene = SceneManager.GetSceneByBuildIndex(sceneIndex); if (!scene.isLoaded) { continue; } AsyncOperation sceneOp = SceneManager.UnloadSceneAsync(sceneIndex); unloadSceneOps.Add(sceneOp); } // Now wait for all async operations to complete bool completedAllSceneOps = false; float sceneOpProgress = 0; while (!completedAllSceneOps) { if (!Application.isPlaying) { // Break out of this loop if we've stopped playmode return; } completedAllSceneOps = true; sceneOpProgress = 0; for (int i = 0; i < unloadSceneOps.Count; i++) { sceneOpProgress += unloadSceneOps[i].progress; completedAllSceneOps &= unloadSceneOps[i].isDone; } sceneOpProgress = Mathf.Clamp01(SceneOperationProgress / totalSceneOps); SetSceneOpProgress(true, Mathf.Lerp(progressOffset, progressTarget, sceneOpProgress), sceneType); await Task.Yield(); } } // Wait for all scenes to be fully unloaded before proceeding bool scenesUnloaded = false; while (!scenesUnloaded) { if (!Application.isPlaying) { // Break out of this loop if we've stopped playmode return; } scenesUnloaded = true; foreach (int sceneIndex in validIndexes) { Scene scene = SceneManager.GetSceneByBuildIndex(sceneIndex); scenesUnloaded &= !scene.isLoaded; } await Task.Yield(); } // Make sure our content tracker is refreshed contentTracker.RefreshLoadedContent(); // We're done! SetSceneOpProgress(sceneOpInProgressWhenFinished, progressTarget, sceneType); // Invoke our actions InvokeUnloadedActions(validNames, sceneType); }
private IEnumerator TransitSceneCoroutine(SceneType next) { yield return(new WaitForSeconds(FadeSwitch())); Application.LoadLevel((int)next); }
public NavigateAction(SceneType scene) { Scene = scene; }
public UIScene GetScene(SceneType type) { return(_scenes.FirstOrDefault(x => x.Type == type)); }
public StageSelect(GameObjectManager objectManager, ISceneManager sceneManager, SceneType sceneType) : base(objectManager, sceneManager, sceneType) { }
/// <summary> /// シーンの遷移 /// </summary> /// <param name="type"></param> /// <param name="param"></param> public void ChangeScene(SceneType type, object param = null) { Param = param; SceneManager.LoadScene((int)type); }
public static void LoadGameRoomScene() { CurrentScene = SceneType.GameRoom; Application.LoadLevel ("GameRoom"); }
/// <summary> /// 进入下一个场景 /// </summary> /// <param name="scenesEnumName">场景(枚举)名称</param> protected void EnterNextScenes(SceneType sceneName) { //转到下一个场景 GlobalParametersManager.NextSceneTYPE = sceneName; Application.LoadLevel(ConvertEnumToString.Instacne.GetSceneStrBySceneType(GlobalParametersManager.NextSceneTYPE)); }
public static void LoadLobbyScene() { CurrentScene = SceneType.Lobby; Application.LoadLevel("Lobby"); }
void OnDisableInitialMaskIfNeed() { changeSceneType = SceneType.NONE; CommonFSM.Instance.SendFsmNextEvent(); }
public static void LoadStartScene() { CurrentScene = SceneType.Start; Application.LoadLevel("Start"); }
public override void OnLeaveScenel(SceneType level, Action action = null) { base.OnLeaveScenel(level, action); }
/// <summary> /// 切换到MainCity场景 /// </summary> public void LoadMainCity() { m_CurtType = SceneType.MainCity; SceneManager.LoadScene("02UIRoot_Loading"); }
public scene.Scene CreateScene(SceneType type, PitchPitch parent, object arg = null) { if (_scenes == null) { _scenes = new Dictionary <SceneType, Scene>(); } Scene scene = null; if (_scenes.ContainsKey(type)) { scene = _scenes[type]; switch (type) { case SceneType.GameStage: (scene as scene.SceneGameStage).Map = arg as map.Map; break; case SceneType.Error: (scene as scene.SceneError).ErrorMessages = (string[])arg; break; } } else { switch (type) { case SceneType.Error: scene = new SceneError(); (scene as scene.SceneError).ErrorMessages = (string[])arg; break; case SceneType.Title: scene = new SceneTitle(); break; case SceneType.MapSelect: scene = new SceneMapSelect(); break; case SceneType.Option: scene = new SceneOption(); break; case SceneType.GameStage: scene = new SceneGameStage(arg as map.Map); break; case SceneType.GameOver: scene = new SceneGameOver(); break; default: return(null); } _scenes.Add(type, scene); } if (scene != null) { scene.Init(parent); } return(scene); }
internal SwitchRecorder(SceneType sceneType, params object[] sceneArgs) { this.sceneType = sceneType; this.sceneArgs = sceneArgs; }
void SwitchSceneVR( ) { TypeOfScene = SceneType.VR; SwitchScene(); }
public static extern Handle CreateSceneManager( Handle self, SceneType sceneType, [MarshalAs(UnmanagedType.LPStr)] String instanceName);
void SwitchSceneARVR( ) { TypeOfScene = SceneType.ARVR; SwitchScene(); }