public IEnumerator LibraryStartEvent() { // 실내에서 시작. 카메라 반전 cameraSystem.changeViewport(); // 플레이어 이동상태 잠금 characterMover.moveType = CharacterMover.MoveType.LOCK; Character.transform.localScale = new Vector3(-1, 1, 1); characterMover.myAnimator.SetBool("IsWalk", false); characterMover.myAnimator.SetBool("IsSit", true); // 페이드 인 효과 objFadeEfx.SetActive(true); FadeEfx.FadeIn(); // 2초 대기 yield return(new WaitForSeconds(2.0f)); // 수진이 플레이어를 부르는 대화 시작 //LibDialogue.TriggerDialogue(); dialogueManager.StartDialogue(Sujin1); yield return(new WaitUntil(() => dialogueManager.canvasObj.activeSelf == false)); dialogueManager.StartDialogue(JinHyung1); yield return(new WaitUntil(() => dialogueManager.canvasObj.activeSelf == false)); dialogueManager.StartDialogue(Sujin2); yield return(new WaitUntil(() => dialogueManager.canvasObj.activeSelf == false)); dialogueManager.StartDialogue(JinHyung2); yield return(new WaitUntil(() => dialogueManager.canvasObj.activeSelf == false)); // 페이드 아웃 인 FadeEfx.FadeOut(); characterMover.myAnimator.SetBool("IsSit", false); yield return(new WaitForSeconds(1.2f)); FadeEfx.FadeIn(); // 튜토리얼 패널 좌우 활성화 + 설명 다이얼로그 출력 tutorialPanel.OnLeftRight(); // 폰트 색 시스템 메시지 색상으로 변경 dialogueManager.textTalker.color = new Color(0.2f, 0.6f, 1); dialogueManager.textSentence.color = new Color(0.2f, 0.6f, 1); dialogueManager.textSentence.alignment = TextAnchor.UpperCenter; LibDialogue2.TriggerDialogue(); yield return(new WaitUntil(() => dialogueManager.canvasObj.activeSelf == false)); FindObjectOfType <Note>().AddMission("GoToRest"); tutorialPanel.OffLeftRight(); dialogueManager.textTalker.color = new Color(1, 1, 1); dialogueManager.textSentence.color = new Color(1, 1, 1); dialogueManager.textSentence.alignment = TextAnchor.UpperLeft; characterMover.moveType = CharacterMover.MoveType.COMMANDMOVE; yield break; }
private IEnumerator Transition(Scenes scene) { var canTransite = false; var asyncScene = SceneManager.LoadSceneAsync(scene.ToString()); asyncScene.allowSceneActivation = false; _transitionFade.FadeIn(() => canTransite = true); while (!canTransite) { yield return(null); } while (asyncScene.progress < 0.9f) { yield return(null); } asyncScene.allowSceneActivation = true; while (asyncScene.progress < 1f) { yield return(null); } EventSystem.GameController_Pause.Notify(); _transitionFade.FadeOut(() => EventSystem.GameController_Unpause.Notify()); }
void Start() { //페이드인 효과 fadeEffect.FadeIn(1f); //속도 userSpeed = user.GetComponent <User>().userSpeed; //닉네임표시 uiManager.GetComponent <UIManager>().setNickname(); //점수표시 uiManager.GetComponent <UIManager>().setPointText(); //목숨표시(Life만큼의 칸을 표시해줌) uiManager.GetComponent <UIManager>().updateLifeBar(); //음악퀴즈를 풀고 필드로 복귀한 경우 if (!Utils.userPosition.Equals(new Vector3(0, 0, 0))) { returnFromMusicQuiz(); } //마지막미션인 경우 if (Application.loadedLevelName.Equals("RiverScene")) { setBossCat(); } //배경음악 재생 soundManager.playBackgroundMusic(); }
IEnumerator ChapterStart() { CharacterMover playerMover = GameObject.FindGameObjectWithTag("Player").GetComponent <CharacterMover>(); playerMover.moveType = CharacterMover.MoveType.LOCK; StartUI.SetActive(true); text = StartUI.GetComponentInChildren <Text>(); yield return(StartCoroutine(StartTextFadeIn())); yield return(new WaitForSeconds(2.0f)); yield return(StartCoroutine(StartTextFadeOut())); StartUI.SetActive(false); objFadeEfx.SetActive(true); fadeEfx.FadeIn(); yield return(StartCoroutine(PartnerEvent())); playerMover.moveType = CharacterMover.MoveType.COMMANDMOVE; note.AddMission("Resque"); avDoor.enabled = false; yield break; }
void Start () { //Time.timeScale = 1; Map.Initialize (); timer = 0; waveTime = 0; ApplicationModel.currentEnemyNum = 0; myAudio = GetComponent<AudioSource>(); PlaySound(GAME_MUSIC); level = ApplicationModel.GetCurrentLevel(); wave = GetComponent<WaveController>(); wave.ReadFile(level.ID); next = wave.Next (); initWarning (); player = playerObject.GetComponent<Player>(); level.Start(); Debug.Log( "This level has been started "+level.GetTimesStarted()+" times."); Debug.Log( "This level has been played "+level.GetTimesPlayed()+" times."); fadeEffect = fader.GetComponent<FadeEffect> (); fadeEffect.FadeIn (); gameStartPlayed = false; }
void Start() { GameManager.Instance().SetNowScene(); isFading = false; fadeEfx = objFadeEfx.GetComponent <FadeEffect>(); objFadeEfx.SetActive(true); fadeEfx.FadeIn(); StartCoroutine("CameraMove"); }
private Vector3 _scaleChange; // scale of Tractor Beam void Start() { _scaleChange = new Vector3(-0.25f, -0.25f, -0.25f); transform.position = new Vector3(0, -12, 0); _spawnManager = GameObject.Find("Spawn Manager").GetComponent <SpawnManager>(); _uiManager = GameObject.Find("Canvas").GetComponent <UIManager>(); audioSource = GetComponent <AudioSource>(); _camera = GameObject.Find("Main Camera").GetComponent <CameraShaker>(); _gameManager = GameObject.Find("Game Manager").GetComponent <GameManager>(); _fadeEffect = GameObject.Find("CanvasFader").GetComponent <FadeEffect>(); _endOfLevelDialogue = GameObject.Find("DialoguePlayer").GetComponent <EndOfLevelDialogue>(); currentTractorBeam = 1000; tractorBeam.SetTractorBeam(currentTractorBeam); _canPlayerUseTractorBeam = false; currentCoreTemp = 0; thrustersCoreTemp.SetCoreTemp(currentCoreTemp); canPlayerUseThrusters = false; if (_spawnManager == null) { Debug.LogError("The Spawn Manager is null."); } if (_uiManager == null) { Debug.LogError("The UI Manager on the Canvas is null."); } if (audioSource == null) { Debug.LogError("The audio source is null."); } if (_camera == null) { Debug.LogError("The CameraShaker on the Main Camera is null."); } if (_gameManager == null) { Debug.Log("Game Manager is NULL."); } if (_endOfLevelDialogue == null) { Debug.Log("Dialogue Player is NULL."); } _gameManager.PlayMusic(1, 5.0f); _fadeEffect.FadeIn(); }
// Update is called once per frame void Update() { if (Input.GetKeyDown(KeyCode.I)) { _fadeEffect.FadeIn(); } if (Input.GetKeyDown(KeyCode.F)) { _fadeEffect.FadeOut(); } }
private void Start() { _gameManager = GameObject.Find("Game Manager").GetComponent <GameManager>(); _fadeEffect = GameObject.Find("CanvasFader").GetComponent <FadeEffect>(); if (_gameManager == null) { Debug.Log("Game Manager is NULL."); } _gameManager.PlayMusic(0, 7.0f); _fadeEffect.FadeIn(); }
// ------------------- CORROTINAS ------------------- // // Aplica efeito fade-in e muda cena private IEnumerator MudancaCena() { // Parametros e efeitos efeitoFade.FadeIn(); yield return(new WaitWhile(() => efeitoFade.BlackImage.color.a < 0.9f)); if (cenaDestino.Equals("Titulo")) { Destroy(gameController.gameObject); } SceneManager.LoadScene(cenaDestino); }
// Use this for initialization void Start () { //PlayerPrefs.DeleteAll(); // use this to delete all soomla's save menu int lastLevel = PlayerPrefs.GetInt(lastLevelKey); if(lastLevel == 0) lastLevel = 1; nowLevel = lastLevel; player.transform.position = LevelPosList [lastLevel]; moving = false; colliders = btnColliders.GetComponentsInChildren<Collider2D>() as Collider2D[]; SetMapUI(); fadeEffect = fader.GetComponent<FadeEffect>(); fadeEffect.FadeIn(); }
void OnGUI() { if (fade) { FadeEffect.FadeOut(); } if (!fade) { FadeEffect.FadeIn(); } if (mouselook) { MouseLook(); } }
IEnumerator Chapter1StartCutScene() { objFadeEfx.SetActive(true); fadeEfx.FadeIn(); dm.StartDialogue(dialogue1); yield return(new WaitUntil(() => dm.canvasObj.activeSelf == false)); objSiren.SetActive(true); dm.StartDialogue(dialogue2); yield return(new WaitUntil(() => dm.canvasObj.activeSelf == false)); fadeEfx.FadeOut(); yield return(new WaitForSeconds(4.0f)); SceneManager.LoadScene("Chapter1"); yield break; }
// ------------------- CORROTINAS ------------------- // private IEnumerator AcionarPorta() { // Efeito fade in efeitoFade.FadeIn(); audioController.PlayEffect(audioController.efeitoPorta, 1f); // Configuracoes // "WaitWhile (delegate)" = Vai esperar ate a condicao informada seja verdadeira yield return(new WaitWhile(() => efeitoFade.BlackImage.color.a < 0.9f)); player.gameObject.SetActive(false); Material material = (estaNoEscuro ? luz2D : padrao2D); player.MudarMaterial(material); player.transform.position = destino.position; player.gameObject.SetActive(true); // Efeito fade out efeitoFade.FadeOut(); }
private void Start() { _gameManager = GameObject.Find("Game Manager").GetComponent <GameManager>(); _fadeEffect = GameObject.Find("CanvasFader").GetComponent <FadeEffect>(); if (_gameManager == null) { Debug.Log("Game Manager is NULL (Instructions)."); } if (_fadeEffect == null) { Debug.Log("FadeEffect is NULL."); } _gameManager.PlayMusic(4, 7.0f); DefaultMsgSelected(); _letterDisplayDelay = 0.025f; _fadeEffect.FadeIn(); }
private void Start() { _gameManager = GameObject.Find("Game Manager").GetComponent <GameManager>(); _fadeEffect = GameObject.Find("CanvasFader").GetComponent <FadeEffect>(); audioSource = GetComponent <AudioSource>(); if (_gameManager == null) { Debug.Log("Game Manager is NULL (Options)."); } if (audioSource == null) { Debug.LogError("The audio source is null."); } SetDifficulty(_gameManager.difficultyLevel - 1); difficultyDropdown.SetValueWithoutNotify(_gameManager.difficultyLevel - 1); musicSlider.value = _gameManager.musicVolume; _fadeEffect.FadeIn(); }
private void Start() { _gameManager = GameObject.Find("Game Manager").GetComponent <GameManager>(); _fadeEffect = GameObject.Find("CanvasFader").GetComponent <FadeEffect>(); if (_gameManager == null) { Debug.Log("Game Manager is NULL (Main Menu)."); } if (_fadeEffect == null) { Debug.Log("FadeEffect is NULL."); } if (_gameManager.comingFromInstructionsScene == true) { _gameManager.PlayMusic(3, 2.5f); } _fadeEffect.FadeIn(); }
IEnumerator Swap() { isSwapping = true; if (isYang) // light to dark { sprite.GetComponent <Animator>().runtimeAnimatorController = controllers[0]; sprite.SetActive(false); yangPosition = character.transform.position; black.FadeIn(); yield return(new WaitForSeconds(1)); character.transform.position = yinPosition; black.FadeOut(); yield return(new WaitForSeconds(1)); sprite.SetActive(true); sprite.transform.localScale = new Vector2(3, 3); } else { sprite.GetComponent <Animator>().runtimeAnimatorController = controllers[1]; sprite.SetActive(false); yinPosition = character.transform.position; white.FadeIn(); yield return(new WaitForSeconds(1)); character.transform.position = yangPosition; white.FadeOut(); yield return(new WaitForSeconds(1)); sprite.SetActive(true); sprite.transform.localScale = new Vector2(0.8f, 0.8f); } isSwapping = false; isYang = !isYang; }
private void OnCollisionEnter(Collision collision) { GoalImage.gameObject.SetActive(true); GoalImage.FadeIn(); }
public void FadeIn(float duration) { StartCoroutine(_fadeEffect.FadeIn(duration)); }
public void FadeIn() { fadeEffect.gameObject.SetActive(true); fadeEffect.FadeIn(); }