using System; using System.Collections.Generic; using System.Reflection; using ColonySim.GUI; using ColonySim.Structures; using Microsoft.Xna.Framework.Graphics; using Util; namespace ColonySim { delegate void test(); class Tutorial : DrawableGameScreenComponent { readonly Grid mGrid; readonly ColonySimGUIScreen mGui; readonly ColonySim mColonySim; readonly Queue CodeQueue = new Queue(); readonly Queue MethodQueue = new Queue(); bool mCheckNull = true; public bool Done { get{return CodeQueue.Count <= 0;} } public Tutorial(ColonySimGUIScreen pGui, Grid pGameGrid, ColonySim pColony) { mGrid = pGameGrid; mGui = pGui; mColonySim = pColony; } public void StartTutorial() { // Start the tutorial stuff //StartSection(); // Fill the event queue // Command Center Placement // Explain camera CodeQueue.Enqueue(EventCodes.PlaceBuilding); MethodQueue.Enqueue(typeof(Tutorial).GetMethod("ExplainCamera1")); // Explain camera CodeQueue.Enqueue(EventCodes.PlaceBuilding); MethodQueue.Enqueue(typeof(Tutorial).GetMethod("ExplainCamera2")); // Explain camera CodeQueue.Enqueue(EventCodes.PlaceBuilding); MethodQueue.Enqueue(typeof(Tutorial).GetMethod("ExplainCamera3")); // Explain command center CodeQueue.Enqueue(EventCodes.PlaceBuilding); MethodQueue.Enqueue(typeof(Tutorial).GetMethod("ExplainCommandCenter")); // Explain command center CodeQueue.Enqueue(EventCodes.PlaceBuilding); MethodQueue.Enqueue(typeof(Tutorial).GetMethod("ExplainCommandCenterLocate")); // Explain build area CodeQueue.Enqueue(EventCodes.RecenterView); MethodQueue.Enqueue(typeof(Tutorial).GetMethod("ExplainBuildArea")); // Click Commercial Menu CodeQueue.Enqueue(EventCodes.PlaceBuilding); MethodQueue.Enqueue(typeof(Tutorial).GetMethod("ClickCommercial")); // Select Mining Plant CodeQueue.Enqueue(EventCodes.LEFT_MOUSE_CLICKED); MethodQueue.Enqueue(typeof(Tutorial).GetMethod("SelectMining")); // Place Mining Plant CodeQueue.Enqueue(EventCodes.LEFT_MOUSE_CLICKED); MethodQueue.Enqueue(typeof(Tutorial).GetMethod("PlaceMining")); // Explain mining plant CodeQueue.Enqueue(EventCodes.PlaceBuilding); MethodQueue.Enqueue(typeof(Tutorial).GetMethod("ExplainMining")); // Select Factory CodeQueue.Enqueue(EventCodes.PlaceBuilding); MethodQueue.Enqueue(typeof(Tutorial).GetMethod("SelectFactory")); // Place Factory CodeQueue.Enqueue(EventCodes.LEFT_MOUSE_CLICKED); MethodQueue.Enqueue(typeof(Tutorial).GetMethod("PlaceFactory")); // Explain Factory 1 CodeQueue.Enqueue(EventCodes.PlaceBuilding); MethodQueue.Enqueue(typeof(Tutorial).GetMethod("ExplainFactory1")); // Explain Factory 2 CodeQueue.Enqueue(EventCodes.PlaceBuilding); //MethodQueue.Enqueue(typeof(Tutorial).GetMethod("ExplainFactory2")); // Click residential //CodeQueue.Enqueue(EventCodes.PlaceBuilding); MethodQueue.Enqueue(typeof(Tutorial).GetMethod("ClickResidential")); // Select Residential CodeQueue.Enqueue(EventCodes.LEFT_MOUSE_CLICKED); MethodQueue.Enqueue(typeof(Tutorial).GetMethod("SelectResidential")); // Place Residential CodeQueue.Enqueue(EventCodes.LEFT_MOUSE_CLICKED); MethodQueue.Enqueue(typeof(Tutorial).GetMethod("PlaceResidential")); // Explain Residential CodeQueue.Enqueue(EventCodes.PlaceBuilding); MethodQueue.Enqueue(typeof(Tutorial).GetMethod("ExplainResidential")); // Explain Resource Connected CodeQueue.Enqueue(EventCodes.PlaceBuilding); MethodQueue.Enqueue(typeof(Tutorial).GetMethod("ExplainResourceConnectedIcon")); // Click Transport CodeQueue.Enqueue(EventCodes.PlaceBuilding); MethodQueue.Enqueue(typeof(Tutorial).GetMethod("ClickTransport")); // Select Resource Transport CodeQueue.Enqueue(EventCodes.LEFT_MOUSE_CLICKED); MethodQueue.Enqueue(typeof(Tutorial).GetMethod("SelectResourceTrasport")); // Place Resource Transport CodeQueue.Enqueue(EventCodes.LEFT_MOUSE_CLICKED); MethodQueue.Enqueue(typeof(Tutorial).GetMethod("PlaceResourceTransport")); // Wait for resource connect CodeQueue.Enqueue(EventCodes.PlaceBuilding); MethodQueue.Enqueue(typeof(Tutorial).GetMethod("WaitForResourceConnect")); // Explain resource connect 1 CodeQueue.Enqueue(EventCodes.CSTutorial_WaitForFactoryResourceConnect); MethodQueue.Enqueue(typeof(Tutorial).GetMethod("ExplainResourceConnect1")); // Explain resource connect 2 CodeQueue.Enqueue(EventCodes.PlaceBuilding); MethodQueue.Enqueue(typeof(Tutorial).GetMethod("ExplainResourceConnect2")); // Explain residential connect icon CodeQueue.Enqueue(EventCodes.PlaceBuilding); MethodQueue.Enqueue(typeof(Tutorial).GetMethod("ExplainResidentialConnectedIcon1")); // Explain residential connect icon CodeQueue.Enqueue(EventCodes.PlaceBuilding); MethodQueue.Enqueue(typeof(Tutorial).GetMethod("ExplainResidentialConnectedIcon2")); // Tell them to select the residential transport CodeQueue.Enqueue(EventCodes.PlaceBuilding); MethodQueue.Enqueue(typeof(Tutorial).GetMethod("SelectResidentialTransport")); // Tell them to place a transport tube CodeQueue.Enqueue(EventCodes.LEFT_MOUSE_CLICKED); MethodQueue.Enqueue(typeof(Tutorial).GetMethod("PlaceResidentTransport")); // Wait until they connect the residential building to a factory CodeQueue.Enqueue(EventCodes.PlaceBuilding); MethodQueue.Enqueue(typeof(Tutorial).GetMethod("WaitForResidentConnect")); // Explain what residential transports do CodeQueue.Enqueue(EventCodes.CSTutorial_WaitForFactoryResidentialConnect); MethodQueue.Enqueue(typeof(Tutorial).GetMethod("ExplainResidentialConnect1")); // Explain what residential transports do CodeQueue.Enqueue(EventCodes.PlaceBuilding); MethodQueue.Enqueue(typeof(Tutorial).GetMethod("ExplainResidentialConnect2")); // Introduce the commercial buildings CodeQueue.Enqueue(EventCodes.PlaceBuilding); MethodQueue.Enqueue(typeof(Tutorial).GetMethod("IntroduceCommercialBuildings")); // Tell them to click the commercial button CodeQueue.Enqueue(EventCodes.PlaceBuilding); MethodQueue.Enqueue(typeof(Tutorial).GetMethod("ClickCommercial")); // Tell them to click the commercial button CodeQueue.Enqueue(EventCodes.LEFT_MOUSE_CLICKED); MethodQueue.Enqueue(typeof(Tutorial).GetMethod("SelectCommercial")); // Tell them to click the commercial button CodeQueue.Enqueue(EventCodes.LEFT_MOUSE_CLICKED); MethodQueue.Enqueue(typeof(Tutorial).GetMethod("PlaceCommercial")); // Tell them to click the commercial button CodeQueue.Enqueue(EventCodes.PlaceBuilding); MethodQueue.Enqueue(typeof(Tutorial).GetMethod("CommercialPlaced")); // Click Transport CodeQueue.Enqueue(EventCodes.PlaceBuilding); MethodQueue.Enqueue(typeof(Tutorial).GetMethod("ClickTransport")); // Tell them to select the residential transport CodeQueue.Enqueue(EventCodes.LEFT_MOUSE_CLICKED); MethodQueue.Enqueue(typeof(Tutorial).GetMethod("SelectResidentialTransport")); // Tell them to place a residential transport next to the commercial structure CodeQueue.Enqueue(EventCodes.LEFT_MOUSE_CLICKED); MethodQueue.Enqueue(typeof(Tutorial).GetMethod("PlaceCommercialResidentialTransport")); // Wait for them to connect the residential to the commercial building CodeQueue.Enqueue(EventCodes.PlaceBuilding); MethodQueue.Enqueue(typeof(Tutorial).GetMethod("WaitForCommercialResidentConnect")); // Congratulate them for connecting CodeQueue.Enqueue(EventCodes.CSTutorial_WaitForCommericalResidentialConnect); MethodQueue.Enqueue(typeof(Tutorial).GetMethod("CommercialResidentConnected")); //Explain pause CodeQueue.Enqueue(EventCodes.PlaceBuilding); MethodQueue.Enqueue(typeof(Tutorial).GetMethod("ExplainPause")); //Explain pause CodeQueue.Enqueue(EventCodes.PlaceBuilding); MethodQueue.Enqueue(typeof(Tutorial).GetMethod("ExplainUpkeep1")); //Explain pause CodeQueue.Enqueue(EventCodes.PlaceBuilding); MethodQueue.Enqueue(typeof(Tutorial).GetMethod("ExplainUpkeep2")); //Explain pause CodeQueue.Enqueue(EventCodes.PlaceBuilding); MethodQueue.Enqueue(typeof(Tutorial).GetMethod("ExplainUpkeep3")); //Explain pause CodeQueue.Enqueue(EventCodes.PlaceBuilding); MethodQueue.Enqueue(typeof(Tutorial).GetMethod("ExplainUpkeep4")); //Explain pause CodeQueue.Enqueue(EventCodes.PlaceBuilding); MethodQueue.Enqueue(typeof(Tutorial).GetMethod("ExplainUpkeep5")); // Introduce the entertainment building CodeQueue.Enqueue(EventCodes.PlaceBuilding); MethodQueue.Enqueue(typeof(Tutorial).GetMethod("IntroduceEntertainmentBuildings1")); // Introduce the entertainment building CodeQueue.Enqueue(EventCodes.PlaceBuilding); MethodQueue.Enqueue(typeof(Tutorial).GetMethod("IntroduceEntertainmentBuildings2")); // Have them select the commercial category CodeQueue.Enqueue(EventCodes.PlaceBuilding); MethodQueue.Enqueue(typeof(Tutorial).GetMethod("ClickResidential")); // Have them select the commercial building CodeQueue.Enqueue(EventCodes.LEFT_MOUSE_CLICKED); MethodQueue.Enqueue(typeof(Tutorial).GetMethod("SelectEntertainment")); // Have them place the entertainment building CodeQueue.Enqueue(EventCodes.LEFT_MOUSE_CLICKED); MethodQueue.Enqueue(typeof(Tutorial).GetMethod("PlaceEntertainment")); // Wait for them to connect the commercial building to the residential building CodeQueue.Enqueue(EventCodes.PlaceBuilding); MethodQueue.Enqueue(typeof(Tutorial).GetMethod("WaitForEntertainmentResidentialConnect")); // Congratulate them on connecting the entertainment and the residential building CodeQueue.Enqueue(EventCodes.CSTutorial_WaitForEntertainmentResidentialConnect); MethodQueue.Enqueue(typeof(Tutorial).GetMethod("EntertainmentResidentConnected")); // Tell them the build section is done CodeQueue.Enqueue(EventCodes.PlaceBuilding); MethodQueue.Enqueue(typeof(Tutorial).GetMethod("BuildSectionDone")); // Explain the select tool CodeQueue.Enqueue(EventCodes.PlaceBuilding); MethodQueue.Enqueue(typeof(Tutorial).GetMethod("ExplainSelect")); // Explain Delete CodeQueue.Enqueue(EventCodes.PlaceBuilding); MethodQueue.Enqueue(typeof(Tutorial).GetMethod("ExplainDelete")); // Explain the missions button CodeQueue.Enqueue(EventCodes.PlaceBuilding); MethodQueue.Enqueue(typeof(Tutorial).GetMethod("ExplainMissions1")); // Explain the missions button CodeQueue.Enqueue(EventCodes.PlaceBuilding); MethodQueue.Enqueue(typeof(Tutorial).GetMethod("ExplainMissions2")); // Explain the missions button CodeQueue.Enqueue(EventCodes.PlaceBuilding); MethodQueue.Enqueue(typeof(Tutorial).GetMethod("ExplainMissions3")); // Explain the Options button CodeQueue.Enqueue(EventCodes.PlaceBuilding); MethodQueue.Enqueue(typeof(Tutorial).GetMethod("ExplainOptions1")); // Explain the Options button CodeQueue.Enqueue(EventCodes.PlaceBuilding); MethodQueue.Enqueue(typeof(Tutorial).GetMethod("ExplainOptions2")); // Explain the Options button CodeQueue.Enqueue(EventCodes.PlaceBuilding); MethodQueue.Enqueue(typeof(Tutorial).GetMethod("ExplainQuit")); // Explain the Options button CodeQueue.Enqueue(EventCodes.PlaceBuilding); MethodQueue.Enqueue(typeof(Tutorial).GetMethod("TutorialFinished")); //CodeQueue.Enqueue(EventCodes.PlaceBuilding); //MethodQueue.Enqueue(typeof(Tutorial).GetMethod("ClearBox")); } public override void Draw(Microsoft.Xna.Framework.GameTime gameTime) { //do nothing } public override void Update(Microsoft.Xna.Framework.GameTime gameTime) { if (CodeQueue.Count <= 0) { return; } if (CodeQueue.Peek() == EventCodes.CSTutorial_WaitForCommericalResidentialConnect) { foreach (Structure s in mGrid.GetAllStructures()) { if (s is Commercial && s.ConnectedToResidential) { CodeQueue.Dequeue(); MethodInfo temp = MethodQueue.Dequeue(); temp.Invoke(this, null); return; } } } if (CodeQueue.Peek() == EventCodes.CSTutorial_WaitForEntertainmentResidentialConnect) { foreach (Structure s in mGrid.GetAllStructures()) { if (s is Entertainment && s.ConnectedToResidential) { CodeQueue.Dequeue(); MethodInfo temp = MethodQueue.Dequeue(); temp.Invoke(this, null); return; } } } if (CodeQueue.Peek() == EventCodes.CSTutorial_WaitForFactoryResidentialConnect) { foreach (Structure s in mGrid.GetAllStructures()) { if (s is Factory && s.ConnectedToResidential) { CodeQueue.Dequeue(); MethodInfo temp = MethodQueue.Dequeue(); temp.Invoke(this, null); return; } } } if (CodeQueue.Peek() == EventCodes.CSTutorial_WaitForFactoryResourceConnect) { //bool connected = false; foreach (Structure s in mGrid.GetAllStructures()) { if (s is Factory) { //if (connected) // break; foreach (ResourceCode rc in Enum.GetValues(typeof(ResourceCode))) { if (s.ConnectedToResource(rc)) { CodeQueue.Dequeue(); MethodInfo temp = MethodQueue.Dequeue(); temp.Invoke(this, null); //connected = true; return; } } } } } } public void HandleEvent(InputEvent pEvent) { if (!Done && (EventCodes)pEvent.EventCode == CodeQueue.Peek() && (pEvent.EventArgs != null && mCheckNull)) { CodeQueue.Dequeue(); MethodInfo temp = MethodQueue.Dequeue(); temp.Invoke(this, null); } else if(!Done && (EventCodes)pEvent.EventCode == CodeQueue.Peek() && !mCheckNull) { CodeQueue.Dequeue(); MethodInfo temp = MethodQueue.Dequeue(); temp.Invoke(this, null); } } public void StartSection() { // Set the check null value mCheckNull = false; // Lock the GUI mGui.LockAll(); // Display dialog mGui.DisplayMessagePanel("Welcome to the Colony Simulation. (Click to Continue)", null, -1); } #region Tutorial Methods public void ExplainCamera1() { // Set the check null value mCheckNull = false; // Lock the GUI mGui.LockAll(); // Display dialog mGui.DisplayMessagePanel("Swivel the camera by holding ALT and moving the mouse. Try it now. (Click to continue)", null, -1); } public void ExplainCamera2() { // Set the check null value mCheckNull = false; // Lock the GUI mGui.LockAll(); // Display dialog mGui.DisplayMessagePanel("Zoom the camera by holding CONTROL and moving the mouse. Try it now. (Click to Continue)", null, -1); } public void ExplainCamera3() { // Set the check null value mCheckNull = false; // Lock the GUI mGui.LockAll(); // Display dialog mGui.DisplayMessagePanel("To scroll, move the mouse to the edge of the screen. Try it now. (Click to continue)", null, -1); } public void ExplainCommandCenter() { // Set the check null value mCheckNull = true; mColonySim.LoadCommandCenter(); Texture2D[] textures = new Texture2D[2]; textures[0] = Game.Content.Load(@"Textures\GUI\CommandCenter"); textures[1] = Game.Content.Load(@"Textures\GUI\asteroid"); // Explain the command center mGui.DisplayMessagePanel( "The Command Center # is the heart of your space colony. Click the mouse where you want to place it. Try to put it near some asteroids #.", textures, -1); } public void ExplainCommandCenterLocate() { // Set the check null value mCheckNull = false; // Lock the GUI mGui.LockAll(); Texture2D[] textures = new Texture2D[1]; textures[0] = Game.Content.Load(@"Textures\GUI\CommandCenter"); // Display dialog mGui.DisplayMessagePanel("In case you're ever lost, pressing the space bar always brings you back to your Command Center #. Try it now.", null, -1); } public void ExplainBuildArea() { // Set the check null value mCheckNull = false; // Explain the build area mGui.DisplayMessagePanel( "The blue square is where you can put buildings. (Click to Continue)", null, -1); } public void ClickCommercial() { // Set the check null mCheckNull = true; // Unlock the commercial panel mGui.EnableDisable(ColonySimGUIScreen.BottomPanelEnumeration.COMMERCIAL, true); // Set the building to be selected mGui.LimitStructureSelection(ColonySimGUIScreen.BottomPanelEnumeration.COMMERCIAL, "Mining_Plant"); // The texture array Texture2D[] textures = new Texture2D[1]; textures[0] = Game.Content.Load(@"Textures\GUI\03_commercialUp"); // Display that they need to click on the commercial icon mGui.DisplayMessagePanel("Click on the Commercial Button # on the bottom left.", textures, -1); } public void SelectMining() { // Set the check null value mCheckNull = true; // The texture array Texture2D[] textures = new Texture2D[1]; textures[0] = Game.Content.Load(@"Textures\GUI\03a_commercialMiningUp"); // Tell them to place the mine mGui.DisplayMessagePanel("Now click on the Mining Plant #.", textures, -1); // mColonySim.InputHandler.Disable(); } public void PlaceMining() { // Set the check null value mCheckNull = true; // The texture array Texture2D[] textures = new Texture2D[3]; textures[0] = Game.Content.Load(@"Textures\GUI\03a_commercialMiningUp"); textures[1] = Game.Content.Load(@"Textures\GUI\asteroid"); textures[2] = Game.Content.Load(@"Textures\GUI\03a_commercialMiningUp"); // Now tell them to place the mining plant mGui.DisplayMessagePanel("Move the mouse and click to place the Mining Plant # on top of one of the asteroids #. The Mining Plant # doesn't " + "need to go inside the blue square.", textures, -1); } public void ExplainMining() { // Set the check null value mCheckNull = false; // Clear the current structure mColonySim.CurrentStructure = null; // Lock the GUI mGui.LockAll(); // The texture array Texture2D[] textures = new Texture2D[3]; textures[0] = Game.Content.Load(@"Textures\GUI\03a_commercialMiningUp"); textures[1] = Game.Content.Load(@"Textures\GUI\asteroid"); textures[2] = Game.Content.Load(@"Textures\GUI\03a_refineryUp"); // Tell them what the mining plant does mGui.DisplayMessagePanel("Mining Plants # collect resources from asteroids #, and send these resources to Factories #. (Click to Continue)", textures, -1); } public void SelectFactory() { // Set the check null value mCheckNull = true; // Set the building to be selected mGui.LimitStructureSelection(ColonySimGUIScreen.BottomPanelEnumeration.COMMERCIAL, "Factory_1"); // The texture array Texture2D[] textures = new Texture2D[1]; textures[0] = Game.Content.Load(@"Textures\GUI\03a_refineryUp"); // Display that they need to click on the commercial icon mGui.DisplayMessagePanel("Now, click on the Factory 1 Button #.", textures, -1); } public void PlaceFactory() { // Set the check null value mCheckNull = true; // The texture array Texture2D[] textures = new Texture2D[1]; textures[0] = Game.Content.Load(@"Textures\GUI\03a_refineryUp"); // Now tell them to place the mining plant mGui.DisplayMessagePanel("Now place the Factory # within the blue build area.", textures, -1); } public void ExplainFactory1() { // Set the check null value mCheckNull = false; // Clear the current structure mColonySim.CurrentStructure = null; // Lock them all again mGui.LockAll(); // The texture array Texture2D[] textures = new Texture2D[2]; textures[0] = Game.Content.Load(@"Textures\GUI\03a_refineryUp"); textures[1] = Game.Content.Load(@"Textures\GUI\03a_commercialMiningUp"); // Tell them about the factory mGui.DisplayMessagePanel("Factories # take in resources from Mining Plants #. They make them into products your colony can use. (Click to Continue)", textures, -1); } public void ExplainFactory2() { // Set the check null value mCheckNull = false; // Clear the current structure mColonySim.CurrentStructure = null; // Lock them all again mGui.LockAll(); // The texture array Texture2D[] textures = new Texture2D[2]; textures[0] = Game.Content.Load(@"Textures\GUI\03a_refineryUp"); textures[1] = Game.Content.Load(@"Textures\GUI\03a_refineryUp"); // Tell them about the factory mGui.DisplayMessagePanel("Higher tier Factories # connect to lower tier Factories # to upgrade their resources. (Click to Continue)", textures, -1); } public void ClickResidential() { // Set the check null value mCheckNull = true; // Unlock the commercial panel mGui.EnableDisable(ColonySimGUIScreen.BottomPanelEnumeration.RESIDENTIAL, true); // Set the building to be selected mGui.LimitStructureSelection(ColonySimGUIScreen.BottomPanelEnumeration.RESIDENTIAL, "Residential_1"); // The texture array Texture2D[] textures = new Texture2D[1]; textures[0] = Game.Content.Load(@"Textures\GUI\02_residentialUp"); // Tell them to click the residential button mGui.DisplayMessagePanel("Click on the Residential Button # on the bottom left.", textures, -1); } public void SelectResidential() { // Set the check null value mCheckNull = true; // The texture array Texture2D[] textures = new Texture2D[1]; textures[0] = Game.Content.Load(@"Textures\GUI\02a_residentialTierOneUp"); // Display that they need to click on the commercial icon mGui.DisplayMessagePanel("Now, click on the Residential 1 Button #.", textures, -1); } public void PlaceResidential() { // Set the check null value mCheckNull = true; // The texture array Texture2D[] textures = new Texture2D[1]; textures[0] = Game.Content.Load(@"Textures\GUI\02a_residentialTierOneUp"); // Now tell them to place the mining plant mGui.DisplayMessagePanel("Now place the Residential Structure # anywhere inside the blue square.", textures, -1); } public void ExplainResidential() { // Set the check null value mCheckNull = false; // Clear the current structure mColonySim.CurrentStructure = null; // Lock them all again mGui.LockAll(); // The texture array Texture2D[] textures = new Texture2D[2]; textures[0] = Game.Content.Load(@"Textures\GUI\02a_residentialTierOneUp"); textures[1] = Game.Content.Load(@"Textures\GUI\Population"); // Tell them about the residential mGui.DisplayMessagePanel("Residential structures # are where your people # live. (Click to Continue)", textures, -1); } public void ExplainResourceConnectedIcon() { // Set the check null value mCheckNull = false; // Clear the current structure mColonySim.CurrentStructure = null; // Lock them all again mGui.LockAll(); // The texture array Texture2D[] textures = new Texture2D[3]; textures[0] = Game.Content.Load(@"Textures\GUI\01b_blueTransportUp"); textures[1] = Game.Content.Load(@"Textures\GUI\03a_refineryUp"); textures[2] = Game.Content.Load(@"Textures\GUI\03a_commercialMiningUp"); // Tell them about it mGui.DisplayMessagePanel("# over your Factory # means it needs to be connected to a Mining Plant #. (Click to Continue)", textures, -1); } public void ClickTransport() { // Set the check null value mCheckNull = true; // Unlock the transport mGui.EnableDisable(ColonySimGUIScreen.BottomPanelEnumeration.TRANSPORT, true); // Unlock the resource transport mGui.LimitStructureSelection(ColonySimGUIScreen.BottomPanelEnumeration.TRANSPORT, "Resource_Tube"); // The texture array Texture2D[] textures = new Texture2D[1]; textures[0] = Game.Content.Load(@"Textures\GUI\01_transportUp"); // tell them to click mGui.DisplayMessagePanel("Click the Transport Button # on the lower left.", textures, -1); } public void SelectResourceTrasport() { // Set the check null value mCheckNull = true; // The texture array Texture2D[] textures = new Texture2D[1]; textures[0] = Game.Content.Load(@"Textures\GUI\01b_blueTransportUp"); // Tell them to select mGui.DisplayMessagePanel("Now, click on the Resource Tube Button #.", textures, -1); } public void PlaceResourceTransport() { // Set the check null value mCheckNull = true; // The texture array Texture2D[] textures = new Texture2D[2]; textures[0] = Game.Content.Load(@"Textures\GUI\01b_blueTransportUp"); textures[1] = Game.Content.Load(@"Textures\GUI\03a_refineryUp"); // Tell them where to place it mGui.DisplayMessagePanel("Place the Resource Tube # next to your Factory #.", textures, -1); } public void WaitForResourceConnect() { // Set the check null value mCheckNull = true; // The texture array Texture2D[] textures = new Texture2D[3]; textures[0] = Game.Content.Load(@"Textures\GUI\01b_blueTransportUp"); textures[1] = Game.Content.Load(@"Textures\GUI\03a_refineryUp"); textures[2] = Game.Content.Load(@"Textures\GUI\03a_commercialMiningUp"); // Tell them to connect the factory to the mining plant mGui.DisplayMessagePanel("Place Resource Tubes # next to each other to create a path from your Factory # to your Mining Plant #.", textures, -1); } public void ExplainResourceConnect1() { // Set the check null value mCheckNull = false; // Clear the current structure mColonySim.CurrentStructure = null; // Lock them all again mGui.LockAll(); // The texture array Texture2D[] textures = new Texture2D[1]; textures[0] = Game.Content.Load(@"Textures\GUI\01b_blueTransportUp"); // Tell them mGui.DisplayMessagePanel("Resource Tubes # move resources around your colony. (Click to Continue)", textures, -1); } public void ExplainResourceConnect2() { // Set the check null value mCheckNull = false; // The texture array Texture2D[] textures = new Texture2D[3]; textures[0] = Game.Content.Load(@"Textures\GUI\01b_blueTransportUp"); textures[1] = Game.Content.Load(@"Textures\GUI\03a_refineryUp"); textures[2] = Game.Content.Load(@"Textures\GUI\03a_commercialMiningUp"); // Tell them mGui.DisplayMessagePanel( "Use Resource Tubes # to connect Factories # to Mining Plants #. (Click to Continue)", textures, -1); } public void ExplainResidentialConnectedIcon1() { // The texture array Texture2D[] textures = new Texture2D[3]; textures[0] = Game.Content.Load(@"Textures\GUI\01a_redTransportUp"); textures[1] = Game.Content.Load(@"Textures\GUI\03a_refineryUp"); textures[2] = Game.Content.Load(@"Textures\GUI\02a_residentialTierOneUp"); // Tell them about it mGui.DisplayMessagePanel("# over your Factory # means it needs to be connected to a Residential Structure #. (Click to Continue)", textures, -1); } public void ExplainResidentialConnectedIcon2() { // The texture array Texture2D[] textures = new Texture2D[2]; textures[0] = Game.Content.Load(@"Textures\GUI\02a_residentialTierOneUp"); textures[1] = Game.Content.Load(@"Textures\GUI\03a_refineryUp"); // Tell them about it mGui.DisplayMessagePanel("This way, the workers can travel from their homes # to the factory #. (Click to Continue)", textures, -1); } public void SelectResidentialTransport() { // Set the check null value mCheckNull = true; mGui.LimitStructureSelection(ColonySimGUIScreen.BottomPanelEnumeration.TRANSPORT, "Residents_Tube"); // The texture array Texture2D[] textures = new Texture2D[1]; textures[0] = Game.Content.Load(@"Textures\GUI\01a_redTransportUp"); // Tell them to select mGui.DisplayMessagePanel("Now, click on the Resident Tube Button #.", textures, -1); } public void PlaceResidentTransport() { // Set the check null value mCheckNull = true; // The texture array Texture2D[] textures = new Texture2D[2]; textures[0] = Game.Content.Load(@"Textures\GUI\01a_redTransportUp"); textures[1] = Game.Content.Load(@"Textures\GUI\03a_refineryUp"); // Tell them where to place it mGui.DisplayMessagePanel("Place the Resident Tube # next to your Factory #.", textures, -1); } public void WaitForResidentConnect() { // Set the check null value mCheckNull = true; // The texture array Texture2D[] textures = new Texture2D[3]; textures[0] = Game.Content.Load(@"Textures\GUI\01a_redTransportUp"); textures[1] = Game.Content.Load(@"Textures\GUI\03a_refineryUp"); textures[2] = Game.Content.Load(@"Textures\GUI\02a_residentialTierOneUp"); // Tell them to connect the factory to the mining plant mGui.DisplayMessagePanel("Place Resident Tubes # next to each other to create a path from your Factory # to your Residential Structure #.", textures, -1); } public void ExplainResidentialConnect1() { // Set the check null value mCheckNull = false; // Clear the current structure mColonySim.CurrentStructure = null; // Lock them all again mGui.LockAll(); // The texture array Texture2D[] textures = new Texture2D[2]; textures[0] = Game.Content.Load(@"Textures\GUI\01a_redTransportUp"); textures[1] = Game.Content.Load(@"Textures\GUI\Population"); // Tell them mGui.DisplayMessagePanel("Resident Tubes # move people # around your colony. (Click to Continue)", textures, -1); } public void ExplainResidentialConnect2() { // Set the check null value mCheckNull = false; // The texture array Texture2D[] textures = new Texture2D[3]; textures[0] = Game.Content.Load(@"Textures\GUI\01a_redTransportUp"); textures[1] = Game.Content.Load(@"Textures\GUI\02a_residentialTierOneUp"); textures[2] = Game.Content.Load(@"Textures\GUI\01a_redTransportUp"); // Tell them about it mGui.DisplayMessagePanel("Use Resident Tubes # to move people from the Residential Structure # to any building with a # above it. (Click to Continue)", textures, -1); } public void IntroduceCommercialBuildings() { // Set the check null value mCheckNull = false; mGui.LockAll(); // Tell them about it mGui.DisplayMessagePanel("For your colony to earn money, you must give your people somewhere to shop. (Click to Continue)", null, -1); } public void SelectCommercial() { // Set the check null value mCheckNull = true; mGui.LimitStructureSelection(ColonySimGUIScreen.BottomPanelEnumeration.COMMERCIAL, "Commercial_1"); // The texture array Texture2D[] textures = new Texture2D[1]; textures[0] = Game.Content.Load(@"Textures\GUI\03b_commercialMallDn"); // Tell them to select mGui.DisplayMessagePanel("Now, click on the Commercial 1 Button #.", textures, -1); } public void PlaceCommercial() { // Set the check null value mCheckNull = true; // The texture array Texture2D[] textures = new Texture2D[1]; textures[0] = Game.Content.Load(@"Textures\GUI\03b_commercialMallDn"); // Tell them where to place it mGui.DisplayMessagePanel("Place the Commercial 1 Structure # in the blue build area.", textures, -1); } public void CommercialPlaced() { // Set the check null value mCheckNull = false; mColonySim.CurrentStructure = null; mGui.LockAll(); // Tell them about it mGui.DisplayMessagePanel("Great Work! Now people need a way to get there. (Click to Continue)", null, -1); } public void PlaceCommercialResidentialTransport() { // Set the check null value mCheckNull = true; // The texture array Texture2D[] textures = new Texture2D[2]; textures[0] = Game.Content.Load(@"Textures\GUI\01a_redTransportUp"); textures[1] = Game.Content.Load(@"Textures\GUI\03b_commercialMallDn"); // Tell them about it mGui.DisplayMessagePanel("Place the Resident Transport # next to the Commercial Building #. (Click to Continue)", textures, -1); } public void WaitForCommercialResidentConnect() { // Set the check null value mCheckNull = true; // The texture array Texture2D[] textures = new Texture2D[3]; textures[0] = Game.Content.Load(@"Textures\GUI\01a_redTransportUp"); textures[1] = Game.Content.Load(@"Textures\GUI\03b_commercialMallDn"); textures[2] = Game.Content.Load(@"Textures\GUI\02a_residentialTierOneUp"); // Tell them to connect the factory to the mining plant mGui.DisplayMessagePanel( "Place Resident Tubes # next to each other to create a path from your Commercial Structure # to your Residential Structure #.", textures, -1); } public void CommercialResidentConnected() { // Set the check null value mCheckNull = false; mColonySim.CurrentStructure = null; mGui.LockAll(); // Tell them about it mGui.DisplayMessagePanel("Well Done. Though right now time is stopped in your colony. (Click to Continue)", null, -1); } public void ExplainUpkeep1() { // Set the check null value mCheckNull = false; mColonySim.IsRunning = true; mColonySim.CurrentStructure = null; mGui.LockAll(); // Tell them about it mGui.DisplayMessagePanel("Notice two resources are going down while one is going up. (Click to Continue)", null, -1); } public void ExplainUpkeep2() { // Set the check null value mCheckNull = false; mColonySim.CurrentStructure = null; mGui.LockAll(); // The texture array Texture2D[] textures = new Texture2D[1]; textures[0] = Game.Content.Load(@"Textures\GUI\03a_refineryUp"); // Tell them about it mGui.DisplayMessagePanel("The resource going up is being harvested by your factory #. (Click to Continue)", textures, -1); } public void ExplainUpkeep3() { // Set the check null value mCheckNull = false; mColonySim.CurrentStructure = null; // The texture array Texture2D[] textures = new Texture2D[1]; textures[0] = Game.Content.Load(@"Textures\GUI\03_commercialUp"); mGui.LockAll(); // Tell them about it mGui.DisplayMessagePanel("Commercial buildings # use resources to make their goods. (Click to Continue)", textures, -1); } public void ExplainUpkeep4() { // Set the check null value mCheckNull = false; mColonySim.CurrentStructure = null; // The texture array Texture2D[] textures = new Texture2D[1]; textures[0] = Game.Content.Load(@"Textures\GUI\03b_commercialMallDn"); mGui.LockAll(); // Tell them about it mGui.DisplayMessagePanel("Each turn commercial buildings # use a small amount of each type of resouce. (Click to Continue)", textures, -1); } public void ExplainUpkeep5() { // Set the check null value mCheckNull = false; mColonySim.CurrentStructure = null; // The texture array Texture2D[] textures = new Texture2D[2]; textures[0] = Game.Content.Load(@"Textures\GUI\asteroid"); textures[1] = Game.Content.Load(@"Textures\GUI\03b_commercialMallDn"); mGui.LockAll(); // Tell them about it mGui.DisplayMessagePanel("Be sure to harvest all three colours of asteroids # before setting up commercial buildings #. (Click to Continue)", textures, -1); } public void IntroduceEntertainmentBuildings1() { // Set the check null value mCheckNull = false; mGui.LockAll(); Texture2D[] textures = new Texture2D[1]; textures[0] = Game.Content.Load(@"Textures\GUI\Happiness"); // Tell them about it mGui.DisplayMessagePanel("Working at factories and mining resources all the time makes your people unhappy # (Click to Continue)", null, -1); } public void IntroduceEntertainmentBuildings2() { // Set the check null value mCheckNull = false; mGui.LockAll(); Texture2D[] textures = new Texture2D[1]; textures[0] = Game.Content.Load(@"Textures\GUI\Happiness"); // Tell them about it mGui.DisplayMessagePanel("Build places for your people to have fun to increase their happiness # (Click to Continue)", null, -1); } public void SelectEntertainment() { // Set the check null value mCheckNull = true; mGui.LockAll(); mGui.LimitStructureSelection(ColonySimGUIScreen.BottomPanelEnumeration.RESIDENTIAL, "Entertainment_1"); // The texture array Texture2D[] textures = new Texture2D[1]; textures[0] = Game.Content.Load(@"Textures\GUI\02c_entertainmentCtrUp"); // Tell them to select mGui.DisplayMessagePanel("Now, click on the Entertainment 1 Button #.", textures, -1); } public void PlaceEntertainment() { // Set the check null value mCheckNull = true; // The texture array Texture2D[] textures = new Texture2D[1]; textures[0] = Game.Content.Load(@"Textures\GUI\02c_entertainmentCtrUp"); // Tell them where to place it mGui.DisplayMessagePanel("Place the Entertainment 1 Structure # in the blue build area.", textures, -1); } public void WaitForEntertainmentResidentialConnect() { // Set the check null value mCheckNull = true; mColonySim.CurrentStructure = null; // The texture array Texture2D[] textures = new Texture2D[3]; textures[0] = Game.Content.Load(@"Textures\GUI\01a_redTransportUp"); textures[1] = Game.Content.Load(@"Textures\GUI\02c_entertainmentCtrUp"); textures[2] = Game.Content.Load(@"Textures\GUI\02a_residentialTierOneUp"); mGui.LockAll(); mGui.EnableDisable(ColonySimGUIScreen.BottomPanelEnumeration.TRANSPORT, true); mGui.LimitStructureSelection(ColonySimGUIScreen.BottomPanelEnumeration.TRANSPORT, "Residents_Tube"); // Tell them to connect the factory to the mining plant mGui.DisplayMessagePanel( "Place Resident Tubes # next to each other to create a path from your Entertainment Structure # to your Residential Structure #.", textures, -1); } public void EntertainmentResidentConnected() { // Set the check null value mCheckNull = false; mColonySim.CurrentStructure = null; mGui.LockAll(); Texture2D[] textures = new Texture2D[1]; textures[0] = Game.Content.Load(@"Textures\GUI\Happiness"); // Tell them about it mGui.DisplayMessagePanel("Well Done. As you can see your people's happiness # has increased. (Click to Continue)", textures, -1); } public void BuildSectionDone() { // Set the check null value mCheckNull = false; mGui.LockAll(); // Tell them to select mGui.DisplayMessagePanel("That's the basics of building your colony. Let's go through the rest of the display. (Click to Continue)", null, -1); } public void ExplainSelect() { // Set the check null value mCheckNull = false; mGui.LockAll(); mGui.EnableDisable(ColonySimGUIScreen.BottomPanelEnumeration.SELECTION, true); Texture2D[] textures = new Texture2D[1]; textures[0] = Game.Content.Load(@"Textures\GUI\04_selectionUp"); // Tell them to select mGui.DisplayMessagePanel("In the lower left, this button # lets you select buildings to learn more about them. (Click to Continue)", textures, -1); } public void ExplainDelete() { // Set the check null value mCheckNull = false; mGui.LockAll(); mGui.EnableDisable(ColonySimGUIScreen.BottomPanelEnumeration.DELETION, true); Texture2D[] textures = new Texture2D[1]; textures[0] = Game.Content.Load(@"Textures\GUI\05_deletionUp"); // Tell them to select mGui.DisplayMessagePanel("This button # lets you delete unwanted buildings. (Click to Continue)", textures, -1); } public void ExplainPause() { // Set the check null value mCheckNull = false; mGui.LockAll(); mGui.EnableDisable(ColonySimGUIScreen.BottomPanelEnumeration.PAUSE_UNPAUSE, true); Texture2D[] textures = new Texture2D[1]; textures[0] = Game.Content.Load(@"Textures\GUI\06_pauseButtonUp"); // Tell them to select mGui.DisplayMessagePanel("In the lower right, this button # lets you stop and start time in your colony. Click it to get things going.", textures, -1); } public void ExplainMissions1() { // Set the check null value mCheckNull = false; mColonySim.IsRunning = true; mGui.LockAll(); mGui.EnableDisable(ColonySimGUIScreen.BottomPanelEnumeration.MISSION, true); Texture2D[] textures = new Texture2D[1]; textures[0] = Game.Content.Load(@"Textures\GUI\07_minigameUp"); // Tell them to select mGui.DisplayMessagePanel("In the lower right, this button # lets you choose missions to play. (Click to Continue)", textures, -1); } public void ExplainMissions2() { // Set the check null value mCheckNull = false; // Tell them to select mGui.DisplayMessagePanel("Sometimes you'll be asked to play a mission. (Click to Continue)", null, -1); } public void ExplainMissions3() { // Set the check null value mCheckNull = false; // Tell them to select mGui.DisplayMessagePanel("As you play more missions, you'll get better buildings. So play as many missions as you can! (Click to Continue)", null, -1); } public void ExplainOptions1() { // Set the check null value mCheckNull = false; mGui.LockAll(); mGui.EnableDisable(ColonySimGUIScreen.BottomPanelEnumeration.OPTIONS, true); Texture2D[] textures = new Texture2D[1]; textures[0] = Game.Content.Load(@"Textures\GUI\08_optionsUp"); // Tell them to select mGui.DisplayMessagePanel("In the lower right, this button # opens the Options Menu. (Click to Continue)", textures, -1); } public void ExplainOptions2() { // Set the check null value mCheckNull = false; // Tell them to select mGui.DisplayMessagePanel("This is also where you can save your game to play later. (Click to Continue)", null, -1); } public void ExplainQuit() { // Set the check null value mCheckNull = false; mGui.LockAll(); mGui.EnableDisable(ColonySimGUIScreen.BottomPanelEnumeration.EXIT, true); Texture2D[] textures = new Texture2D[1]; textures[0] = Game.Content.Load(@"Textures\GUI\09_exitButtonUp"); // Tell them to select mGui.DisplayMessagePanel("Finally, in the lower right, this button # quits the game. (Click to Continue)", textures, -1); } public void TutorialFinished() { // Set the check null value mCheckNull = false; // Tell them to select mGui.DisplayMessagePanel("That's all you need to know. Good luck and have fun! (Click Exit Button)", null, -1); } public void ClearBox() { //mGui.UnlockAll(); //mGui.DisplayMessagePanel("", null, 0); mColonySim.CurrentStructure = null; mColonySim.Done(); mColonySim.Disable(); mColonySim.Visible = false; } #endregion } }