2
0
Эх сурвалжийг харах

Added Windows Platformer port

dellis1972 14 жил өмнө
parent
commit
0000648314

+ 299 - 0
StarterKits/Windows/Platformer/Platformer.csproj

@@ -0,0 +1,299 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">x86</Platform>
+    <ProductVersion>8.0.30703</ProductVersion>
+    <SchemaVersion>2.0</SchemaVersion>
+    <ProjectGuid>{595A3D98-2DFE-4C6A-ABBB-59E5E3A6776A}</ProjectGuid>
+    <OutputType>Exe</OutputType>
+    <AppDesignerFolder>Properties</AppDesignerFolder>
+    <RootNamespace>Platformer</RootNamespace>
+    <AssemblyName>Platformer</AssemblyName>
+    <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
+    <TargetFrameworkProfile>Client</TargetFrameworkProfile>
+    <FileAlignment>512</FileAlignment>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
+    <PlatformTarget>x86</PlatformTarget>
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>bin\Debug\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
+    <PlatformTarget>x86</PlatformTarget>
+    <DebugType>pdbonly</DebugType>
+    <Optimize>true</Optimize>
+    <OutputPath>bin\Release\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="System" />
+    <Reference Include="System.Core" />
+    <Reference Include="System.Xml.Linq" />
+    <Reference Include="Microsoft.CSharp" />
+    <Reference Include="System.Data" />
+    <Reference Include="System.Xml" />
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="..\..\iOS\Platformer\Accelerometer.cs">
+      <Link>Accelerometer.cs</Link>
+    </Compile>
+    <Compile Include="..\..\iOS\Platformer\Animation.cs">
+      <Link>Animation.cs</Link>
+    </Compile>
+    <Compile Include="..\..\iOS\Platformer\AnimationPlayer.cs">
+      <Link>AnimationPlayer.cs</Link>
+    </Compile>
+    <Compile Include="..\..\iOS\Platformer\Circle.cs">
+      <Link>Circle.cs</Link>
+    </Compile>
+    <Compile Include="..\..\iOS\Platformer\Enemy.cs">
+      <Link>Enemy.cs</Link>
+    </Compile>
+    <Compile Include="..\..\iOS\Platformer\Gem.cs">
+      <Link>Gem.cs</Link>
+    </Compile>
+    <Compile Include="..\..\iOS\Platformer\Level.cs">
+      <Link>Level.cs</Link>
+    </Compile>
+    <Compile Include="..\..\iOS\Platformer\PlatformerGame.cs">
+      <Link>PlatformerGame.cs</Link>
+    </Compile>
+    <Compile Include="..\..\iOS\Platformer\Player.cs">
+      <Link>Player.cs</Link>
+    </Compile>
+    <Compile Include="..\..\iOS\Platformer\RectangleExtensions.cs">
+      <Link>RectangleExtensions.cs</Link>
+    </Compile>
+    <Compile Include="..\..\iOS\Platformer\Tile.cs">
+      <Link>Tile.cs</Link>
+    </Compile>
+    <Compile Include="..\..\iOS\Platformer\TouchCollectionExtensions.cs">
+      <Link>TouchCollectionExtensions.cs</Link>
+    </Compile>
+    <Compile Include="Program.cs" />
+    <Compile Include="Properties\AssemblyInfo.cs" />
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="..\..\..\MonoGame.Framework\MonoGame.Framework.Windows.csproj">
+      <Project>{7DE47032-A904-4C29-BD22-2D235E8D91BA}</Project>
+      <Name>MonoGame.Framework.Windows</Name>
+    </ProjectReference>
+  </ItemGroup>
+  <ItemGroup>
+    <Content Include="..\..\iOS\Platformer\Content\Backgrounds\Layer0_0.png">
+      <Link>Content\Backgrounds\Layer0_0.png</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content Include="..\..\iOS\Platformer\Content\Backgrounds\Layer0_1.png">
+      <Link>Content\Backgrounds\Layer0_1.png</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content Include="..\..\iOS\Platformer\Content\Backgrounds\Layer0_2.png">
+      <Link>Content\Backgrounds\Layer0_2.png</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content Include="..\..\iOS\Platformer\Content\Backgrounds\Layer1_0.png">
+      <Link>Content\Backgrounds\Layer1_0.png</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content Include="..\..\iOS\Platformer\Content\Backgrounds\Layer1_1.png">
+      <Link>Content\Backgrounds\Layer1_1.png</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content Include="..\..\iOS\Platformer\Content\Backgrounds\Layer1_2.png">
+      <Link>Content\Backgrounds\Layer1_2.png</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content Include="..\..\iOS\Platformer\Content\Backgrounds\Layer2_0.png">
+      <Link>Content\Backgrounds\Layer2_0.png</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content Include="..\..\iOS\Platformer\Content\Backgrounds\Layer2_1.png">
+      <Link>Content\Backgrounds\Layer2_1.png</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content Include="..\..\iOS\Platformer\Content\Backgrounds\Layer2_2.png">
+      <Link>Content\Backgrounds\Layer2_2.png</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content Include="..\..\iOS\Platformer\Content\Levels\0.txt">
+      <Link>Content\Levels\0.txt</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content Include="..\..\iOS\Platformer\Content\Levels\1.txt">
+      <Link>Content\Levels\1.txt</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content Include="..\..\iOS\Platformer\Content\Levels\2.txt">
+      <Link>Content\Levels\2.txt</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content Include="..\..\iOS\Platformer\Content\Overlays\you_died.png">
+      <Link>Content\Overlays\you_died.png</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content Include="..\..\iOS\Platformer\Content\Overlays\you_lose.png">
+      <Link>Content\Overlays\you_lose.png</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content Include="..\..\iOS\Platformer\Content\Overlays\you_win.png">
+      <Link>Content\Overlays\you_win.png</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content Include="..\..\iOS\Platformer\Content\Sounds\ExitReached.wav">
+      <Link>Content\Sounds\ExitReached.mp3</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content Include="..\..\iOS\Platformer\Content\Sounds\GemCollected.wav">
+      <Link>Content\Sounds\GemCollected.wav</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content Include="..\..\iOS\Platformer\Content\Sounds\MonsterKilled.wav">
+      <Link>Content\Sounds\MonsterKilled.wav</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content Include="..\..\iOS\Platformer\Content\Sounds\Music.wav">
+      <Link>Content\Sounds\Music.mp3</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content Include="..\..\iOS\Platformer\Content\Sounds\PlayerFall.wav">
+      <Link>Content\Sounds\PlayerFall.wav</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content Include="..\..\iOS\Platformer\Content\Sounds\PlayerJump.wav">
+      <Link>Content\Sounds\PlayerJump.wav</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content Include="..\..\iOS\Platformer\Content\Sounds\PlayerKilled.wav">
+      <Link>Content\Sounds\PlayerKilled.wav</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content Include="..\..\iOS\Platformer\Content\Sounds\PowerUp.wav">
+      <Link>Content\Sounds\PowerUp.wav</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content Include="..\..\iOS\Platformer\Content\Sprites\Gem.png">
+      <Link>Content\Sprites\Gem.png</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content Include="..\..\iOS\Platformer\Content\Sprites\MonsterA\Idle.png">
+      <Link>Content\Sprites\MonsterA\Idle.png</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content Include="..\..\iOS\Platformer\Content\Sprites\MonsterA\Run.png">
+      <Link>Content\Sprites\MonsterA\Run.png</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content Include="..\..\iOS\Platformer\Content\Sprites\MonsterB\Idle.png">
+      <Link>Content\Sprites\MonsterB\Idle.png</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content Include="..\..\iOS\Platformer\Content\Sprites\MonsterB\Run.png">
+      <Link>Content\Sprites\MonsterB\Run.png</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content Include="..\..\iOS\Platformer\Content\Sprites\MonsterC\Idle.png">
+      <Link>Content\Sprites\MonsterC\Idle.png</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content Include="..\..\iOS\Platformer\Content\Sprites\MonsterC\Run.png">
+      <Link>Content\Sprites\MonsterC\Run.png</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content Include="..\..\iOS\Platformer\Content\Sprites\MonsterD\Idle.png">
+      <Link>Content\Sprites\MonsterD\Idle.png</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content Include="..\..\iOS\Platformer\Content\Sprites\MonsterD\Run.png">
+      <Link>Content\Sprites\MonsterD\Run.png</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content Include="..\..\iOS\Platformer\Content\Sprites\Player\Celebrate.png">
+      <Link>Content\Sprites\Player\Celebrate.png</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content Include="..\..\iOS\Platformer\Content\Sprites\Player\Die.png">
+      <Link>Content\Sprites\Player\Die.png</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content Include="..\..\iOS\Platformer\Content\Sprites\Player\Idle.png">
+      <Link>Content\Sprites\Player\Idle.png</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content Include="..\..\iOS\Platformer\Content\Sprites\Player\Jump.png">
+      <Link>Content\Sprites\Player\Jump.png</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content Include="..\..\iOS\Platformer\Content\Sprites\Player\Run.png">
+      <Link>Content\Sprites\Player\Run.png</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content Include="..\..\iOS\Platformer\Content\Tiles\BlockA0.png">
+      <Link>Content\Tiles\BlockA0.png</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content Include="..\..\iOS\Platformer\Content\Tiles\BlockA1.png">
+      <Link>Content\Tiles\BlockA1.png</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content Include="..\..\iOS\Platformer\Content\Tiles\BlockA2.png">
+      <Link>Content\Tiles\BlockA2.png</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content Include="..\..\iOS\Platformer\Content\Tiles\BlockA3.png">
+      <Link>Content\Tiles\BlockA3.png</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content Include="..\..\iOS\Platformer\Content\Tiles\BlockA4.png">
+      <Link>Content\Tiles\BlockA4.png</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content Include="..\..\iOS\Platformer\Content\Tiles\BlockA5.png">
+      <Link>Content\Tiles\BlockA5.png</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content Include="..\..\iOS\Platformer\Content\Tiles\BlockA6.png">
+      <Link>Content\Tiles\BlockA6.png</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content Include="..\..\iOS\Platformer\Content\Tiles\BlockB0.png">
+      <Link>Content\Tiles\BlockB0.png</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content Include="..\..\iOS\Platformer\Content\Tiles\BlockB1.png">
+      <Link>Content\Tiles\BlockB1.png</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content Include="..\..\iOS\Platformer\Content\Tiles\Exit.png">
+      <Link>Content\Tiles\Exit.png</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content Include="..\..\iOS\Platformer\Content\Tiles\Platform.png">
+      <Link>Content\Tiles\Platform.png</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+  </ItemGroup>
+  <ItemGroup>
+    <Content Include="..\..\iOS\Platformer\Content\Fonts\Hud.xnb">
+      <Link>Content\Fonts\Hud.xnb</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+  </ItemGroup>
+  <ItemGroup />
+  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
+       Other similar extension points exist, see Microsoft.Common.targets.
+  <Target Name="BeforeBuild">
+  </Target>
+  <Target Name="AfterBuild">
+  </Target>
+  -->
+</Project>

+ 26 - 0
StarterKits/Windows/Platformer/Program.cs

@@ -0,0 +1,26 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace Platformer
+{
+    class Program
+    {
+        static void Main(string[] args)
+        {
+            try
+            {
+                using (PlatformerGame game = new PlatformerGame())
+                {
+                    game.Run();
+                }
+            }
+            catch(Exception ex)
+            {
+                Console.WriteLine(ex.ToString());
+                Console.ReadLine();
+            }
+        }
+    }
+}

+ 36 - 0
StarterKits/Windows/Platformer/Properties/AssemblyInfo.cs

@@ -0,0 +1,36 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following 
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("Platformer")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("Microsoft")]
+[assembly: AssemblyProduct("Platformer")]
+[assembly: AssemblyCopyright("Copyright © Microsoft 2011")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible 
+// to COM components.  If you need to access a type in this assembly from 
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("1f9a5626-2aef-41e2-9912-6c0b8989c163")]
+
+// Version information for an assembly consists of the following four values:
+//
+//      Major Version
+//      Minor Version 
+//      Build Number
+//      Revision
+//
+// You can specify all the values or you can default the Build and Revision Numbers 
+// by using the '*' as shown below:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]