private IEnumerator OnInteractWithLanternSequence() { _stateManager.CanMove = false; Light2D fallingLight = fallingLantern.GetComponentInChildren <Light2D>(); Light2D characterLight = _mainCharacter.GetComponentInChildren <Light2D>(); CharacterManager characterManager = _mainCharacter.GetComponentInChildren <CharacterManager>(); yield return(GlobalSpeechManager.MainCharacterSay("What's this?", 2f)); yield return(Transition.Transition.TransitionFloat(lanternGetDuration, fallingLight.intensity, fallingLight.intensity, 0, newIntensity => fallingLight.intensity = newIntensity)); Destroy(fallingLantern); StartCoroutine(Transition.Transition.TransitionColor(lanternGetDuration, characterManager.startingColor, characterManager.color, newColor => characterManager.SetColor(newColor))); yield return(Transition.Transition.TransitionFloat(lanternGetDuration, .8f, 0, 1f, newIntensity => characterLight.intensity = newIntensity)); _stateManager.CanMove = true; yield return(new WaitForSeconds(3f)); fallingBox.GetComponent <Rigidbody2D>().bodyType = RigidbodyType2D.Dynamic; yield return(GlobalSpeechManager.MainCharacterSay("Can everyone please stop dropping stuff on me?", 5f, 1f)); }
private IEnumerator StartOfTheGameHasJumpedSequence() { if (!_debug.skipMonologue) { yield return(GlobalSpeechManager.MainCharacterSay("So this looks like a prison.", 2f, waitBeforeFirstThoughts)); yield return(GlobalSpeechManager.MainCharacterSay( "Set up in a way that makes escape possible, but challenging.", 5f, 3f)); yield return(GlobalSpeechManager.MainCharacterSay("Still, I can't seem to get up there.", 3f, 3f)); yield return(GlobalSpeechManager.MainCharacterSay( "I hope a certain developer didn't screw up the actual beginning of the game.", 6f, 3f)); yield return(new WaitForSeconds(waitBeforeFallingObjects)); } fallingLantern.GetComponent <Rigidbody2D>().bodyType = RigidbodyType2D.Dynamic; yield return(GlobalSpeechManager.MainCharacterSay("Wat", 2f, 1f)); }
public void Invoke() { GlobalSpeechManager.CharacterSayNow(characterName, line, duration); }