public static StartAlphaFade ( Color newScreenOverlayColor, bool isFadeIn, float fadeDuration ) : void | ||
newScreenOverlayColor | Color | /// Target screen overlay Color. /// |
isFadeIn | bool | |
fadeDuration | float | /// Fade duration. /// |
Résultat | void |
void FinishGivePiece() { collectable_UI.onFinish -= FinishGivePiece; collectable_UI.gameObject.SetActive(false); SaveManager.Instance.LevelCollectableLoaded = Application.loadedLevelName; if (posToShow == -1) { SaveManager.Instance.LevelToLoadVideoCollectable = SaveManager.Instance.LevelToLoadCollectable; } else { if (CollectablesManager.isCollectableReady(TypeLevel)) { if (CollectablesManager.isCollectableFull(TypeLevel)) { SaveManager.Instance.LevelToLoadVideoCollectable = Door.NextScene; } else { SaveManager.Instance.LevelToLoadVideoCollectable = SaveManager.Instance.LevelToLoadCollectable; } } } CameraFade.StartAlphaFade(Color.black, false, 0.2f); CameraFade.Instance.m_OnFadeFinish += LoadLevel; }
void Update() { if (battingResult == BattingResult.CHANGE && Input.GetMouseButtonDown(0)) { CameraFade.StartAlphaFade(Color.black, false, 0.5f, 0, () => { Application.LoadLevel("Title"); }); } }
// Update is called once per frame void Update() { waitUpdate += 1; waitUpdate %= 10; if (waitUpdate == 1) { StaticManager.updateAvailableStage(); getStaticData(); updateMaterial(); } if (onMouse) { if (Input.GetMouseButtonDown(0) && StaticManager.stageAvailable[level - 1, stage - 1]) { if (stageExist && !Input.GetKey(KeyCode.LeftShift)) { string stageName = "Stage-" + level.ToString() + "," + stage.ToString(); TitlePhaseController.phase = "Game"; CameraFade.StartAlphaFade(Color.white, false, 1f, 0f, () => { Application.LoadLevel(stageName); }); } else { StaticManager.stageClear[level - 1, stage - 1] = true; StaticManager.saveData(); } } } }
private void OnPlayerDied(PlayerType param) { _advanceCountdown = advanceLevelDelayLevelDeath; _nextLevelName = _levelSequence[_currentLevel]; CameraFade.StartAlphaFade(Color.black, false, _advanceCountdown, 2f, () => { Application.LoadLevel(_nextLevelName); }); }
public void OpenSceneWithFader() { CameraFade.StartAlphaFade(Color.black, false, 1f, 0f, () => { SceneManager.LoadScene(sceneIndex); }); }
void Start() { CameraFade.StartAlphaFade(Color.black, true, 3f, 0f); if (_instance != null) { Destroy(gameObject); return; } for (var i = 0; i < _levelSequence.Length; i++) { if (_levelSequence[i] == Application.loadedLevelName) { _currentLevel = i; } } _instance = this; Object.DontDestroyOnLoad(this); GameEventMgr.Instance.AddListener <PlayerType>(GameEvents.PlayerFinishedLevel, OnFinishedLevel); GameEventMgr.Instance.AddListener <PlayerType>(GameEvents.PlayerDied, OnPlayerDied); GameEventMgr.Instance.AddListener(GameEvents.PlayerHitMaxFear, OnPlayerHitMaxFear); }
void Update() { if (Input.GetKeyDown("x")) { CameraFade.StartAlphaFade(Color.black, false, 1f, 0f, () => { GameState.Instance.loadStartScreen(); }); } }
// Use this for initialization void Start() { pathFollower = transform.parent.GetComponent <PathFollower>(); pathFollower.path = paths[currentPath]; ball = GameObject.Find("DisplayBall"); CameraFade.StartAlphaFade(Color.black, true, 5); }
public void ChangeLevel() { CameraShake.Instance.StopShake(); Time.timeScale = 1; CameraFade.StartAlphaFade(Color.black, false, 0.2f); CameraFade.Instance.m_OnFadeFinish += ActivateLevel; }
void Start() { CameraFade.StartAlphaFade(Color.black, true, .5f); transform.position = currentCam.position; transform.rotation = currentCam.rotation; GetComponent <Camera> ().orthographicSize = currentCam.orthographicSize; }
// Update is called once per frame void Update() { if (!fadeInStarted) { CameraFade.StartAlphaFade(Color.black, true, 2f, 0f, () => { fadeInCompleted = true; }); fadeInStarted = true; } else { if (Application.CanStreamedLevelBeLoaded(1) && fadeInCompleted) { if (!fadeOutStarted) { GameState.Instance.WaitThenCall(0.5f, () => { CameraFade.StartAlphaFade(Color.black, false, 2f, 0f, () => { GameState.Instance.loadStartScreen(); }); fadeOutStarted = true; }); } tinyBar.transform.localScale = new Vector3(1, 1, 1); } else { Vector3 progTransform = new Vector3(Application.GetStreamProgressForLevel(1), 1, 1); tinyBar.transform.localScale = progTransform; } } }
IEnumerator EnterPortal(float time) { yield return(StartCoroutine(new TimeCallBacks().WaitPause(time))); CameraFade.StartAlphaFade(Color.black, false, 0.2f); CameraFade.Instance.m_OnFadeFinish += LoadLevel; }
public void GoToMain() { CameraFade.StartAlphaFade(Color.black, false, 1f, 0f, () => { Debug.Log("Opening Scene"); SceneManager.LoadScene(0); }); }
// Use this for initialization void Start() { LoadingAnimation.Color = GlobalData.Instance.SolidColors[GlobalData.Instance.GameMode]; PersistentUtility.Instance.PeriodHashObtained += OnPeriodHashObtained; CameraFade.StartAlphaFade(Color.white, true, 1f, 0, () => { StartCoroutine(PersistentUtility.Instance.GetPeriodHash()); }); }
public static void SceneSwitch(int index) { //OnFinishFade callback = GameManager.i.LoadLevel (index); //callback (index); CameraFade.StartAlphaFade(Color.black, false, 1f); GameManager.manager.StartCoroutine(LoadLevel(index)); //GameManager.i.LoadLevel (index); }
public void exitGameYes() { SaveManager.Instance.Save(); SteamAPI.Shutdown(); CameraFade.StartAlphaFade(Color.black, false, 0.2f, 0.2f); StartCoroutine(WaitSeconds()); CameraFade.Instance.m_OnFadeFinish += QuitGame; }
public void NewGameYes() { SaveManager.Instance.SetHistory(); SaveManager.Instance.dataKlaus.SetCurrentLevel("W1L01-1"); CameraFade.StartAlphaFade(Color.black, false, 0.2f, 0.2f); CameraFade.Instance.m_OnFadeFinish += ActivateManualty; }
IEnumerator Splash() { yield return(new WaitForSeconds(secondsToWait)); CameraFade.StartAlphaFade(Preferences.BgColor(), false, 2f, 0f, () => { SceneManager.LoadScene(nextLevel); }); }
private void LoadRaceCallback(LoadRaceMessage msg, float travelTime) { StopLobbyTimer(); CameraFade.StartAlphaFade(Color.black, false, 0.3f, 0.05f, () => { GoToStage(); }); }
/*void OnGUI () { * if(fuelUsed >0){ * GUI.Label(new Rect (10, 60, 100, 20), "Fuel Used: " +fuelUsed); * } * }*/ void OnLevelWasLoaded() { LoadCheckPoints(); SaveState(); Application.targetFrameRate = 50; CameraFade.StartAlphaFade(Color.black, true, 1.2f, 0f, () => { }); }
public void GoToScene(int i) { CameraFade.StartAlphaFade(Color.black, false, 1f, 0f, () => { Debug.Log("Opening Scene: " + i); SceneManager.LoadScene(i); }); }
public void Die() { this.transform.position = new Vector3(999999.9f, 999999.9f); CameraFade.StartAlphaFade(Color.black, false, 2f, 0f, () => { SceneManager.LoadScene(this.actualLevel); }); }
/// <summary> /// Update this instance. /// </summary> void Update() { // Use last device which provided input. inputDevice = InputManager.ActiveDevice; if (inputDevice.Action1.WasPressed) { switch (selected) { case Selected.Done: default: // Load the next level CameraFade.StartAlphaFade(Color.black, false, 1.5f, 0.0f, () => { // Hide the stats UI GameController.controller.hideStats(); // Enable the ability to pause GameController.controller.enablePause(); // Enable control again GameController.controller.setControllable(true); if (nextLevel == "NinjaMorph") { Destroy(GameController.instance); } Application.LoadLevel(nextLevel); }); break; } } switch (selected) { case Selected.Done: default: gameObject.GetComponent <PulseText>().selected = this.name == "DoneButton"; break; } /* Not necessary currently * movementTrigger += deltaTime; * // Handle transitioning between the selected menu items * if (movementTrigger < 0.25f) * return; * if (inputDevice.DPadDown.WasPressed || * inputDevice.LeftStick.Down.WasPressed) * { * movementTrigger = 0.0f; * if (selected == Selected.Restart) * selected = Selected.MainMenu; * } * if (inputDevice.DPadUp.WasPressed || * inputDevice.LeftStick.Up.WasPressed) * { * movementTrigger = 0.0f; * if (selected == Selected.MainMenu) * selected = Selected.Restart; * } */ }
/* * * Destination : the position to translate to * Delay : when to do it * BlackscreenDuration : time of black * Onfinish : Action to do on finish * */ public void transalateWithFade(Vector3 destination, float delay, float fadeiInDuration, float fadeOutDuration, float blackScreenDuration, Action Onfinish) { CameraFade.StartAlphaFade(Color.black, false, fadeiInDuration, delay, () => { this.gameCamera.transform.Translate(destination); CameraFade.StartAlphaFade(Color.black, true, fadeOutDuration, blackScreenDuration, () => { Onfinish(); }); }); }
void OnMouseDown() { this.audioSource[0].clip = soundSelect; this.audioSource[0].Play(); bgmFade = true; CameraFade.StartAlphaFade(Color.black, false, 0.5f, 0.2f, () => { SceneManager.LoadScene("Title"); }); }
IEnumerator restart() { fallingOut = true; CameraFade.StartAlphaFade(Color.black, false, 1f, 0f); setRestartPlayerData(); CameraFade.StartAlphaFade(Color.black, true, 1f, 0f); fallingOut = false; yield return(null); }
public IEnumerator RestartBall() { yield return(new WaitForSeconds(ResetDelay)); started = false; rb.constraints = RigidbodyConstraints.FreezeAll; CameraFade.StartAlphaFade(Color.black, false, 2f, 2f, () => { SceneManager.LoadScene("Scene6_Score"); }); moveTimer = 0.0f; }
public void LoadMemory(string name) { SaveManager.Instance.SetHistory(); SaveManager.Instance.comingFromHistoryArcadeMode = true; SaveManager.Instance.comingFromMemoryMode = true; //SaveManager.Instance.dataKlaus.SetCurrentLevel(name); m_levelToLoad = name; CameraFade.StartAlphaFade(Color.black, false, 0.2f, 0.2f); CameraFade.Instance.m_OnFadeFinish += LoadLevel; }
void Update() { if (Input.GetButtonDown("Escape")) { if (Application.loadedLevelName != "MainMenu") { CameraFade.StartAlphaFade(Color.black, false, 2f, 0f, () => { Application.LoadLevel("MainMenu"); }); } } }
void OnTriggerExit(Collider other) { if (other.gameObject.tag == "PlayerModel") { //カメラフェードクラスを使用 CameraFade.StartAlphaFade(Color.white, false, 2f, 0f, () => { Application.LoadLevel("Stage" + NextStageNum); }); } }