public override void OnEnter() { base.OnEnter(); Services.GameManager.EndCutscene(); FModMusicManager.PlayTrack("End"); // TRIGGER END CUTSCENE. }
public override void OnEnter() { ((MainQuest)Context).SetCurrentQuestLog(((MainQuest)Context).ConstructLogString()); base.OnEnter(); if (!Services.SaveManager.loadingSave) { Services.GameManager.MidrollCutscene(); FModMusicManager.PlayTrack("Layer 3"); } }
public override void OnEnter() { base.OnEnter(); QuestManager.AdvanceQuest(Str.Warbler); QuestManager.AdvanceQuest(Str.Frog); QuestManager.AdvanceQuest(Str.Turtle); FModMusicManager.PlayTrack("Layer 1"); if (!Services.SaveManager.loadingSave) { Services.SaveManager.SaveData(); } }
public override void AttachToTransform(Transform newParent) { transform.position = newParent.position; transform.rotation = newParent.rotation; transform.parent = newParent; beingHeld = true; _animator.SetBool(Str.Held, true); _emitter.Stop(); if (!pickedUpAlready) { FModMusicManager.FoundItem(); pickedUpAlready = true; } }
private IEnumerator EndCredits() { FModMusicManager.Init(); FModMusicManager.StartFoxTheme(); yield return(new WaitForSeconds(2f)); float elapsed = 0; float duration = 75f; while (elapsed < duration) { elapsed += Time.deltaTime; textHolder.transform.position = textHolder.transform.position + movement * Time.deltaTime; yield return(null); } NextScene(); }
private static Task DefineEndSequence() { ActionTask firstSequence = new ActionTask(() => { Services.UIManager.CutsceneFadeIn(); inCutscene = true; }); Task waitForTime1 = new WaitTask(2f); ActionTask secondSequence = new ActionTask(() => { Services.UIManager.CutsceneFadeOut(); Services.UIManager.HideAllUI(); PlayerAnimation.Sitting(true); FModMusicManager.EndCutscene(); cutsceneObjectsManager.EndNPCs(); }); Task waitForTime2 = new WaitTask(14f); ActionTask thirdSequence = new ActionTask(() => { Services.UIManager.CutsceneFadeIn(); }); Task waitForTime3 = new WaitTask(4f); Task endGame = new ActionTask(() => { inCutscene = false; FModMusicManager.EndMusicLayers(); UnityEngine.SceneManagement.SceneManager.LoadScene(2); }); firstSequence.Then(waitForTime1).Then(secondSequence).Then(waitForTime2).Then(thirdSequence).Then(waitForTime3).Then(endGame); return(firstSequence); }
public override void OnEnter() { Logger.Debug("GameManager: Entered StartPlay"); FModMusicManager.EndFoxTheme(); }
/* * 1. Move player to position. Move camera behind player. ~2s * 2. Move Camera to cutsceneCamera, have camera slowly focus on item. Make player walk to tree. ~2s * 3. Trigger Quest item repository to take item, trigger sounds and particle effects, smoothly animate it into position and have large particle effect. 2s * 4. Fade to white? black? 2s * 5. stay there for a sec as music fades. Place player into new position. 3s * 6. Fade back in and have player turned around as environment changes are triggered. 2s * 7. 1 sec later have player get up and return to normal controls. 1s // turns around! */ private static Task DefineMidSequence() { // 1. Move player to position. Move camera behind player. ~2s Task enterSequence = new DelegateTask(() => { inCutscene = true; }, () => { Services.UIManager.HideItemPickupPrompt(); return(Services.PlayerMovement.inPlaceForSequence); }); Task waitForTime1 = new WaitTask(1f); // 2. Move Camera to cutsceneCamera, have camera slowly focus on item. Make player walk to tree. ~2s Task secondSequence = new DelegateTask(() => { // Trigger particles? // Trigger music? }, () => { Services.UIManager.HideItemPickupPrompt(); return(Services.PlayerMovement.inPlaceForSequence); }); Task dropItem = new ActionTask(() => { Services.PlayerItemHolder.DropItem(); }); Task waitForTime2 = new WaitTask(.66f); // 3.Trigger Quest item repository to take item, trigger sounds and particle effects, smoothly animate it into position and have large particle effect. 2s ActionTask thirdSequence = new ActionTask(() => { Services.QuestItemRepository.StartSequence(); FModMusicManager.ReturnedItem(); // Quest item Repository takes Item. // trigger other stuff. }); // Add in phase here to show plants growing????????????????????????????????????? Task waitForTime3 = new WaitTask(1.5f); // 4. Fade to white? black? 2s ActionTask fourthSequence = new ActionTask(() => { // Fade out? Services.UIManager.CutsceneFadeIn(); }); // 5. stay there for a sec as music fades. Place player into new position. 3s Task waitForTime4 = new WaitTask(4.5f); // 6. Fade back in and have player turned around as environment changes are triggered. 2s ActionTask fifthSequence = new ActionTask(() => { Services.PostProcessingManager.AdvanceStage(); PlayerAnimation.Sitting(true); // Fade in? Services.UIManager.CutsceneFadeOut(); Services.UIManager.HideDialogueEnterPrompt(); }); Task waitForTime5 = new WaitTask(1f); ActionTask triggerPlantAnims = new ActionTask(() => { cutsceneObjectsManager.Transition(); }); Task waitForTime6 = new WaitTask(10.5f); // 7. 1 sec later have player get up and return to normal controls. 1s ActionTask sixthSequence = new ActionTask(() => { PlayerAnimation.Sitting(false); NPCInteractionManager.FindClosestNPC(); Services.GameManager.EnterDialogue(); inCutscene = false; }); enterSequence.Then(waitForTime1).Then(secondSequence).Then(dropItem).Then(waitForTime2).Then(thirdSequence).Then(waitForTime3).Then(fourthSequence).Then(waitForTime4).Then(fifthSequence).Then(waitForTime5).Then(triggerPlantAnims).Then(waitForTime6).Then(sixthSequence); return(enterSequence); }
private void NextScene() { FModMusicManager.EndFoxThemeCredits(); FModMusicManager.OnDestroy(); SceneManager.LoadScene(0); }