From 64deb1686210287e18e5bdf275ed0eb593de0a65 Mon Sep 17 00:00:00 2001 From: Johannes Date: Fri, 3 Aug 2012 11:38:44 +0200 Subject: [PATCH] Demo Feature Screen is displayed instead of Winnerscreen --- .../Controller/StorageManager.cs | 2 +- .../ManhattanMorning/Game1.cs | 2 +- .../Misc/IngameMenuInstance.cs | 23 ++++++++++++++++--- .../ManhattanMorning/Misc/MainMenuInstance.cs | 4 ++-- 4 files changed, 24 insertions(+), 7 deletions(-) diff --git a/ManhattanMorning/ManhattanMorning/ManhattanMorning/Controller/StorageManager.cs b/ManhattanMorning/ManhattanMorning/ManhattanMorning/Controller/StorageManager.cs index bbed482..86f4b20 100755 --- a/ManhattanMorning/ManhattanMorning/ManhattanMorning/Controller/StorageManager.cs +++ b/ManhattanMorning/ManhattanMorning/ManhattanMorning/Controller/StorageManager.cs @@ -1243,7 +1243,7 @@ public LayerList LoadIngameMenuObjects() Texture_IngameMenu_Winner_Team2, null, new Vector2(446f / 1280f, 392f / 720f), new Vector2(443f / 1280f, 180f / 720f), 92, MeasurementUnit.PercentOfScreen); objectList.Add(WinnerScreen_Winner_Team2); MenuObject FeatureScreen = new MenuObject("FeatureScreen", false, - Texture_IngameMenu_Winner_Team2, null, new Vector2(1280f / 1280f, 720f / 720f), Vector2.Zero, 92, MeasurementUnit.PercentOfScreen); + Texture_IngameMenu_FeatureScreen, null, new Vector2(1280f / 1280f, 720f / 720f), Vector2.Zero, 92, MeasurementUnit.PercentOfScreen); objectList.Add(FeatureScreen); diff --git a/ManhattanMorning/ManhattanMorning/ManhattanMorning/Game1.cs b/ManhattanMorning/ManhattanMorning/ManhattanMorning/Game1.cs index d8dcfad..f2680bf 100755 --- a/ManhattanMorning/ManhattanMorning/ManhattanMorning/Game1.cs +++ b/ManhattanMorning/ManhattanMorning/ManhattanMorning/Game1.cs @@ -155,7 +155,7 @@ protected override void Initialize() Logger.Instance.log(Sender.Game1, "Initialize() done successfully",PriorityLevel.Priority_2); base.Initialize(); - Guide.SimulateTrialMode = true; + Guide.SimulateTrialMode = false; //play IntroVideo on game start if(((bool)SettingsManager.Instance.get("IntroVideo")) && Guide.IsTrialMode) playVideo(video); diff --git a/ManhattanMorning/ManhattanMorning/ManhattanMorning/Misc/IngameMenuInstance.cs b/ManhattanMorning/ManhattanMorning/ManhattanMorning/Misc/IngameMenuInstance.cs index 3a1795a..a7e7dc2 100755 --- a/ManhattanMorning/ManhattanMorning/ManhattanMorning/Misc/IngameMenuInstance.cs +++ b/ManhattanMorning/ManhattanMorning/ManhattanMorning/Misc/IngameMenuInstance.cs @@ -150,12 +150,16 @@ public void activateMenu(int winner) menuState = 1; + // When in DemoMode show FeatureScreen + if ((bool)SettingsManager.Instance.get("IsTrialMode")) + menuState = 3; + // Make all necessary menu objects visible for (int i = 0; i < menuStructure.GetLength(1); i++) { if (menuStructure[1, i] != null) { - foreach (LayerInterface menuObject in menuStructure[1, i]) + foreach (LayerInterface menuObject in menuStructure[menuState, i]) { ((DrawableObject)menuObject).Visible = true; } @@ -170,18 +174,23 @@ public void activateMenu(int winner) menuState = 2; + // When in DemoMode show FeatureScreen + if ((bool)SettingsManager.Instance.get("IsTrialMode")) + menuState = 3; + // Make all necessary menu objects visible for (int i = 0; i < menuStructure.GetLength(1); i++) { if (menuStructure[2, i] != null) { - foreach (LayerInterface menuObject in menuStructure[2, i]) + foreach (LayerInterface menuObject in menuStructure[menuState, i]) { ((DrawableObject)menuObject).Visible = true; } } } + } animateTransition(menuState); @@ -349,7 +358,7 @@ private void createMenuStructure() // 1.Index: Menu state // 2.Index: 0: List of Menu_PassiveObjects which are always shown/never highlighted (e.g. background) // all other indexes: List of Menu_Buttons which belong to a single selectable item - menuStructure = new List[3, 4]; + menuStructure = new List[4, 4]; // Normal ingame menu menuStructure[0, 0] = new List(); @@ -380,6 +389,14 @@ private void createMenuStructure() menuStructure[2, 2] = new List(); menuStructure[2, 3] = new List(); + // Demo Feature Screen + menuStructure[3, 0] = new List(); + menuStructure[3, 0].Add(menuObjectList.GetObjectByName("FeatureScreen")); + menuStructure[3, 1] = new List(); + menuStructure[3, 0].Add(menuObjectList.GetObjectByName("FeatureScreen")); + menuStructure[3, 2] = new List(); + menuStructure[3, 3] = new List(); + } /// diff --git a/ManhattanMorning/ManhattanMorning/ManhattanMorning/Misc/MainMenuInstance.cs b/ManhattanMorning/ManhattanMorning/ManhattanMorning/Misc/MainMenuInstance.cs index 76648ac..22057e1 100755 --- a/ManhattanMorning/ManhattanMorning/ManhattanMorning/Misc/MainMenuInstance.cs +++ b/ManhattanMorning/ManhattanMorning/ManhattanMorning/Misc/MainMenuInstance.cs @@ -61,7 +61,7 @@ public Video IntroVideo /// 4: really quit /// 5: select level /// 6: intro - /// 7: help first start (is just shown when the game starts for the first time + /// 7: help first start (is just shown when the game starts for the first time) /// private int menuState; @@ -1950,7 +1950,7 @@ private void startGame() possibleIndexes.Remove(index); } } - + winCondition = new TimeLimit_WinCondition(new TimeSpan(0, 0, 5)); // Start game SuperController.Instance.switchFromMainMenuToIngame(levelName, winCondition, leftPlayers, rightPlayers);