Bladeren bron

Create StarterKit Solution and added Cards and Platformer StarterKits

Dominique Louis 14 jaren geleden
bovenliggende
commit
55d23142ee

+ 72 - 0
StarterKits/MonoGame.StarterKits.Windows.sln

@@ -0,0 +1,72 @@
+
+Microsoft Visual Studio Solution File, Format Version 11.00
+# Visual Studio 2010
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Platformer", "Windows\Platformer\Platformer.csproj", "{595A3D98-2DFE-4C6A-ABBB-59E5E3A6776A}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Lidgren.Network.Windows", "..\..\MonoGame\ThirdParty\Lidgren.Network\Lidgren.Network.Windows.csproj", "{AE483C29-042E-4226-BA52-D247CE7676DA}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MonoGame.Framework.Windows", "..\..\MonoGame\MonoGame.Framework\MonoGame.Framework.Windows.csproj", "{7DE47032-A904-4C29-BD22-2D235E8D91BA}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Cards", "Cards", "{942BA8DE-64A2-46EC-AF91-E73F01239BFA}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BlackJack.Windows", "Windows\Cards\BlackJack.Windows.csproj", "{E31D6E96-3539-4EB7-9529-34A59EF03DDA}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CardsFramework.Windows", "Windows\Cards\CardsFramework.Windows.csproj", "{6DE82385-D762-4275-9185-F42995282478}"
+EndProject
+Global
+	GlobalSection(SolutionConfigurationPlatforms) = preSolution
+		Debug|Any CPU = Debug|Any CPU
+		Release|Any CPU = Release|Any CPU
+		Debug|x86 = Debug|x86
+		Release|x86 = Release|x86
+	EndGlobalSection
+	GlobalSection(ProjectConfigurationPlatforms) = postSolution
+		{595A3D98-2DFE-4C6A-ABBB-59E5E3A6776A}.Debug|Any CPU.ActiveCfg = Debug|x86
+		{595A3D98-2DFE-4C6A-ABBB-59E5E3A6776A}.Debug|Any CPU.Build.0 = Debug|x86
+		{595A3D98-2DFE-4C6A-ABBB-59E5E3A6776A}.Debug|x86.ActiveCfg = Debug|x86
+		{595A3D98-2DFE-4C6A-ABBB-59E5E3A6776A}.Debug|x86.Build.0 = Debug|x86
+		{595A3D98-2DFE-4C6A-ABBB-59E5E3A6776A}.Release|Any CPU.ActiveCfg = Release|x86
+		{595A3D98-2DFE-4C6A-ABBB-59E5E3A6776A}.Release|Any CPU.Build.0 = Release|x86
+		{595A3D98-2DFE-4C6A-ABBB-59E5E3A6776A}.Release|x86.ActiveCfg = Release|x86
+		{595A3D98-2DFE-4C6A-ABBB-59E5E3A6776A}.Release|x86.Build.0 = Release|x86
+		{6DE82385-D762-4275-9185-F42995282478}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{6DE82385-D762-4275-9185-F42995282478}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{6DE82385-D762-4275-9185-F42995282478}.Debug|x86.ActiveCfg = Debug|Any CPU
+		{6DE82385-D762-4275-9185-F42995282478}.Debug|x86.Build.0 = Debug|Any CPU
+		{6DE82385-D762-4275-9185-F42995282478}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{6DE82385-D762-4275-9185-F42995282478}.Release|Any CPU.Build.0 = Release|Any CPU
+		{6DE82385-D762-4275-9185-F42995282478}.Release|x86.ActiveCfg = Release|Any CPU
+		{6DE82385-D762-4275-9185-F42995282478}.Release|x86.Build.0 = Release|Any CPU
+		{7DE47032-A904-4C29-BD22-2D235E8D91BA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{7DE47032-A904-4C29-BD22-2D235E8D91BA}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{7DE47032-A904-4C29-BD22-2D235E8D91BA}.Debug|x86.ActiveCfg = Debug|x86
+		{7DE47032-A904-4C29-BD22-2D235E8D91BA}.Debug|x86.Build.0 = Debug|x86
+		{7DE47032-A904-4C29-BD22-2D235E8D91BA}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{7DE47032-A904-4C29-BD22-2D235E8D91BA}.Release|Any CPU.Build.0 = Release|Any CPU
+		{7DE47032-A904-4C29-BD22-2D235E8D91BA}.Release|x86.ActiveCfg = Release|x86
+		{7DE47032-A904-4C29-BD22-2D235E8D91BA}.Release|x86.Build.0 = Release|x86
+		{AE483C29-042E-4226-BA52-D247CE7676DA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{AE483C29-042E-4226-BA52-D247CE7676DA}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{AE483C29-042E-4226-BA52-D247CE7676DA}.Debug|x86.ActiveCfg = Debug|Any CPU
+		{AE483C29-042E-4226-BA52-D247CE7676DA}.Debug|x86.Build.0 = Debug|Any CPU
+		{AE483C29-042E-4226-BA52-D247CE7676DA}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{AE483C29-042E-4226-BA52-D247CE7676DA}.Release|Any CPU.Build.0 = Release|Any CPU
+		{AE483C29-042E-4226-BA52-D247CE7676DA}.Release|x86.ActiveCfg = Release|Any CPU
+		{AE483C29-042E-4226-BA52-D247CE7676DA}.Release|x86.Build.0 = Release|Any CPU
+		{E31D6E96-3539-4EB7-9529-34A59EF03DDA}.Debug|Any CPU.ActiveCfg = Debug|x86
+		{E31D6E96-3539-4EB7-9529-34A59EF03DDA}.Debug|Any CPU.Build.0 = Debug|x86
+		{E31D6E96-3539-4EB7-9529-34A59EF03DDA}.Debug|x86.ActiveCfg = Debug|x86
+		{E31D6E96-3539-4EB7-9529-34A59EF03DDA}.Debug|x86.Build.0 = Debug|x86
+		{E31D6E96-3539-4EB7-9529-34A59EF03DDA}.Release|Any CPU.ActiveCfg = Release|x86
+		{E31D6E96-3539-4EB7-9529-34A59EF03DDA}.Release|Any CPU.Build.0 = Release|x86
+		{E31D6E96-3539-4EB7-9529-34A59EF03DDA}.Release|x86.ActiveCfg = Release|x86
+		{E31D6E96-3539-4EB7-9529-34A59EF03DDA}.Release|x86.Build.0 = Release|x86
+	EndGlobalSection
+	GlobalSection(NestedProjects) = preSolution
+		{E31D6E96-3539-4EB7-9529-34A59EF03DDA} = {942BA8DE-64A2-46EC-AF91-E73F01239BFA}
+		{6DE82385-D762-4275-9185-F42995282478} = {942BA8DE-64A2-46EC-AF91-E73F01239BFA}
+	EndGlobalSection
+	GlobalSection(MonoDevelopProperties) = preSolution
+		StartupItem = Windows\Platformer\Platformer.csproj
+	EndGlobalSection
+EndGlobal

+ 34 - 34
StarterKits/Windows/Cards/BlackJack.Windows.csproj

@@ -33,10 +33,10 @@
     <DefineConstants>WINDOWS</DefineConstants>
   </PropertyGroup>
   <ItemGroup>
-    <Content Include="..\..\MacOS\Cards\CardsGame\CardsGame\Background.png">
+    <Content Include="..\..\MacOS\Cards\CardsGame\Background.png">
       <Link>Background.png</Link>
     </Content>
-    <Content Include="..\..\MacOS\Cards\CardsGame\CardsGame\GameThumbnail.png">
+    <Content Include="..\..\MacOS\Cards\CardsGame\GameThumbnail.png">
       <Link>GameThumbnail.png</Link>
     </Content>
     <Content Include="..\..\MacOS\Cards\BlackjackHiDefContent\Images\Cards\CardBack_Blue.png">
@@ -281,88 +281,88 @@
     </Content>
   </ItemGroup>
   <ItemGroup>
-    <Compile Include="..\..\MacOS\Cards\CardsGame\CardsGame\Blackjack\Game\BlackjackCardGame.cs">
+    <Compile Include="..\..\MacOS\Cards\CardsGame\Blackjack\Game\BlackjackCardGame.cs">
       <Link>Blackjack\Game\BlackjackCardGame.cs</Link>
     </Compile>
-    <Compile Include="..\..\MacOS\Cards\CardsGame\CardsGame\Blackjack\Misc\BetGameComponent.cs">
+    <Compile Include="..\..\MacOS\Cards\CardsGame\Blackjack\Misc\BetGameComponent.cs">
       <Link>Blackjack\Misc\BetGameComponent.cs</Link>
     </Compile>
-    <Compile Include="..\..\MacOS\Cards\CardsGame\CardsGame\Blackjack\Players\BlackjackAIPlayer.cs">
+    <Compile Include="..\..\MacOS\Cards\CardsGame\Blackjack\Players\BlackjackAIPlayer.cs">
       <Link>Blackjack\Players\BlackjackAIPlayer.cs</Link>
     </Compile>
-    <Compile Include="..\..\MacOS\Cards\CardsGame\CardsGame\Blackjack\Players\BlackjackPlayer.cs">
+    <Compile Include="..\..\MacOS\Cards\CardsGame\Blackjack\Players\BlackjackPlayer.cs">
       <Link>Blackjack\Players\BlackjackPlayer.cs</Link>
     </Compile>
-    <Compile Include="..\..\MacOS\Cards\CardsGame\CardsGame\Blackjack\Rules\BlackjackGameEventArgs.cs">
+    <Compile Include="..\..\MacOS\Cards\CardsGame\Blackjack\Rules\BlackjackGameEventArgs.cs">
       <Link>Blackjack\Rules\BlackjackGameEventArgs.cs</Link>
     </Compile>
-    <Compile Include="..\..\MacOS\Cards\CardsGame\CardsGame\Blackjack\Rules\BlackjackRule.cs">
+    <Compile Include="..\..\MacOS\Cards\CardsGame\Blackjack\Rules\BlackjackRule.cs">
       <Link>Blackjack\Rules\BlackjackRule.cs</Link>
     </Compile>
-    <Compile Include="..\..\MacOS\Cards\CardsGame\CardsGame\Blackjack\Rules\BustRule.cs">
+    <Compile Include="..\..\MacOS\Cards\CardsGame\Blackjack\Rules\BustRule.cs">
       <Link>Blackjack\Rules\BustRule.cs</Link>
     </Compile>
-    <Compile Include="..\..\MacOS\Cards\CardsGame\CardsGame\Blackjack\Rules\InsuranceRule.cs">
+    <Compile Include="..\..\MacOS\Cards\CardsGame\Blackjack\Rules\InsuranceRule.cs">
       <Link>Blackjack\Rules\InsuranceRule.cs</Link>
     </Compile>
-    <Compile Include="..\..\MacOS\Cards\CardsGame\CardsGame\Blackjack\UI\BlackJackAnimatedPlayerHandComponent.cs">
+    <Compile Include="..\..\MacOS\Cards\CardsGame\Blackjack\UI\BlackJackAnimatedPlayerHandComponent.cs">
       <Link>Blackjack\UI\BlackJackAnimatedPlayerHandComponent.cs</Link>
     </Compile>
-    <Compile Include="..\..\MacOS\Cards\CardsGame\CardsGame\Blackjack\UI\BlackJackTable.cs">
+    <Compile Include="..\..\MacOS\Cards\CardsGame\Blackjack\UI\BlackJackTable.cs">
       <Link>Blackjack\UI\BlackJackTable.cs</Link>
     </Compile>
-    <Compile Include="..\..\MacOS\Cards\CardsGame\CardsGame\Blackjack\UI\BlackjackAnimatedDealerHandComponent.cs">
+    <Compile Include="..\..\MacOS\Cards\CardsGame\Blackjack\UI\BlackjackAnimatedDealerHandComponent.cs">
       <Link>Blackjack\UI\BlackjackAnimatedDealerHandComponent.cs</Link>
     </Compile>
-    <Compile Include="..\..\MacOS\Cards\CardsGame\CardsGame\Blackjack\UI\Button.cs">
+    <Compile Include="..\..\MacOS\Cards\CardsGame\Blackjack\UI\Button.cs">
       <Link>Blackjack\UI\Button.cs</Link>
     </Compile>
-    <Compile Include="..\..\MacOS\Cards\CardsGame\CardsGame\Misc\AudioManager.cs">
+    <Compile Include="..\..\MacOS\Cards\CardsGame\Misc\AudioManager.cs">
       <Link>Misc\AudioManager.cs</Link>
     </Compile>
-    <Compile Include="..\..\MacOS\Cards\CardsGame\CardsGame\Misc\InputHelper.cs">
+    <Compile Include="..\..\MacOS\Cards\CardsGame\Misc\InputHelper.cs">
       <Link>Misc\InputHelper.cs</Link>
     </Compile>
-    <Compile Include="..\..\MacOS\Cards\CardsGame\CardsGame\Properties\AssemblyInfo.cs">
+    <Compile Include="..\..\MacOS\Cards\CardsGame\Properties\AssemblyInfo.cs">
       <Link>Properties\AssemblyInfo.cs</Link>
     </Compile>
-    <Compile Include="..\..\MacOS\Cards\CardsGame\CardsGame\ScreenManager\GameScreen.cs">
+    <Compile Include="..\..\MacOS\Cards\CardsGame\ScreenManager\GameScreen.cs">
       <Link>ScreenManager\GameScreen.cs</Link>
     </Compile>
-    <Compile Include="..\..\MacOS\Cards\CardsGame\CardsGame\ScreenManager\InputState.cs">
+    <Compile Include="..\..\MacOS\Cards\CardsGame\ScreenManager\InputState.cs">
       <Link>ScreenManager\InputState.cs</Link>
     </Compile>
-    <Compile Include="..\..\MacOS\Cards\CardsGame\CardsGame\ScreenManager\MenuEntry.cs">
+    <Compile Include="..\..\MacOS\Cards\CardsGame\ScreenManager\MenuEntry.cs">
       <Link>ScreenManager\MenuEntry.cs</Link>
     </Compile>
-    <Compile Include="..\..\MacOS\Cards\CardsGame\CardsGame\ScreenManager\MenuScreen.cs">
+    <Compile Include="..\..\MacOS\Cards\CardsGame\ScreenManager\MenuScreen.cs">
       <Link>ScreenManager\MenuScreen.cs</Link>
     </Compile>
-    <Compile Include="..\..\MacOS\Cards\CardsGame\CardsGame\ScreenManager\PlayerIndexEventArgs.cs">
+    <Compile Include="..\..\MacOS\Cards\CardsGame\ScreenManager\PlayerIndexEventArgs.cs">
       <Link>ScreenManager\PlayerIndexEventArgs.cs</Link>
     </Compile>
-    <Compile Include="..\..\MacOS\Cards\CardsGame\CardsGame\ScreenManager\ScreenManager.cs">
+    <Compile Include="..\..\MacOS\Cards\CardsGame\ScreenManager\ScreenManager.cs">
       <Link>ScreenManager\ScreenManager.cs</Link>
     </Compile>
-    <Compile Include="..\..\MacOS\Cards\CardsGame\CardsGame\BlackjackGame.cs">
+    <Compile Include="..\..\MacOS\Cards\CardsGame\BlackjackGame.cs">
       <Link>BlackjackGame.cs</Link>
     </Compile>
-    <Compile Include="..\..\MacOS\Cards\CardsGame\CardsGame\Screens\BackgroundScreen.cs">
+    <Compile Include="..\..\MacOS\Cards\CardsGame\Screens\BackgroundScreen.cs">
       <Link>Screens\BackgroundScreen.cs</Link>
     </Compile>
-    <Compile Include="..\..\MacOS\Cards\CardsGame\CardsGame\Screens\GameplayScreen.cs">
+    <Compile Include="..\..\MacOS\Cards\CardsGame\Screens\GameplayScreen.cs">
       <Link>Screens\GameplayScreen.cs</Link>
     </Compile>
-    <Compile Include="..\..\MacOS\Cards\CardsGame\CardsGame\Screens\InstructionScreen.cs">
+    <Compile Include="..\..\MacOS\Cards\CardsGame\Screens\InstructionScreen.cs">
       <Link>Screens\InstructionScreen.cs</Link>
     </Compile>
-    <Compile Include="..\..\MacOS\Cards\CardsGame\CardsGame\Screens\MainMenuScreen.cs">
+    <Compile Include="..\..\MacOS\Cards\CardsGame\Screens\MainMenuScreen.cs">
       <Link>Screens\MainMenuScreen.cs</Link>
     </Compile>
-    <Compile Include="..\..\MacOS\Cards\CardsGame\CardsGame\Screens\OptionsMenu.cs">
+    <Compile Include="..\..\MacOS\Cards\CardsGame\Screens\OptionsMenu.cs">
       <Link>Screens\OptionsMenu.cs</Link>
     </Compile>
-    <Compile Include="..\..\MacOS\Cards\CardsGame\CardsGame\Screens\PauseScreen.cs">
+    <Compile Include="..\..\MacOS\Cards\CardsGame\Screens\PauseScreen.cs">
       <Link>Screens\PauseScreen.cs</Link>
     </Compile>
     <Compile Include="Program.Windows.cs" />
@@ -416,14 +416,14 @@
   </ItemGroup>
   <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
   <ItemGroup>
+    <ProjectReference Include="..\..\..\..\MonoGame\MonoGame.Framework\MonoGame.Framework.Windows.csproj">
+      <Project>{7DE47032-A904-4C29-BD22-2D235E8D91BA}</Project>
+      <Name>MonoGame.Framework.Windows</Name>
+    </ProjectReference>
     <ProjectReference Include="CardsFramework.Windows.csproj">
       <Project>{6DE82385-D762-4275-9185-F42995282478}</Project>
       <Name>CardsFramework.Windows</Name>
     </ProjectReference>
-    <ProjectReference Include="..\..\..\MonoGame.Framework\MonoGame.Framework.Windows.csproj">
-      <Project>{7DE47032-A904-4C29-BD22-2D235E8D91BA}</Project>
-      <Name>MonoGame.Framework.Windows</Name>
-    </ProjectReference>
   </ItemGroup>
   <ItemGroup>
     <Reference Include="System.Core">

+ 8 - 1
StarterKits/Windows/Cards/CardsFramework.Windows.csproj

@@ -30,7 +30,8 @@
     <ConsolePause>false</ConsolePause>
   </PropertyGroup>
   <ItemGroup>
-    <Reference Include="System" />
+    <Reference Include="System">
+    </Reference>
   </ItemGroup>
   <ItemGroup>
     <Compile Include="..\..\MacOS\Cards\CardsFramework\Cards\CardPacket.cs">
@@ -89,4 +90,10 @@
     </Compile>
   </ItemGroup>
   <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
+  <ItemGroup>
+    <ProjectReference Include="..\..\..\..\MonoGame\MonoGame.Framework\MonoGame.Framework.Windows.csproj">
+      <Project>{7DE47032-A904-4C29-BD22-2D235E8D91BA}</Project>
+      <Name>MonoGame.Framework.Windows</Name>
+    </ProjectReference>
+  </ItemGroup>
 </Project>

+ 14 - 10
StarterKits/Windows/Cards/Program.Windows.cs

@@ -2,20 +2,24 @@
 using System.Collections.Generic;
 using System.Linq;
 
-namespace Microsoft.Xna.Samples.Draw2D
+namespace Blackjack
 {
     static class Program
     {
-        private static Game1 game;
-
-        /// <summary>
-        /// The main entry point for the application.
-        /// </summary>
-        [STAThread]
-        static void Main()
+        static void Main(string[] args)
         {
-            game = new Game1();
-            game.Run();
+            try
+            {
+                using (BlackjackGame game = new BlackjackGame())
+                {
+                    game.Run();
+                }
+            }
+            catch(Exception ex)
+            {
+                Console.WriteLine(ex.ToString());
+                Console.ReadLine();
+            }
         }
     }
 }