private IEnumerator _CreateTutorialBoxSpawnAndDeliver(WaveInfo waveInfo) { return(Coroutines.Chain( Coroutines.IfCondition( x => !gm.playerGrabbedFirstBox, Coroutines.Chain( tutorialCanvas.DisplayCommand("Pick up that box to continue [LeftMouseClick or the \"A\" button]."), Coroutines.WaitFor(x => gm.playerGrabbedFirstBox), Coroutines.Join( tutorialCanvas.HideCommand(), tutorialCanvas.DisplayText("Good job!", 3.0f)))), Coroutines.IfCondition( x => !gm.playerInspectedFirstBox, Coroutines.Chain( tutorialCanvas.DisplayText("As you know, out city is distributed in districts. Each one of these conveyors...", 4.0f), tutorialCanvas.DisplayText("... delivers to a specific district. The district info can be found in the package labels.", 5.0f), tutorialCanvas.DisplayText("Now please, pay attention to the box.", 2.0f), tutorialCanvas.DisplayCommand( "Inspect the box to continue [RightMouseClick or the \"B\" button]."), Coroutines.WaitFor(x => gm.playerInspectedFirstBox || gm.playerCompletedFirstTask), Coroutines.IfCondition( x => !gm.playerCompletedFirstTask, Coroutines.Join( Coroutines.Chain( tutorialCanvas.HideCommand(), tutorialCanvas.DisplayCommand("Zoom in / out [MouseScrollWheel or the Left/right triggers].")), Coroutines.Chain( tutorialCanvas.DisplayText("Good job!", 2.0f), tutorialCanvas.DisplayText("But be careful, because sometimes the packages are redirected and have to go through another district.", 5.0f)))))), Coroutines.IfCondition( x => !gm.playerCompletedFirstTask, Coroutines.Chain( Coroutines.Wait(0.5f), tutorialCanvas.DisplayCommand("Drop it in the correct conveyor"), Coroutines.WaitFor(x => gm.playerCompletedFirstTask), tutorialCanvas.HideCommand())))); }
private IEnumerator _CreateTutorialDifferentDisplayGarbage() { return(Coroutines.Chain( Coroutines.IfCondition( x => !gm.tutorialDifferentDisplaysExplained, Coroutines.Chain( tutorialCanvas.DisplayText("Sometimes we also deliver based on priorities. Look at the screens above the conveyors...", 5.0f), Coroutines.Wrap(() => gm.SwapDisplays()), Coroutines.Wait(5.0f), Coroutines.Wrap(() => gm.tutorialDifferentDisplaysExplained = true))), tutorialCanvas.DisplayCommand("Drop it in the correct conveyor [LeftMouseClick or the \"A\" button]."), Coroutines.WaitFor(x => gm.playerCompletedSecondtask), tutorialCanvas.HideCommand())); }
private void CreateTutorialDifferentDisplayGarbage() { gm.playerCompletedFirstTask = true; WaveInfo waveInfo = new WaveInfo { minNumberOfBoxes = 1, maxNumberOfBoxes = 2, minNumberOfDecals = 1, maxNumberOfDecals = 2, spawnAfterSeconds = 0.0f, canSpawnGarbage = false, canSpawnCrossedLabel = false, districtCode = "B" }; WaveInfo garbage = new WaveInfo { minNumberOfBoxes = 1, maxNumberOfBoxes = 2, minNumberOfDecals = 1, maxNumberOfDecals = 2, spawnAfterSeconds = 0.0f, canSpawnGarbage = true, canSpawnCrossedLabel = false, districtCode = "E" }; StartCoroutine(Coroutines.Chain( Coroutines.Wrap(() => spawner.SpawnBoxes(waveInfo)), _CreateTutorialDifferentDisplayGarbage(), Coroutines.Wrap(() => { if (!gm.playerCompletedSecondTaskSuccessful) { gm.playerCompletedSecondtask = false; StartCoroutine(Coroutines.Chain( Coroutines.Wait(2.0f), tutorialCanvas.DisplayText("... Ok, let's try again.", 2.0f), Coroutines.Wait(1.0f), Coroutines.Wrap(() => CreateTutorialDifferentDisplayGarbage()) )); return; } else { StartCoroutine(Coroutines.Chain( Coroutines.Join( Coroutines.Wrap(() => spawner.SpawnBoxes(garbage)), tutorialCanvas.DisplayText("Good job!", 3.5f)), tutorialCanvas.DisplayText("Now...", 3.0f), tutorialCanvas.DisplayText("... How did that got here? Please, get rid of any goods you find that are not properly labeled.", 5.0f), Coroutines.WaitFor(x => gm.playerCompletedThirdTask), Coroutines.IfCondition( x => !gm.playerCompletedThirdTaskSuccessful, tutorialCanvas.DisplayText("Oh god...", 2.0f)), tutorialCanvas.DisplayText("Congratulations! You've passed the trial period with great results.", 4.0f), tutorialCanvas.DisplayText("And because of that, we are going to heat the things up a little bit.", 4.0f), tutorialCanvas.DisplayText("Oh, and by the way - I don't like messes. So keep this place in order or you are fired.", 5.0f), Coroutines.Wrap(() => EndTutorial()))); } }))); }