/* * Tutorial.script * Authors: * Copyright (c) 2007-2008 Cornell University This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ // The tutorial for Stellar Prospector System.Collections.Generic.List sections = new System.Collections.Generic.List(); System.Collections.Generic.List Dialogs; Util.DialogScreen Dialogscreen; StellarProspector.TutorialSection.Code init; StellarProspector.TutorialSection.Code deinit; StellarProspector.TutorialSection.Check check; // Section 1 init = delegate(Util.GameScreen ts) { int screenWidth = ts.GraphicsDevice.Viewport.Width; int screenHeight = ts.GraphicsDevice.Viewport.Height; ((StellarProspector.StellarProspectorGameScreen)game).TutorialEventSelect(0); }; deinit = delegate(Util.GameScreen ts) { ((StellarProspector.StellarProspectorGameScreen)game).TutorialEventSelect(1); }; Dialogs = new System.Collections.Generic.List(); Dialogs.Add(new Util.Dialog("CDR NOVAH", "Your colony needs iron ore. You can collect this ore by using the " + ((StellarProspector.StellarProspectorGameScreen)game).GetGrabbingKey() + " to pull iron-rich asterioids into the ore processor.", "Portraits/CDRNovah", Util.Corner.BottomRight, 0, true)); Dialogscreen = new Util.DialogScreen(Dialogs); sections.Add( new StellarProspector.TutorialSection(init, deinit, Dialogscreen, null) ); // Section 2 init = delegate(Util.GameScreen ts) { ((StellarProspector.StellarProspectorGameScreen)game).TutorialPeripheral = true; }; deinit = delegate(Util.GameScreen ts) { ((StellarProspector.StellarProspectorGameScreen)game).TutorialEventSelect(2); }; check = delegate(Util.GameScreen ts) { return !((StellarProspector.StellarProspectorGameScreen)game).TutorialPeripheral; }; Dialogs = new System.Collections.Generic.List(); Dialogs.Add(new Util.Dialog("CDR NOVAH", "Try pressing the " + ((StellarProspector.StellarProspectorGameScreen)game).GetGrabbingKey() + " now to grab that iron that just appeared.", "Portraits/CDRNovah", Util.Corner.BottomRight, 0, false)); Dialogscreen = new Util.DialogScreen(Dialogs); sections.Add( new StellarProspector.TutorialSection(init, deinit, Dialogscreen, check) ); // Section 3 // show a highlighted sector init = delegate(Util.GameScreen ts) { ((StellarProspector.StellarProspectorGameScreen)game).SetCueVisibility(true); }; deinit = delegate(Util.GameScreen ts) { ((StellarProspector.StellarProspectorGameScreen)game).TutorialEventSelect(3); }; Dialogs.Clear(); Dialogs.Add(new Util.Dialog("CDR NOVAH", "Your early-warning radar puts a red outline round the sector with the most ore.", "Portraits/CDRNovah", Util.Corner.BottomRight, 0, true)); Dialogscreen = new Util.DialogScreen(Dialogs); sections.Add( new StellarProspector.TutorialSection(init, deinit, Dialogscreen, null) ); // Section 4 // show ore appearing in this highlighted sector, wait for a while, // then show the ore being collected Dialogs.Clear(); Dialogs.Add(new Util.Dialog("CDR NOVAH", "So when you see red around a sector, get ready to grab some ore in that sector.", "Portraits/CDRNovah", Util.Corner.BottomRight, 0, true)); Dialogscreen = new Util.DialogScreen(Dialogs); sections.Add( new StellarProspector.TutorialSection(null, null, Dialogscreen, null) ); // Section 4 animation init = delegate(Util.GameScreen ts) { ((StellarProspector.StellarProspectorGameScreen)game).SpawnPeripheralInsideCue(); ((StellarProspector.StellarProspectorGameScreen)game).ReadyDelayGrab(2f); }; deinit = delegate(Util.GameScreen ts) { ((StellarProspector.StellarProspectorGameScreen)game).TutorialEventSelect(4); }; check = delegate(Util.GameScreen ts) { return ((StellarProspector.StellarProspectorGameScreen)game).StimulusDead(); }; sections.Add( new StellarProspector.TutorialSection(init, deinit, null, check) ); // Section 5 // show ore outside the highlighted sector, wait for a while, // then show the ore being collected Dialogs.Clear(); Dialogs.Add(new Util.Dialog("CDR NOVAH", "You might occasionally see ore appearing in other sectors, too.", "Portraits/CDRNovah", Util.Corner.BottomRight, 0, true)); Dialogscreen = new Util.DialogScreen(Dialogs); sections.Add( new StellarProspector.TutorialSection(null, null, Dialogscreen, null) ); // Section 5 animation init = delegate(Util.GameScreen ts) { ((StellarProspector.StellarProspectorGameScreen)game).SpawnPeripheralOutsideCue(); ((StellarProspector.StellarProspectorGameScreen)game).ReadyDelayGrab(2f); }; deinit = delegate(Util.GameScreen ts) { ((StellarProspector.StellarProspectorGameScreen)game).TutorialEventSelect(5); }; check = delegate(Util.GameScreen ts) { return ((StellarProspector.StellarProspectorGameScreen)game).StimulusDead(); }; sections.Add( new StellarProspector.TutorialSection(init, deinit, null, check) ); // Section 6 // show a quick ore collection and the concomitant energy boost Dialogs.Clear(); Dialogs.Add(new Util.Dialog("CDR NOVAH", "Because asteroids phase out after appearing, the faster you press the " + ((StellarProspector.StellarProspectorGameScreen)game).GetGrabbingKey() + " the more ore you collect.", "Portraits/CDRNovah", Util.Corner.BottomRight, 0, true)); Dialogscreen = new Util.DialogScreen(Dialogs); sections.Add( new StellarProspector.TutorialSection(null, null, Dialogscreen, null) ); // Section 6 animation init = delegate(Util.GameScreen ts) { ((StellarProspector.StellarProspectorGameScreen)game).SpawnPeripheralInsideCue(); ((StellarProspector.StellarProspectorGameScreen)game).ReadyDelayGrab(1f); }; deinit = delegate(Util.GameScreen ts) { ((StellarProspector.StellarProspectorGameScreen)game).AddAutoGrabProgress(); ((StellarProspector.StellarProspectorGameScreen)game).TutorialEventSelect(6); }; check = delegate(Util.GameScreen ts) { return ((StellarProspector.StellarProspectorGameScreen)game).StimulusDead(); }; sections.Add( new StellarProspector.TutorialSection(init, deinit, null, check) ); // Section 7 // then show a slow ore collection and the lesser boost Dialogs.Clear(); Dialogs.Add(new Util.Dialog("CDR NOVAH", "Likewise, the slower you press the " + ((StellarProspector.StellarProspectorGameScreen)game).GetGrabbingKey() + " the less ore you collect.", "Portraits/CDRNovah", Util.Corner.BottomRight, 0, true)); Dialogscreen = new Util.DialogScreen(Dialogs); sections.Add( new StellarProspector.TutorialSection(null, null, Dialogscreen, null) ); // Section 7 animation init = delegate(Util.GameScreen ts) { ((StellarProspector.StellarProspectorGameScreen)game).SpawnPeripheralInsideCue(); ((StellarProspector.StellarProspectorGameScreen)game).ReadyDelayGrab(3f); }; deinit = delegate(Util.GameScreen ts) { ((StellarProspector.StellarProspectorGameScreen)game).AddAutoGrabProgress(); ((StellarProspector.StellarProspectorGameScreen)game).TutorialEventSelect(7); }; check = delegate(Util.GameScreen ts) { return ((StellarProspector.StellarProspectorGameScreen)game).StimulusDead(); }; sections.Add( new StellarProspector.TutorialSection(init, deinit, null, check) ); // Section 8 deinit = delegate(Util.GameScreen ts) { ((StellarProspector.StellarProspectorGameScreen)game).TutorialEventSelect(8); }; Dialogs.Clear(); Dialogs.Add(new Util.Dialog("CDR NOVAH", "So when you see an asteroid, grab it as fast as you can.", "Portraits/CDRNovah", Util.Corner.BottomRight, 0, true)); Dialogscreen = new Util.DialogScreen(Dialogs); sections.Add( new StellarProspector.TutorialSection(null, deinit, Dialogscreen, null) ); // Section 9 // show the energy bar ticking down - show multiple ticks to be sure it's noticed Dialogs.Clear(); Dialogs.Add(new Util.Dialog("CDR NOVAH", "Although collecting good ore gives you more energy, using the ore-grabber takes away some of your energy.", "Portraits/CDRNovah", Util.Corner.BottomRight, 0, true)); Dialogscreen = new Util.DialogScreen(Dialogs); sections.Add( new StellarProspector.TutorialSection(null, null, Dialogscreen, null) ); // Section 9 animation init = delegate(Util.GameScreen ts) { ((StellarProspector.StellarProspectorGameScreen)game).ReadyProgressDrain(); }; deinit = delegate(Util.GameScreen ts) { ((StellarProspector.StellarProspectorGameScreen)game).TutorialEventSelect(9); }; check = delegate(Util.GameScreen ts) { return !((StellarProspector.StellarProspectorGameScreen)game).ProgressDrain; }; sections.Add( new StellarProspector.TutorialSection(init, deinit, null, check) ); // Section 10 deinit = delegate(Util.GameScreen ts) { ((StellarProspector.StellarProspectorGameScreen)game).TutorialEventSelect(10); }; Dialogs.Clear(); Dialogs.Add(new Util.Dialog("CDR NOVAH", "So, during the game, don't press the " + ((StellarProspector.StellarProspectorGameScreen)game).GetGrabbingKey() + " until you see ore.", "Portraits/CDRNovah", Util.Corner.BottomRight, 0, true)); Dialogscreen = new Util.DialogScreen(Dialogs); sections.Add( new StellarProspector.TutorialSection(null, deinit, Dialogscreen, null) ); // Section 11 // wait for the player to press the grabbing key, then play the cooldown sound effect init = delegate(Util.GameScreen ts) { ((StellarProspector.StellarProspectorGameScreen)game).GrabberPressed = false; }; deinit = delegate(Util.GameScreen ts) { ((StellarProspector.StellarProspectorGameScreen)game).TutorialEventSelect(11); }; check = delegate(Util.GameScreen ts) { return ((StellarProspector.StellarProspectorGameScreen)game).GrabberPressed; }; Dialogs.Clear(); Dialogs.Add(new Util.Dialog("CDR NOVAH", "Just to hear what happens when you press the " + ((StellarProspector.StellarProspectorGameScreen)game).GetGrabbingKey() + " without ore, press it now.", "Portraits/CDRNovah", Util.Corner.BottomRight, 0, false)); Dialogscreen = new Util.DialogScreen(Dialogs); sections.Add( new StellarProspector.TutorialSection(init, deinit, Dialogscreen, check) ); // Section 12 //show red display indicating contamination init = delegate(Util.GameScreen ts) { ((StellarProspector.StellarProspectorGameScreen)game).ReadyCenterWarning(); }; deinit = delegate(Util.GameScreen ts) { ((StellarProspector.StellarProspectorGameScreen)game).TutorialEventSelect(12); }; Dialogs.Clear(); Dialogs.Add(new Util.Dialog("CDR NOVAH", "Some of the iron ore turns out to be contaminated with phosphorus.", "Portraits/CDRNovah", Util.Corner.BottomRight, 0, true)); Dialogscreen = new Util.DialogScreen(Dialogs); sections.Add( new StellarProspector.TutorialSection(init, deinit, Dialogscreen, null) ); // Section 13 // show energy bar decreasing from full to zero Dialogs.Clear(); Dialogs.Add(new Util.Dialog("CDR NOVAH", "Phosphorus corrodes the ore processor, rapidly taking away your energy.", "Portraits/CDRNovah", Util.Corner.BottomRight, 0, true)); Dialogscreen = new Util.DialogScreen(Dialogs); sections.Add( new StellarProspector.TutorialSection(null, null, Dialogscreen, null) ); // Section 13 animation init = delegate(Util.GameScreen ts) { ((StellarProspector.StellarProspectorGameScreen)game).ReadyProgressDrain(); }; deinit = delegate(Util.GameScreen ts) { ((StellarProspector.StellarProspectorGameScreen)game).TutorialEventSelect(13); }; check = delegate(Util.GameScreen ts) { return !((StellarProspector.StellarProspectorGameScreen)game).ProgressDrain; }; sections.Add( new StellarProspector.TutorialSection(init, deinit, null, check) ); // Section 14 deinit = delegate(Util.GameScreen ts) { ((StellarProspector.StellarProspectorGameScreen)game).TutorialEventSelect(14); }; Dialogs.Clear(); Dialogs.Add(new Util.Dialog("CDR NOVAH", "It's very important to reject contaminated ore as fast as you can to prevent this energy drain.", "Portraits/CDRNovah", Util.Corner.BottomRight, 0, true)); Dialogscreen = new Util.DialogScreen(Dialogs); sections.Add( new StellarProspector.TutorialSection(null, deinit, Dialogscreen, null) ); // Section 15 init = delegate(Util.GameScreen ts) { ((StellarProspector.StellarProspectorGameScreen)game).TutorialCentral = true; }; deinit = delegate(Util.GameScreen ts) { ((StellarProspector.StellarProspectorGameScreen)game).TutorialEventSelect(15); }; check = delegate(Util.GameScreen ts) { return !((StellarProspector.StellarProspectorGameScreen)game).TutorialCentral; }; Dialogs.Clear(); Dialogs.Add(new Util.Dialog("CDR NOVAH", "Contaminated ore turns the processor red. When you see red, press the " + ((StellarProspector.StellarProspectorGameScreen)game).GetNotGrabbingKey() + " to eject the bad ore as fast as you can. Try pressing the " + ((StellarProspector.StellarProspectorGameScreen)game).GetNotGrabbingKey() + " now.", "Portraits/CDRNovah", Util.Corner.BottomRight, 0, false)); Dialogscreen = new Util.DialogScreen(Dialogs); sections.Add( new StellarProspector.TutorialSection(init, deinit, Dialogscreen, check) ); // Section 16 Dialogs.Clear(); Dialogs.Add(new Util.Dialog("CDR NOVAH", "Good job. Remember that collecting good ore (on the edges of the scope) helps you a little, but ejecting contaminated ore (red at the centre of the scope) helps you a lot.", "Portraits/CDRNovah", Util.Corner.BottomRight, 0, true)); Dialogs.Add(new Util.Dialog("CDR NOVAH", "So keep your eyes on the centre, and just look out of the corner of your eye at the edges. Good luck!", "Portraits/CDRNovah", Util.Corner.BottomRight, 0, true)); Dialogscreen = new Util.DialogScreen(Dialogs); deinit = delegate(Util.GameScreen ts) { ((StellarProspector.StellarProspectorGameScreen)game).TutorialEventSelect(16); ((StellarProspector.StellarProspectorGameScreen)game).EndTutorial(); }; sections.Add( new StellarProspector.TutorialSection(null, deinit, Dialogscreen, null) ); return new StellarProspector.TutorialScreen(game, sections);