diff options
| author | Ben Beltran <ben@nsovocal.com> | 2013-11-10 22:11:08 -0600 |
|---|---|---|
| committer | Ben Beltran <ben@nsovocal.com> | 2013-11-10 22:11:08 -0600 |
| commit | 95d7601b7742ed560a9d8e00269217f62fc7ce32 (patch) | |
| tree | 66b3ac90c47c202c017e78d347bcd4c33121a28c | |
| parent | 9899ae5d21c559b98386be48c5a80e63db10552d (diff) | |
Chubas's House happened.
52 files changed, 823 insertions, 13 deletions
diff --git a/Super Polarity Content/Super Polarity Content/Super Polarity Content.csproj b/Super Polarity Content/Super Polarity Content/Super Polarity Content.csproj new file mode 100644 index 0000000..4cc2f56 --- /dev/null +++ b/Super Polarity Content/Super Polarity Content/Super Polarity Content.csproj @@ -0,0 +1,65 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0"> + <Import Project="$(MSBuildExtensionsPath)\MonoGame\v3.0\MonoGame.ContentPipeline.targets" /> + <PropertyGroup> + <ProjectGuid>{8528C189-5B94-48F8-8C64-D4D6658E52F6}</ProjectGuid> + <ProjectTypeGuids>{6D335F3A-9D43-41b4-9D22-F6F17C4BE596};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids> + <Configuration Condition=" '$(Configuration)' == '' ">Windows</Configuration> + <Platform Condition=" '$(Platform)' == '' ">x86</Platform> + <OutputType>Library</OutputType> + <AppDesignerFolder>Properties</AppDesignerFolder> + <RootNamespace>ContentBuilder</RootNamespace> + <AssemblyName>IgnoreMe</AssemblyName> + <TargetFrameworkVersion>v4.0</TargetFrameworkVersion> + <TargetFrameworkProfile>Client</TargetFrameworkProfile> + <XnaFrameworkVersion>v4.0</XnaFrameworkVersion> + <OutputPath>bin\$(Configuration)</OutputPath> + <XnaPlatform>Windows</XnaPlatform> + <XnaProfile>HiDef</XnaProfile> + <XnaCrossPlatformGroupID>70f11b5f-d758-4efc-943f-95989437d224</XnaCrossPlatformGroupID> + <XnaOutputType>Library</XnaOutputType> + <PlatformTarget>x86</PlatformTarget> + <UseVSHostingProcess>false</UseVSHostingProcess> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)' == 'Windows' "> + <MonoGamePlatform>Windows</MonoGamePlatform> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)' == 'Windows8' "> + <MonoGamePlatform>Windows8</MonoGamePlatform> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)' == 'Android' "> + <MonoGamePlatform>Android</MonoGamePlatform> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)' == 'iOS' "> + <MonoGamePlatform>iOS</MonoGamePlatform> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)' == 'OSX' "> + <MonoGamePlatform>OSX</MonoGamePlatform> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)' == 'Linux' "> + <MonoGamePlatform>Linux</MonoGamePlatform> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)' == 'PSM' "> + <MonoGamePlatform>PSM</MonoGamePlatform> + </PropertyGroup> + <ItemGroup> + <Reference Include="mscorlib" /> + </ItemGroup> + <ItemGroup> + <ProjectReference Include="..\Super Polarity ContentContent\Super Polarity ContentContent.contentproj"> + <Project>{468F8415-7D38-4718-B0B4-E18F1A427136}</Project> + <Name>Super Polarity ContentContent %28Content%29</Name> + <XnaReferenceType>Content</XnaReferenceType> + </ProjectReference> + </ItemGroup> + <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> + <Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\Microsoft.Xna.GameStudio.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>
\ No newline at end of file diff --git a/Super Polarity Content/Super Polarity ContentContent/Graphics/circle.png b/Super Polarity Content/Super Polarity ContentContent/Graphics/circle.png Binary files differnew file mode 100644 index 0000000..ede9996 --- /dev/null +++ b/Super Polarity Content/Super Polarity ContentContent/Graphics/circle.png diff --git a/Super Polarity Content/Super Polarity ContentContent/Graphics/diamond.png b/Super Polarity Content/Super Polarity ContentContent/Graphics/diamond.png Binary files differnew file mode 100644 index 0000000..f06a523 --- /dev/null +++ b/Super Polarity Content/Super Polarity ContentContent/Graphics/diamond.png diff --git a/Super Polarity Content/Super Polarity ContentContent/Graphics/main-ship.png b/Super Polarity Content/Super Polarity ContentContent/Graphics/main-ship.png Binary files differnew file mode 100644 index 0000000..168ce43 --- /dev/null +++ b/Super Polarity Content/Super Polarity ContentContent/Graphics/main-ship.png diff --git a/Super Polarity Content/Super Polarity ContentContent/Graphics/negative-cruiser.png b/Super Polarity Content/Super Polarity ContentContent/Graphics/negative-cruiser.png Binary files differnew file mode 100644 index 0000000..0461e90 --- /dev/null +++ b/Super Polarity Content/Super Polarity ContentContent/Graphics/negative-cruiser.png diff --git a/Super Polarity Content/Super Polarity ContentContent/Graphics/negative-destroyer.png b/Super Polarity Content/Super Polarity ContentContent/Graphics/negative-destroyer.png Binary files differnew file mode 100644 index 0000000..25244f2 --- /dev/null +++ b/Super Polarity Content/Super Polarity ContentContent/Graphics/negative-destroyer.png diff --git a/Super Polarity Content/Super Polarity ContentContent/Graphics/negative-scout.png b/Super Polarity Content/Super Polarity ContentContent/Graphics/negative-scout.png Binary files differnew file mode 100644 index 0000000..fdc372b --- /dev/null +++ b/Super Polarity Content/Super Polarity ContentContent/Graphics/negative-scout.png diff --git a/Super Polarity Content/Super Polarity ContentContent/Graphics/negative-supercruiser.png b/Super Polarity Content/Super Polarity ContentContent/Graphics/negative-supercruiser.png Binary files differnew file mode 100644 index 0000000..344ef93 --- /dev/null +++ b/Super Polarity Content/Super Polarity ContentContent/Graphics/negative-supercruiser.png diff --git a/Super Polarity Content/Super Polarity ContentContent/Graphics/neutral-cruiser.png b/Super Polarity Content/Super Polarity ContentContent/Graphics/neutral-cruiser.png Binary files differnew file mode 100644 index 0000000..3f5be69 --- /dev/null +++ b/Super Polarity Content/Super Polarity ContentContent/Graphics/neutral-cruiser.png diff --git a/Super Polarity Content/Super Polarity ContentContent/Graphics/neutral-destroyer.png b/Super Polarity Content/Super Polarity ContentContent/Graphics/neutral-destroyer.png Binary files differnew file mode 100644 index 0000000..458ec8e --- /dev/null +++ b/Super Polarity Content/Super Polarity ContentContent/Graphics/neutral-destroyer.png diff --git a/Super Polarity Content/Super Polarity ContentContent/Graphics/neutral-scout.png b/Super Polarity Content/Super Polarity ContentContent/Graphics/neutral-scout.png Binary files differnew file mode 100644 index 0000000..e7a1364 --- /dev/null +++ b/Super Polarity Content/Super Polarity ContentContent/Graphics/neutral-scout.png diff --git a/Super Polarity Content/Super Polarity ContentContent/Graphics/neutral-ship.png b/Super Polarity Content/Super Polarity ContentContent/Graphics/neutral-ship.png Binary files differnew file mode 100644 index 0000000..6b0a767 --- /dev/null +++ b/Super Polarity Content/Super Polarity ContentContent/Graphics/neutral-ship.png diff --git a/Super Polarity Content/Super Polarity ContentContent/Graphics/neutral-supercruiser.png b/Super Polarity Content/Super Polarity ContentContent/Graphics/neutral-supercruiser.png Binary files differnew file mode 100644 index 0000000..183b71c --- /dev/null +++ b/Super Polarity Content/Super Polarity ContentContent/Graphics/neutral-supercruiser.png diff --git a/Super Polarity Content/Super Polarity ContentContent/Graphics/positive-cruiser.png b/Super Polarity Content/Super Polarity ContentContent/Graphics/positive-cruiser.png Binary files differnew file mode 100644 index 0000000..62da8bc --- /dev/null +++ b/Super Polarity Content/Super Polarity ContentContent/Graphics/positive-cruiser.png diff --git a/Super Polarity Content/Super Polarity ContentContent/Graphics/positive-destroyer.png b/Super Polarity Content/Super Polarity ContentContent/Graphics/positive-destroyer.png Binary files differnew file mode 100644 index 0000000..735d473 --- /dev/null +++ b/Super Polarity Content/Super Polarity ContentContent/Graphics/positive-destroyer.png diff --git a/Super Polarity Content/Super Polarity ContentContent/Graphics/positive-scout.png b/Super Polarity Content/Super Polarity ContentContent/Graphics/positive-scout.png Binary files differnew file mode 100644 index 0000000..1970625 --- /dev/null +++ b/Super Polarity Content/Super Polarity ContentContent/Graphics/positive-scout.png diff --git a/Super Polarity Content/Super Polarity ContentContent/Graphics/positive-ship.png b/Super Polarity Content/Super Polarity ContentContent/Graphics/positive-ship.png Binary files differnew file mode 100644 index 0000000..9d07a8c --- /dev/null +++ b/Super Polarity Content/Super Polarity ContentContent/Graphics/positive-ship.png diff --git a/Super Polarity Content/Super Polarity ContentContent/Graphics/positive-supercruiser.png b/Super Polarity Content/Super Polarity ContentContent/Graphics/positive-supercruiser.png Binary files differnew file mode 100644 index 0000000..6b2a77b --- /dev/null +++ b/Super Polarity Content/Super Polarity ContentContent/Graphics/positive-supercruiser.png diff --git a/Super Polarity Content/Super Polarity ContentContent/Graphics/star.png b/Super Polarity Content/Super Polarity ContentContent/Graphics/star.png Binary files differnew file mode 100644 index 0000000..4f207f4 --- /dev/null +++ b/Super Polarity Content/Super Polarity ContentContent/Graphics/star.png diff --git a/Super Polarity Content/Super Polarity ContentContent/Super Polarity ContentContent.contentproj b/Super Polarity Content/Super Polarity ContentContent/Super Polarity ContentContent.contentproj new file mode 100644 index 0000000..4e7a9f0 --- /dev/null +++ b/Super Polarity Content/Super Polarity ContentContent/Super Polarity ContentContent.contentproj @@ -0,0 +1,141 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0"> + <PropertyGroup> + <ProjectGuid>{468F8415-7D38-4718-B0B4-E18F1A427136}</ProjectGuid> + <ProjectTypeGuids>{96E2B04D-8817-42c6-938A-82C39BA4D311};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids> + <Configuration Condition=" '$(Configuration)' == '' ">Windows</Configuration> + <Platform Condition=" '$(Platform)' == '' ">x86</Platform> + <OutputType>Library</OutputType> + <AppDesignerFolder>Properties</AppDesignerFolder> + <RootNamespace>Super_Polarity_ContentContentContent</RootNamespace> + <TargetFrameworkVersion>v4.0</TargetFrameworkVersion> + <XnaFrameworkVersion>v4.0</XnaFrameworkVersion> + <MonoGamePlatform>Windows</MonoGamePlatform> + <OutputPath>bin\$(MonoGamePlatform)\$(Configuration)</OutputPath> + <ContentRootDirectory>Content</ContentRootDirectory> + <PlatformTarget>x86</PlatformTarget> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)' == 'Windows' "> + <MonoGamePlatform>Windows</MonoGamePlatform> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)' == 'Windows8' "> + <MonoGamePlatform>Windows8</MonoGamePlatform> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)' == 'Android' "> + <MonoGamePlatform>Android</MonoGamePlatform> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)' == 'iOS' "> + <MonoGamePlatform>iOS</MonoGamePlatform> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)' == 'OSX' "> + <MonoGamePlatform>OSX</MonoGamePlatform> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)' == 'Linux' "> + <MonoGamePlatform>Linux</MonoGamePlatform> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)' == 'PSM' "> + <MonoGamePlatform>PSM</MonoGamePlatform> + </PropertyGroup> + <ItemGroup> + <Reference Include="Microsoft.Xna.Framework.Content.Pipeline.EffectImporter" /> + <Reference Include="Microsoft.Xna.Framework.Content.Pipeline.FBXImporter" /> + <Reference Include="Microsoft.Xna.Framework.Content.Pipeline.TextureImporter" /> + <Reference Include="Microsoft.Xna.Framework.Content.Pipeline.XImporter" /> + <Reference Include="Microsoft.Xna.Framework.Content.Pipeline.AudioImporters" /> + <Reference Include="Microsoft.Xna.Framework.Content.Pipeline.VideoImporters" /> + <Reference Include="MonoGameContentProcessors"> + <HintPath>$(MSBuildExtensionsPath)\MonoGame\v3.0\MonoGameContentProcessors.dll</HintPath> + </Reference> + </ItemGroup> + <ItemGroup> + <Compile Include="Graphics\main-ship.png"> + <Name>main-ship</Name> + <Processor>TextureProcessor</Processor> + </Compile> + <Compile Include="Graphics\negative-cruiser.png"> + <Name>negative-cruiser</Name> + <Processor>TextureProcessor</Processor> + </Compile> + <Compile Include="Graphics\negative-destroyer.png"> + <Name>negative-destroyer</Name> + <Processor>TextureProcessor</Processor> + </Compile> + <Compile Include="Graphics\negative-scout.png"> + <Name>negative-scout</Name> + <Processor>TextureProcessor</Processor> + </Compile> + <Compile Include="Graphics\negative-supercruiser.png"> + <Name>negative-supercruiser</Name> + <Processor>TextureProcessor</Processor> + </Compile> + <Compile Include="Graphics\neutral-cruiser.png"> + <Name>neutral-cruiser</Name> + <Processor>TextureProcessor</Processor> + </Compile> + <Compile Include="Graphics\neutral-destroyer.png"> + <Name>neutral-destroyer</Name> + <Processor>TextureProcessor</Processor> + </Compile> + <Compile Include="Graphics\neutral-scout.png"> + <Name>neutral-scout</Name> + <Processor>TextureProcessor</Processor> + </Compile> + <Compile Include="Graphics\neutral-ship.png"> + <Name>neutral-ship</Name> + <Processor>TextureProcessor</Processor> + </Compile> + <Compile Include="Graphics\neutral-supercruiser.png"> + <Name>neutral-supercruiser</Name> + <Processor>TextureProcessor</Processor> + </Compile> + <Compile Include="Graphics\positive-cruiser.png"> + <Name>positive-cruiser</Name> + <Processor>TextureProcessor</Processor> + </Compile> + <Compile Include="Graphics\positive-destroyer.png"> + <Name>positive-destroyer</Name> + <Processor>TextureProcessor</Processor> + </Compile> + <Compile Include="Graphics\positive-scout.png"> + <Name>positive-scout</Name> + <Processor>TextureProcessor</Processor> + </Compile> + <Compile Include="Graphics\positive-ship.png"> + <Name>positive-ship</Name> + <Processor>TextureProcessor</Processor> + </Compile> + <Compile Include="Graphics\positive-supercruiser.png"> + <Name>positive-supercruiser</Name> + <Processor>TextureProcessor</Processor> + </Compile> + </ItemGroup> + <ItemGroup> + <Folder Include="Sound\" /> + </ItemGroup> + <ItemGroup> + <Compile Include="Graphics\circle.png"> + <Name>circle</Name> + <Importer>TextureImporter</Importer> + <Processor>TextureProcessor</Processor> + </Compile> + <Compile Include="Graphics\diamond.png"> + <Name>diamond</Name> + <Importer>TextureImporter</Importer> + <Processor>TextureProcessor</Processor> + </Compile> + <Compile Include="Graphics\star.png"> + <Name>star</Name> + <Importer>TextureImporter</Importer> + <Processor>TextureProcessor</Processor> + </Compile> + </ItemGroup> + <Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\$(XnaFrameworkVersion)\Microsoft.Xna.GameStudio.ContentPipeline.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>
\ No newline at end of file diff --git a/Super Polarity.sln b/Super Polarity.sln index 20fcaa8..6742318 100644 --- a/Super Polarity.sln +++ b/Super Polarity.sln @@ -3,16 +3,158 @@ Microsoft Visual Studio Solution File, Format Version 11.00 # Visual C# Express 2010 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Super Polarity", "Super Polarity\Super Polarity.csproj", "{2585188B-339D-44CD-9599-1A80AA30DE13}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Super Polarity Content", "Super Polarity Content\Super Polarity Content\Super Polarity Content.csproj", "{8528C189-5B94-48F8-8C64-D4D6658E52F6}" +EndProject +Project("{96E2B04D-8817-42C6-938A-82C39BA4D311}") = "Super Polarity ContentContent", "Super Polarity Content\Super Polarity ContentContent\Super Polarity ContentContent.contentproj", "{468F8415-7D38-4718-B0B4-E18F1A427136}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution + Android|Any CPU = Android|Any CPU + Android|Mixed Platforms = Android|Mixed Platforms + Android|x86 = Android|x86 + Debug|Any CPU = Debug|Any CPU + Debug|Mixed Platforms = Debug|Mixed Platforms Debug|x86 = Debug|x86 + iOS|Any CPU = iOS|Any CPU + iOS|Mixed Platforms = iOS|Mixed Platforms + iOS|x86 = iOS|x86 + Linux|Any CPU = Linux|Any CPU + Linux|Mixed Platforms = Linux|Mixed Platforms + Linux|x86 = Linux|x86 + OSX|Any CPU = OSX|Any CPU + OSX|Mixed Platforms = OSX|Mixed Platforms + OSX|x86 = OSX|x86 + PSM|Any CPU = PSM|Any CPU + PSM|Mixed Platforms = PSM|Mixed Platforms + PSM|x86 = PSM|x86 + Release|Any CPU = Release|Any CPU + Release|Mixed Platforms = Release|Mixed Platforms Release|x86 = Release|x86 + Windows|Any CPU = Windows|Any CPU + Windows|Mixed Platforms = Windows|Mixed Platforms + Windows|x86 = Windows|x86 + Windows8|Any CPU = Windows8|Any CPU + Windows8|Mixed Platforms = Windows8|Mixed Platforms + Windows8|x86 = Windows8|x86 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution + {2585188B-339D-44CD-9599-1A80AA30DE13}.Android|Any CPU.ActiveCfg = Release|x86 + {2585188B-339D-44CD-9599-1A80AA30DE13}.Android|Mixed Platforms.ActiveCfg = Release|x86 + {2585188B-339D-44CD-9599-1A80AA30DE13}.Android|Mixed Platforms.Build.0 = Release|x86 + {2585188B-339D-44CD-9599-1A80AA30DE13}.Android|x86.ActiveCfg = Release|x86 + {2585188B-339D-44CD-9599-1A80AA30DE13}.Android|x86.Build.0 = Release|x86 + {2585188B-339D-44CD-9599-1A80AA30DE13}.Debug|Any CPU.ActiveCfg = Debug|x86 + {2585188B-339D-44CD-9599-1A80AA30DE13}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 + {2585188B-339D-44CD-9599-1A80AA30DE13}.Debug|Mixed Platforms.Build.0 = Debug|x86 {2585188B-339D-44CD-9599-1A80AA30DE13}.Debug|x86.ActiveCfg = Debug|x86 {2585188B-339D-44CD-9599-1A80AA30DE13}.Debug|x86.Build.0 = Debug|x86 + {2585188B-339D-44CD-9599-1A80AA30DE13}.iOS|Any CPU.ActiveCfg = Release|x86 + {2585188B-339D-44CD-9599-1A80AA30DE13}.iOS|Mixed Platforms.ActiveCfg = Release|x86 + {2585188B-339D-44CD-9599-1A80AA30DE13}.iOS|Mixed Platforms.Build.0 = Release|x86 + {2585188B-339D-44CD-9599-1A80AA30DE13}.iOS|x86.ActiveCfg = Release|x86 + {2585188B-339D-44CD-9599-1A80AA30DE13}.iOS|x86.Build.0 = Release|x86 + {2585188B-339D-44CD-9599-1A80AA30DE13}.Linux|Any CPU.ActiveCfg = Release|x86 + {2585188B-339D-44CD-9599-1A80AA30DE13}.Linux|Mixed Platforms.ActiveCfg = Release|x86 + {2585188B-339D-44CD-9599-1A80AA30DE13}.Linux|Mixed Platforms.Build.0 = Release|x86 + {2585188B-339D-44CD-9599-1A80AA30DE13}.Linux|x86.ActiveCfg = Release|x86 + {2585188B-339D-44CD-9599-1A80AA30DE13}.Linux|x86.Build.0 = Release|x86 + {2585188B-339D-44CD-9599-1A80AA30DE13}.OSX|Any CPU.ActiveCfg = Release|x86 + {2585188B-339D-44CD-9599-1A80AA30DE13}.OSX|Mixed Platforms.ActiveCfg = Release|x86 + {2585188B-339D-44CD-9599-1A80AA30DE13}.OSX|Mixed Platforms.Build.0 = Release|x86 + {2585188B-339D-44CD-9599-1A80AA30DE13}.OSX|x86.ActiveCfg = Release|x86 + {2585188B-339D-44CD-9599-1A80AA30DE13}.OSX|x86.Build.0 = Release|x86 + {2585188B-339D-44CD-9599-1A80AA30DE13}.PSM|Any CPU.ActiveCfg = Release|x86 + {2585188B-339D-44CD-9599-1A80AA30DE13}.PSM|Mixed Platforms.ActiveCfg = Release|x86 + {2585188B-339D-44CD-9599-1A80AA30DE13}.PSM|Mixed Platforms.Build.0 = Release|x86 + {2585188B-339D-44CD-9599-1A80AA30DE13}.PSM|x86.ActiveCfg = Release|x86 + {2585188B-339D-44CD-9599-1A80AA30DE13}.PSM|x86.Build.0 = Release|x86 + {2585188B-339D-44CD-9599-1A80AA30DE13}.Release|Any CPU.ActiveCfg = Release|x86 + {2585188B-339D-44CD-9599-1A80AA30DE13}.Release|Mixed Platforms.ActiveCfg = Release|x86 + {2585188B-339D-44CD-9599-1A80AA30DE13}.Release|Mixed Platforms.Build.0 = Release|x86 {2585188B-339D-44CD-9599-1A80AA30DE13}.Release|x86.ActiveCfg = Release|x86 {2585188B-339D-44CD-9599-1A80AA30DE13}.Release|x86.Build.0 = Release|x86 + {2585188B-339D-44CD-9599-1A80AA30DE13}.Windows|Any CPU.ActiveCfg = Release|x86 + {2585188B-339D-44CD-9599-1A80AA30DE13}.Windows|Mixed Platforms.ActiveCfg = Release|x86 + {2585188B-339D-44CD-9599-1A80AA30DE13}.Windows|Mixed Platforms.Build.0 = Release|x86 + {2585188B-339D-44CD-9599-1A80AA30DE13}.Windows|x86.ActiveCfg = Release|x86 + {2585188B-339D-44CD-9599-1A80AA30DE13}.Windows|x86.Build.0 = Release|x86 + {2585188B-339D-44CD-9599-1A80AA30DE13}.Windows8|Any CPU.ActiveCfg = Release|x86 + {2585188B-339D-44CD-9599-1A80AA30DE13}.Windows8|Mixed Platforms.ActiveCfg = Release|x86 + {2585188B-339D-44CD-9599-1A80AA30DE13}.Windows8|Mixed Platforms.Build.0 = Release|x86 + {2585188B-339D-44CD-9599-1A80AA30DE13}.Windows8|x86.ActiveCfg = Release|x86 + {2585188B-339D-44CD-9599-1A80AA30DE13}.Windows8|x86.Build.0 = Release|x86 + {8528C189-5B94-48F8-8C64-D4D6658E52F6}.Android|Any CPU.ActiveCfg = Android|Any CPU + {8528C189-5B94-48F8-8C64-D4D6658E52F6}.Android|Any CPU.Build.0 = Android|Any CPU + {8528C189-5B94-48F8-8C64-D4D6658E52F6}.Android|Mixed Platforms.ActiveCfg = Android|Any CPU + {8528C189-5B94-48F8-8C64-D4D6658E52F6}.Android|Mixed Platforms.Build.0 = Android|Any CPU + {8528C189-5B94-48F8-8C64-D4D6658E52F6}.Android|x86.ActiveCfg = Android|Any CPU + {8528C189-5B94-48F8-8C64-D4D6658E52F6}.Debug|Any CPU.ActiveCfg = PSM|Any CPU + {8528C189-5B94-48F8-8C64-D4D6658E52F6}.Debug|Any CPU.Build.0 = PSM|Any CPU + {8528C189-5B94-48F8-8C64-D4D6658E52F6}.Debug|Mixed Platforms.ActiveCfg = PSM|Any CPU + {8528C189-5B94-48F8-8C64-D4D6658E52F6}.Debug|Mixed Platforms.Build.0 = PSM|Any CPU + {8528C189-5B94-48F8-8C64-D4D6658E52F6}.Debug|x86.ActiveCfg = PSM|Any CPU + {8528C189-5B94-48F8-8C64-D4D6658E52F6}.iOS|Any CPU.ActiveCfg = iOS|Any CPU + {8528C189-5B94-48F8-8C64-D4D6658E52F6}.iOS|Any CPU.Build.0 = iOS|Any CPU + {8528C189-5B94-48F8-8C64-D4D6658E52F6}.iOS|Mixed Platforms.ActiveCfg = iOS|Any CPU + {8528C189-5B94-48F8-8C64-D4D6658E52F6}.iOS|Mixed Platforms.Build.0 = iOS|Any CPU + {8528C189-5B94-48F8-8C64-D4D6658E52F6}.iOS|x86.ActiveCfg = iOS|Any CPU + {8528C189-5B94-48F8-8C64-D4D6658E52F6}.Linux|Any CPU.ActiveCfg = Linux|Any CPU + {8528C189-5B94-48F8-8C64-D4D6658E52F6}.Linux|Any CPU.Build.0 = Linux|Any CPU + {8528C189-5B94-48F8-8C64-D4D6658E52F6}.Linux|Mixed Platforms.ActiveCfg = Linux|Any CPU + {8528C189-5B94-48F8-8C64-D4D6658E52F6}.Linux|Mixed Platforms.Build.0 = Linux|Any CPU + {8528C189-5B94-48F8-8C64-D4D6658E52F6}.Linux|x86.ActiveCfg = Linux|Any CPU + {8528C189-5B94-48F8-8C64-D4D6658E52F6}.OSX|Any CPU.ActiveCfg = OSX|Any CPU + {8528C189-5B94-48F8-8C64-D4D6658E52F6}.OSX|Any CPU.Build.0 = OSX|Any CPU + {8528C189-5B94-48F8-8C64-D4D6658E52F6}.OSX|Mixed Platforms.ActiveCfg = OSX|Any CPU + {8528C189-5B94-48F8-8C64-D4D6658E52F6}.OSX|Mixed Platforms.Build.0 = OSX|Any CPU + {8528C189-5B94-48F8-8C64-D4D6658E52F6}.OSX|x86.ActiveCfg = OSX|Any CPU + {8528C189-5B94-48F8-8C64-D4D6658E52F6}.PSM|Any CPU.ActiveCfg = PSM|Any CPU + {8528C189-5B94-48F8-8C64-D4D6658E52F6}.PSM|Any CPU.Build.0 = PSM|Any CPU + {8528C189-5B94-48F8-8C64-D4D6658E52F6}.PSM|Mixed Platforms.ActiveCfg = PSM|Any CPU + {8528C189-5B94-48F8-8C64-D4D6658E52F6}.PSM|Mixed Platforms.Build.0 = PSM|Any CPU + {8528C189-5B94-48F8-8C64-D4D6658E52F6}.PSM|x86.ActiveCfg = PSM|Any CPU + {8528C189-5B94-48F8-8C64-D4D6658E52F6}.Release|Any CPU.ActiveCfg = PSM|Any CPU + {8528C189-5B94-48F8-8C64-D4D6658E52F6}.Release|Any CPU.Build.0 = PSM|Any CPU + {8528C189-5B94-48F8-8C64-D4D6658E52F6}.Release|Mixed Platforms.ActiveCfg = PSM|Any CPU + {8528C189-5B94-48F8-8C64-D4D6658E52F6}.Release|Mixed Platforms.Build.0 = PSM|Any CPU + {8528C189-5B94-48F8-8C64-D4D6658E52F6}.Release|x86.ActiveCfg = PSM|Any CPU + {8528C189-5B94-48F8-8C64-D4D6658E52F6}.Windows|Any CPU.ActiveCfg = Windows|Any CPU + {8528C189-5B94-48F8-8C64-D4D6658E52F6}.Windows|Any CPU.Build.0 = Windows|Any CPU + {8528C189-5B94-48F8-8C64-D4D6658E52F6}.Windows|Mixed Platforms.ActiveCfg = Windows|Any CPU + {8528C189-5B94-48F8-8C64-D4D6658E52F6}.Windows|Mixed Platforms.Build.0 = Windows|Any CPU + {8528C189-5B94-48F8-8C64-D4D6658E52F6}.Windows|x86.ActiveCfg = Windows|Any CPU + {8528C189-5B94-48F8-8C64-D4D6658E52F6}.Windows8|Any CPU.ActiveCfg = Windows8|Any CPU + {8528C189-5B94-48F8-8C64-D4D6658E52F6}.Windows8|Any CPU.Build.0 = Windows8|Any CPU + {8528C189-5B94-48F8-8C64-D4D6658E52F6}.Windows8|Mixed Platforms.ActiveCfg = Windows8|Any CPU + {8528C189-5B94-48F8-8C64-D4D6658E52F6}.Windows8|Mixed Platforms.Build.0 = Windows8|Any CPU + {8528C189-5B94-48F8-8C64-D4D6658E52F6}.Windows8|x86.ActiveCfg = Windows8|Any CPU + {468F8415-7D38-4718-B0B4-E18F1A427136}.Android|Any CPU.ActiveCfg = Android|Any CPU + {468F8415-7D38-4718-B0B4-E18F1A427136}.Android|Mixed Platforms.ActiveCfg = Android|Any CPU + {468F8415-7D38-4718-B0B4-E18F1A427136}.Android|x86.ActiveCfg = Android|Any CPU + {468F8415-7D38-4718-B0B4-E18F1A427136}.Debug|Any CPU.ActiveCfg = PSM|Any CPU + {468F8415-7D38-4718-B0B4-E18F1A427136}.Debug|Mixed Platforms.ActiveCfg = PSM|Any CPU + {468F8415-7D38-4718-B0B4-E18F1A427136}.Debug|x86.ActiveCfg = PSM|Any CPU + {468F8415-7D38-4718-B0B4-E18F1A427136}.iOS|Any CPU.ActiveCfg = iOS|Any CPU + {468F8415-7D38-4718-B0B4-E18F1A427136}.iOS|Mixed Platforms.ActiveCfg = iOS|Any CPU + {468F8415-7D38-4718-B0B4-E18F1A427136}.iOS|x86.ActiveCfg = iOS|Any CPU + {468F8415-7D38-4718-B0B4-E18F1A427136}.Linux|Any CPU.ActiveCfg = Linux|Any CPU + {468F8415-7D38-4718-B0B4-E18F1A427136}.Linux|Mixed Platforms.ActiveCfg = Linux|Any CPU + {468F8415-7D38-4718-B0B4-E18F1A427136}.Linux|x86.ActiveCfg = Linux|Any CPU + {468F8415-7D38-4718-B0B4-E18F1A427136}.OSX|Any CPU.ActiveCfg = OSX|Any CPU + {468F8415-7D38-4718-B0B4-E18F1A427136}.OSX|Mixed Platforms.ActiveCfg = OSX|Any CPU + {468F8415-7D38-4718-B0B4-E18F1A427136}.OSX|x86.ActiveCfg = OSX|Any CPU + {468F8415-7D38-4718-B0B4-E18F1A427136}.PSM|Any CPU.ActiveCfg = PSM|Any CPU + {468F8415-7D38-4718-B0B4-E18F1A427136}.PSM|Mixed Platforms.ActiveCfg = PSM|Any CPU + {468F8415-7D38-4718-B0B4-E18F1A427136}.PSM|x86.ActiveCfg = PSM|Any CPU + {468F8415-7D38-4718-B0B4-E18F1A427136}.Release|Any CPU.ActiveCfg = PSM|Any CPU + {468F8415-7D38-4718-B0B4-E18F1A427136}.Release|Mixed Platforms.ActiveCfg = PSM|Any CPU + {468F8415-7D38-4718-B0B4-E18F1A427136}.Release|x86.ActiveCfg = PSM|Any CPU + {468F8415-7D38-4718-B0B4-E18F1A427136}.Windows|Any CPU.ActiveCfg = Windows|Any CPU + {468F8415-7D38-4718-B0B4-E18F1A427136}.Windows|Mixed Platforms.ActiveCfg = Windows|Any CPU + {468F8415-7D38-4718-B0B4-E18F1A427136}.Windows|x86.ActiveCfg = Windows|Any CPU + {468F8415-7D38-4718-B0B4-E18F1A427136}.Windows8|Any CPU.ActiveCfg = Windows8|Any CPU + {468F8415-7D38-4718-B0B4-E18F1A427136}.Windows8|Mixed Platforms.ActiveCfg = Windows8|Any CPU + {468F8415-7D38-4718-B0B4-E18F1A427136}.Windows8|x86.ActiveCfg = Windows8|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/Super Polarity.suo b/Super Polarity.suo Binary files differindex 5f14b6d..c83e2df 100644 --- a/Super Polarity.suo +++ b/Super Polarity.suo diff --git a/Super Polarity/Content/Graphics/circle.xnb b/Super Polarity/Content/Graphics/circle.xnb Binary files differnew file mode 100644 index 0000000..3471449 --- /dev/null +++ b/Super Polarity/Content/Graphics/circle.xnb diff --git a/Super Polarity/Content/Graphics/diamond.xnb b/Super Polarity/Content/Graphics/diamond.xnb Binary files differnew file mode 100644 index 0000000..8bda70c --- /dev/null +++ b/Super Polarity/Content/Graphics/diamond.xnb diff --git a/Super Polarity/Content/Graphics/main-ship.xnb b/Super Polarity/Content/Graphics/main-ship.xnb Binary files differnew file mode 100644 index 0000000..7108e2f --- /dev/null +++ b/Super Polarity/Content/Graphics/main-ship.xnb diff --git a/Super Polarity/Content/Graphics/negative-cruiser.xnb b/Super Polarity/Content/Graphics/negative-cruiser.xnb Binary files differnew file mode 100644 index 0000000..5c9f41d --- /dev/null +++ b/Super Polarity/Content/Graphics/negative-cruiser.xnb diff --git a/Super Polarity/Content/Graphics/negative-destroyer.xnb b/Super Polarity/Content/Graphics/negative-destroyer.xnb Binary files differnew file mode 100644 index 0000000..fe13745 --- /dev/null +++ b/Super Polarity/Content/Graphics/negative-destroyer.xnb diff --git a/Super Polarity/Content/Graphics/negative-scout.xnb b/Super Polarity/Content/Graphics/negative-scout.xnb Binary files differnew file mode 100644 index 0000000..a5a2e7a --- /dev/null +++ b/Super Polarity/Content/Graphics/negative-scout.xnb diff --git a/Super Polarity/Content/Graphics/negative-supercruiser.xnb b/Super Polarity/Content/Graphics/negative-supercruiser.xnb Binary files differnew file mode 100644 index 0000000..b77f364 --- /dev/null +++ b/Super Polarity/Content/Graphics/negative-supercruiser.xnb diff --git a/Super Polarity/Content/Graphics/neutral-cruiser.xnb b/Super Polarity/Content/Graphics/neutral-cruiser.xnb Binary files differnew file mode 100644 index 0000000..ac99113 --- /dev/null +++ b/Super Polarity/Content/Graphics/neutral-cruiser.xnb diff --git a/Super Polarity/Content/Graphics/neutral-destroyer.xnb b/Super Polarity/Content/Graphics/neutral-destroyer.xnb Binary files differnew file mode 100644 index 0000000..69b5924 --- /dev/null +++ b/Super Polarity/Content/Graphics/neutral-destroyer.xnb diff --git a/Super Polarity/Content/Graphics/neutral-scout.xnb b/Super Polarity/Content/Graphics/neutral-scout.xnb Binary files differnew file mode 100644 index 0000000..5e9ff59 --- /dev/null +++ b/Super Polarity/Content/Graphics/neutral-scout.xnb diff --git a/Super Polarity/Content/Graphics/neutral-ship.xnb b/Super Polarity/Content/Graphics/neutral-ship.xnb Binary files differnew file mode 100644 index 0000000..04259be --- /dev/null +++ b/Super Polarity/Content/Graphics/neutral-ship.xnb diff --git a/Super Polarity/Content/Graphics/neutral-supercruiser.xnb b/Super Polarity/Content/Graphics/neutral-supercruiser.xnb Binary files differnew file mode 100644 index 0000000..1389842 --- /dev/null +++ b/Super Polarity/Content/Graphics/neutral-supercruiser.xnb diff --git a/Super Polarity/Content/Graphics/positive-cruiser.xnb b/Super Polarity/Content/Graphics/positive-cruiser.xnb Binary files differnew file mode 100644 index 0000000..b65d2bd --- /dev/null +++ b/Super Polarity/Content/Graphics/positive-cruiser.xnb diff --git a/Super Polarity/Content/Graphics/positive-destroyer.xnb b/Super Polarity/Content/Graphics/positive-destroyer.xnb Binary files differnew file mode 100644 index 0000000..d773175 --- /dev/null +++ b/Super Polarity/Content/Graphics/positive-destroyer.xnb diff --git a/Super Polarity/Content/Graphics/positive-scout.xnb b/Super Polarity/Content/Graphics/positive-scout.xnb Binary files differnew file mode 100644 index 0000000..2b8f9fe --- /dev/null +++ b/Super Polarity/Content/Graphics/positive-scout.xnb diff --git a/Super Polarity/Content/Graphics/positive-ship.xnb b/Super Polarity/Content/Graphics/positive-ship.xnb Binary files differnew file mode 100644 index 0000000..e4e21f1 --- /dev/null +++ b/Super Polarity/Content/Graphics/positive-ship.xnb diff --git a/Super Polarity/Content/Graphics/positive-supercruiser.xnb b/Super Polarity/Content/Graphics/positive-supercruiser.xnb Binary files differnew file mode 100644 index 0000000..2ecca79 --- /dev/null +++ b/Super Polarity/Content/Graphics/positive-supercruiser.xnb diff --git a/Super Polarity/Content/Graphics/star.xnb b/Super Polarity/Content/Graphics/star.xnb Binary files differnew file mode 100644 index 0000000..763addf --- /dev/null +++ b/Super Polarity/Content/Graphics/star.xnb diff --git a/Super Polarity/InputController.cs b/Super Polarity/InputController.cs new file mode 100644 index 0000000..405b3ab --- /dev/null +++ b/Super Polarity/InputController.cs @@ -0,0 +1,118 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Microsoft.Xna.Framework.Input; + +namespace SuperPolarity +{ + static class InputController + { + static Dictionary<string, List<Action<float>>> Listeners; + static Dictionary<string, List<Keys>> RegisteredKeys; + static Dictionary<string, List<Buttons>> RegisteredButtons; + + static GamePadState InputGamePadState; + static KeyboardState InputKeyboardState; + + /* + * Registered Events. + * + * You register: name of the event (ie. attack) and a key associated with it. + * or button... Left Stick /always/ dispatches move event. + */ + + static InputController() + { + Listeners = new Dictionary<string,List<Action<float>>>(); + InputKeyboardState = new KeyboardState(); + InputGamePadState = new GamePadState(); + } + + public static void UpdateInput() + { + Poll(); + DispatchMoveEvents(); + DispatchRegisteredEvents(); + } + + private static void Poll() + { + InputGamePadState = GamePad.GetState(Microsoft.Xna.Framework.PlayerIndex.One); + InputKeyboardState = Keyboard.GetState(); + } + + private static void DispatchRegisteredEvents() + { + } + + private static void DispatchMoveEvents() + { + float xMovement = 0.0f; + float yMovement = 0.0f; + // Dispatch the moveX / MoveY events every frame. + + xMovement = InputGamePadState.ThumbSticks.Left.X; + yMovement = -InputGamePadState.ThumbSticks.Left.Y; + + Console.WriteLine("Dispatching Input {0}", InputKeyboardState.IsKeyDown(Keys.Left)); + + if (InputKeyboardState.IsKeyDown(Keys.Left)) + { + xMovement = -1.0f; + } + + if (InputKeyboardState.IsKeyDown(Keys.Right)) + { + xMovement = 1.0f; + } + + if (InputKeyboardState.IsKeyDown(Keys.Up)) + { + yMovement = -1.0f; + } + + if (InputKeyboardState.IsKeyDown(Keys.Down)) + { + yMovement = 1.0f; + } + + Dispatch("moveX", xMovement); + Dispatch("moveY", yMovement); + } + + public static void Bind(string eventName, Action<float> listener) + { + List<Action<float>> newListenerList; + List<Action<float>> listenerList; + bool foundListeners; + + if (!Listeners.ContainsKey(eventName)) { + newListenerList = new List<Action<float>>(); + Listeners.Add(eventName, newListenerList); + } + + foundListeners = Listeners.TryGetValue(eventName, out listenerList); + + listenerList.Add(listener); + } + + public static void Dispatch(string eventName, float value) + { + List<Action<float>> listenerList; + bool foundListeners; + + foundListeners = Listeners.TryGetValue(eventName, out listenerList); + + if (!foundListeners) + { + return; + } + + foreach (Action<float> method in listenerList) + { + method(value); + } + } + } +} diff --git a/Super Polarity/MainShip.cs b/Super Polarity/MainShip.cs index 51d1eb3..ac7a775 100644 --- a/Super Polarity/MainShip.cs +++ b/Super Polarity/MainShip.cs @@ -3,6 +3,7 @@ using System.Collections.Generic; using System.Linq; using System.Text; using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Content; using Microsoft.Xna.Framework.Graphics; namespace SuperPolarity @@ -11,12 +12,21 @@ namespace SuperPolarity { public Texture2D PlayerTexture; public Vector2 Position; + public Vector2 Origin; public bool Active; public int Lives; public int Multiplier; public int Score; public float Angle; + // Physics Properties + Vector2 Velocity; + Vector2 Acceleration; + + float MaxVelocity; + float AccelerationRate; + ParticleEngine particleEngine; + public int Width { get { return PlayerTexture.Width; } @@ -27,7 +37,7 @@ namespace SuperPolarity get { return PlayerTexture.Height; } } - public void Initialize(Texture2D texture, Vector2 position) + public void Initialize(ContentManager Content, Texture2D texture, Vector2 position) { PlayerTexture = texture; Position = position; @@ -35,15 +45,142 @@ namespace SuperPolarity Multiplier = 1; Lives = 3; Score = 0; + + Origin = new Vector2(PlayerTexture.Width / 2, PlayerTexture.Height / 2); + Velocity = new Vector2(0, 0); + Acceleration = new Vector2(0, 0); + + MaxVelocity = 5; + AccelerationRate = 10; + + List<Texture2D> texturesList = new List<Texture2D>(); + texturesList.Add(Content.Load<Texture2D>("Graphics\\circle")); + texturesList.Add(Content.Load<Texture2D>("Graphics\\diamond")); + texturesList.Add(Content.Load<Texture2D>("Graphics\\star")); + + particleEngine = new ParticleEngine(texturesList, Position); + + BindInput(); + } + + void BindInput() + { + InputController.Bind("moveX", HandleHorizontalMovement); + InputController.Bind("moveY", HandleVerticalMovement); + } + + public void HandleHorizontalMovement(float value) + { + Acceleration.X = value * AccelerationRate; + } + + public void HandleVerticalMovement(float value) + { + Acceleration.Y = value * AccelerationRate; + } + + public void AutoDeccelerate(GameTime gameTime) + { + if (Acceleration.X == 0 && Velocity.X > 0) { + if (AccelerationRate * gameTime.ElapsedGameTime.TotalSeconds > Velocity.X) + { + Velocity.X = 0; + Acceleration.X = 0; + } + else + { + Acceleration.X = -AccelerationRate; + } + } + + if (Acceleration.X == 0 && Velocity.X < 0) + { + if (-AccelerationRate * gameTime.ElapsedGameTime.TotalSeconds < Velocity.X) + { + Velocity.X = 0; + Acceleration.X = 0; + } + else + { + Acceleration.X = AccelerationRate; + } + } + + if (Acceleration.Y == 0 && Velocity.Y > 0) + { + if (AccelerationRate * gameTime.ElapsedGameTime.TotalSeconds > Velocity.Y) + { + Velocity.Y = 0; + Acceleration.Y = 0; + } + else + { + Acceleration.Y = -AccelerationRate; + } + } + + if (Acceleration.Y == 0 && Velocity.Y < 0) + { + if (-AccelerationRate * gameTime.ElapsedGameTime.TotalSeconds < Velocity.Y) + { + Velocity.Y = 0; + Acceleration.Y = 0; + } + else + { + Acceleration.Y = AccelerationRate; + } + } + } + + public void Update(GameTime gameTime) + { + Move(gameTime); + ChangeAngle(); + particleEngine.EmitterLocation = Position; + particleEngine.Update(); + } + + public void Move(GameTime gameTime) + { + AutoDeccelerate(gameTime); + + Velocity.X = Velocity.X + Acceleration.X * (float) gameTime.ElapsedGameTime.TotalSeconds; + Velocity.Y = Velocity.Y + Acceleration.Y * (float) gameTime.ElapsedGameTime.TotalSeconds; + + if (Velocity.X > MaxVelocity) + { + Velocity.X = MaxVelocity; + } + + if (Velocity.X < -MaxVelocity) + { + Velocity.X = -MaxVelocity; + } + + if (Velocity.Y > MaxVelocity) + { + Velocity.Y = MaxVelocity; + } + + if (Velocity.Y < -MaxVelocity) + { + Velocity.Y = -MaxVelocity; + } + + Position.X = Position.X + Velocity.X; + Position.Y = Position.Y + Velocity.Y; } - public void Update() + public void ChangeAngle() { + Angle = (float) Math.Atan2(Velocity.Y, Velocity.X); } public void Draw(SpriteBatch spriteBatch) { - spriteBatch.Draw(PlayerTexture, Position, null, Color.White, Angle, Vector2.Zero, 1f, SpriteEffects.None, 0f); + particleEngine.Draw(spriteBatch); + spriteBatch.Draw(PlayerTexture, Position, null, Color.White, Angle, Origin, 1f, SpriteEffects.None, 0f); } } } diff --git a/Super Polarity/Particle.cs b/Super Polarity/Particle.cs new file mode 100644 index 0000000..d65bac6 --- /dev/null +++ b/Super Polarity/Particle.cs @@ -0,0 +1,51 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; + +namespace SuperPolarity +{ + class Particle + { + public Texture2D Texture { get; set; } + public Vector2 Position { get; set; } + public Vector2 Velocity { get; set; } + public float Angle { get; set; } + public float AngularVelocity { get; set; } + public Color Color { get; set; } + public float Size { get; set; } + public int TTL { get; set; } + + public Particle(Texture2D texture, Vector2 position, Vector2 velocity, + float angle, float angularVelocity, Color color, float size, int ttl) + { + Texture = texture; + Position = position; + Velocity = velocity; + Angle = angle; + AngularVelocity = angularVelocity; + Color = color; + Size = size; + TTL = ttl; + } + + public void Update() + { + TTL--; + Position += Velocity; + Angle += AngularVelocity; + } + + public void Draw(SpriteBatch spriteBatch) + { + Rectangle sourceRectangle = new Rectangle(0, 0, Texture.Width, Texture.Height); + Vector2 origin = new Vector2(Texture.Width / 2, Texture.Height / 2); + + spriteBatch.Draw(Texture, Position, sourceRectangle, Color, + Angle, origin, Size, SpriteEffects.None, 0f); + } + + } +} diff --git a/Super Polarity/ParticleEngine.cs b/Super Polarity/ParticleEngine.cs new file mode 100644 index 0000000..5cf6bdb --- /dev/null +++ b/Super Polarity/ParticleEngine.cs @@ -0,0 +1,75 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; + +namespace SuperPolarity +{ + class ParticleEngine + { + private Random random; + public Vector2 EmitterLocation { get; set; } + private List<Particle> particles; + private List<Texture2D> textures; + + public ParticleEngine(List<Texture2D> textures, Vector2 location) + { + EmitterLocation = location; + this.textures = textures; + this.particles = new List<Particle>(); + random = new Random(); + } + + private Particle GenerateNewParticle() + { + Texture2D texture = textures[random.Next(textures.Count)]; + Vector2 position = EmitterLocation; + Vector2 velocity = new Vector2( + 1f * (float)(random.NextDouble() * 2 - 1), + 1f * (float)(random.NextDouble() * 2 - 1)); + float angle = 0; + float angularVelocity = 0.1f * (float)(random.NextDouble() * 2 - 1); + Color color = new Color( + (float)random.NextDouble(), + (float)random.NextDouble(), + (float)random.NextDouble()); + float size = (float)random.NextDouble(); + + int ttl = 20 + random.Next(40); + + return new Particle(texture, position, velocity, angle, angularVelocity, color, size, ttl); + } + + public void Update() + { + int total = 10; + + for (int i = 0; i < total; i++) + { + particles.Add(GenerateNewParticle()); + } + + for (int particle = 0; particle < particles.Count; particle++) + { + particles[particle].Update(); + if (particles[particle].TTL <= 0) + { + particles.RemoveAt(particle); + particle--; + } + } + } + + public void Draw(SpriteBatch spriteBatch) + { + //spriteBatch.Begin(); + for (int index = 0; index < particles.Count; index++) + { + particles[index].Draw(spriteBatch); + } + //spriteBatch.End(); + } + } +} diff --git a/Super Polarity/Super Polarity.csproj b/Super Polarity/Super Polarity.csproj index dd5e1cd..a616ee4 100644 --- a/Super Polarity/Super Polarity.csproj +++ b/Super Polarity/Super Polarity.csproj @@ -35,7 +35,10 @@ <ApplicationIcon>Icon.ico</ApplicationIcon> </PropertyGroup> <ItemGroup> + <Compile Include="InputController.cs" /> <Compile Include="MainShip.cs" /> + <Compile Include="Particle.cs" /> + <Compile Include="ParticleEngine.cs" /> <Compile Include="SuperPolarity.cs" /> <Compile Include="Program.cs" /> <Compile Include="Properties\AssemblyInfo.cs" /> @@ -63,11 +66,64 @@ </Content> <Content Include="Icon.ico" /> </ItemGroup> - <ItemGroup /> <ItemGroup> - <Content Include="Content\Graphics\player.xnb"> + <Folder Include="Content\Sound\" /> + </ItemGroup> + <ItemGroup> + <None Include="Content\Graphics\circle.xnb"> <CopyToOutputDirectory>Always</CopyToOutputDirectory> - </Content> + </None> + <None Include="Content\Graphics\diamond.xnb"> + <CopyToOutputDirectory>Always</CopyToOutputDirectory> + </None> + <None Include="Content\Graphics\main-ship.xnb"> + <CopyToOutputDirectory>Always</CopyToOutputDirectory> + </None> + <None Include="Content\Graphics\negative-cruiser.xnb"> + <CopyToOutputDirectory>Always</CopyToOutputDirectory> + </None> + <None Include="Content\Graphics\negative-destroyer.xnb"> + <CopyToOutputDirectory>Always</CopyToOutputDirectory> + </None> + <None Include="Content\Graphics\negative-scout.xnb"> + <CopyToOutputDirectory>Always</CopyToOutputDirectory> + </None> + <None Include="Content\Graphics\negative-supercruiser.xnb"> + <CopyToOutputDirectory>Always</CopyToOutputDirectory> + </None> + <None Include="Content\Graphics\neutral-cruiser.xnb"> + <CopyToOutputDirectory>Always</CopyToOutputDirectory> + </None> + <None Include="Content\Graphics\neutral-destroyer.xnb"> + <CopyToOutputDirectory>Always</CopyToOutputDirectory> + </None> + <None Include="Content\Graphics\neutral-scout.xnb"> + <CopyToOutputDirectory>Always</CopyToOutputDirectory> + </None> + <None Include="Content\Graphics\neutral-ship.xnb"> + <CopyToOutputDirectory>Always</CopyToOutputDirectory> + </None> + <None Include="Content\Graphics\neutral-supercruiser.xnb"> + <CopyToOutputDirectory>Always</CopyToOutputDirectory> + </None> + <None Include="Content\Graphics\positive-cruiser.xnb"> + <CopyToOutputDirectory>Always</CopyToOutputDirectory> + </None> + <None Include="Content\Graphics\positive-destroyer.xnb"> + <CopyToOutputDirectory>Always</CopyToOutputDirectory> + </None> + <None Include="Content\Graphics\positive-scout.xnb"> + <CopyToOutputDirectory>Always</CopyToOutputDirectory> + </None> + <None Include="Content\Graphics\positive-ship.xnb"> + <CopyToOutputDirectory>Always</CopyToOutputDirectory> + </None> + <None Include="Content\Graphics\positive-supercruiser.xnb"> + <CopyToOutputDirectory>Always</CopyToOutputDirectory> + </None> + <None Include="Content\Graphics\star.xnb"> + <CopyToOutputDirectory>Always</CopyToOutputDirectory> + </None> </ItemGroup> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <!-- To modify your build process, add your task inside one of the targets below and uncomment it. diff --git a/Super Polarity/SuperPolarity.cs b/Super Polarity/SuperPolarity.cs index 40f1477..c43582e 100644 --- a/Super Polarity/SuperPolarity.cs +++ b/Super Polarity/SuperPolarity.cs @@ -17,15 +17,20 @@ namespace SuperPolarity /// </summary> public class SuperPolarity : Game { - GraphicsDeviceManager graphics; + public static GraphicsDeviceManager graphics; SpriteBatch spriteBatch; + // Input Handler + KeyboardState currentKeyboardState; + GamePadState currentGamePadState; + MainShip player; public SuperPolarity() : base() { - graphics = new GraphicsDeviceManager(this); + SuperPolarity.graphics = new GraphicsDeviceManager(this); + SuperPolarity.graphics.PreferMultiSampling = true; Content.RootDirectory = "Content"; } @@ -53,7 +58,7 @@ namespace SuperPolarity Vector2 playerPosition = new Vector2(GraphicsDevice.Viewport.TitleSafeArea.X, GraphicsDevice.Viewport.TitleSafeArea.Y + GraphicsDevice.Viewport.TitleSafeArea.Height / 2); - player.Initialize(Content.Load<Texture2D>("Graphics\\player"), playerPosition); + player.Initialize(Content, Content.Load<Texture2D>("Graphics\\main-ship"), playerPosition); } /// <summary> @@ -77,6 +82,9 @@ namespace SuperPolarity // TODO: Add your update logic here + InputController.UpdateInput(); + player.Update(gameTime); + base.Update(gameTime); } @@ -86,7 +94,7 @@ namespace SuperPolarity /// <param name="gameTime">Provides a snapshot of timing values.</param> protected override void Draw(GameTime gameTime) { - GraphicsDevice.Clear(Color.CornflowerBlue); + GraphicsDevice.Clear(Color.White); spriteBatch.Begin(); diff --git a/Super Polarity/bin/WindowsGL/Debug/Super Polarity.exe b/Super Polarity/bin/WindowsGL/Debug/Super Polarity.exe Binary files differindex a73e117..1a7422b 100644 --- a/Super Polarity/bin/WindowsGL/Debug/Super Polarity.exe +++ b/Super Polarity/bin/WindowsGL/Debug/Super Polarity.exe diff --git a/Super Polarity/bin/WindowsGL/Debug/Super Polarity.pdb b/Super Polarity/bin/WindowsGL/Debug/Super Polarity.pdb Binary files differindex adf5387..2b5ca6a 100644 --- a/Super Polarity/bin/WindowsGL/Debug/Super Polarity.pdb +++ b/Super Polarity/bin/WindowsGL/Debug/Super Polarity.pdb diff --git a/Super Polarity/obj/x86/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/Super Polarity/obj/x86/Debug/DesignTimeResolveAssemblyReferencesInput.cache Binary files differindex 3cba31e..6e72e0f 100644 --- a/Super Polarity/obj/x86/Debug/DesignTimeResolveAssemblyReferencesInput.cache +++ b/Super Polarity/obj/x86/Debug/DesignTimeResolveAssemblyReferencesInput.cache diff --git a/Super Polarity/obj/x86/Debug/Super Polarity.csproj.FileListAbsolute.txt b/Super Polarity/obj/x86/Debug/Super Polarity.csproj.FileListAbsolute.txt index b8ea3e8..f85e488 100644 --- a/Super Polarity/obj/x86/Debug/Super Polarity.csproj.FileListAbsolute.txt +++ b/Super Polarity/obj/x86/Debug/Super Polarity.csproj.FileListAbsolute.txt @@ -1,4 +1,6 @@ C:\Users\Miau\documents\visual studio 2010\Projects\Super Polarity\Super Polarity\bin\WindowsGL\Debug\SDL.dll +C:\Users\Miau\documents\visual studio 2010\Projects\Super Polarity\Super Polarity\bin\WindowsGL\Debug\Super Polarity.exe +C:\Users\Miau\documents\visual studio 2010\Projects\Super Polarity\Super Polarity\bin\WindowsGL\Debug\Super Polarity.pdb C:\Users\Miau\documents\visual studio 2010\Projects\Super Polarity\Super Polarity\bin\WindowsGL\Debug\Lidgren.Network.dll C:\Users\Miau\documents\visual studio 2010\Projects\Super Polarity\Super Polarity\bin\WindowsGL\Debug\MonoGame.Framework.dll C:\Users\Miau\documents\visual studio 2010\Projects\Super Polarity\Super Polarity\bin\WindowsGL\Debug\OpenTK.dll @@ -6,6 +8,21 @@ C:\Users\Miau\documents\visual studio 2010\Projects\Super Polarity\Super Polarit C:\Users\Miau\documents\visual studio 2010\Projects\Super Polarity\Super Polarity\obj\x86\Debug\ResolveAssemblyReference.cache C:\Users\Miau\documents\visual studio 2010\Projects\Super Polarity\Super Polarity\obj\x86\Debug\Super Polarity.exe C:\Users\Miau\documents\visual studio 2010\Projects\Super Polarity\Super Polarity\obj\x86\Debug\Super Polarity.pdb -C:\Users\Miau\documents\visual studio 2010\Projects\Super Polarity\Super Polarity\bin\WindowsGL\Debug\Super Polarity.exe -C:\Users\Miau\documents\visual studio 2010\Projects\Super Polarity\Super Polarity\bin\WindowsGL\Debug\Super Polarity.pdb -C:\Users\Miau\Documents\Visual Studio 2010\Projects\Super Polarity\Super Polarity\bin\WindowsGL\Debug\Content\Graphics\player.xnb +C:\Users\Miau\documents\visual studio 2010\Projects\Super Polarity\Super Polarity\bin\WindowsGL\Debug\Content\Graphics\main-ship.xnb +C:\Users\Miau\documents\visual studio 2010\Projects\Super Polarity\Super Polarity\bin\WindowsGL\Debug\Content\Graphics\negative-cruiser.xnb +C:\Users\Miau\documents\visual studio 2010\Projects\Super Polarity\Super Polarity\bin\WindowsGL\Debug\Content\Graphics\negative-destroyer.xnb +C:\Users\Miau\documents\visual studio 2010\Projects\Super Polarity\Super Polarity\bin\WindowsGL\Debug\Content\Graphics\negative-scout.xnb +C:\Users\Miau\documents\visual studio 2010\Projects\Super Polarity\Super Polarity\bin\WindowsGL\Debug\Content\Graphics\negative-supercruiser.xnb +C:\Users\Miau\documents\visual studio 2010\Projects\Super Polarity\Super Polarity\bin\WindowsGL\Debug\Content\Graphics\neutral-cruiser.xnb +C:\Users\Miau\documents\visual studio 2010\Projects\Super Polarity\Super Polarity\bin\WindowsGL\Debug\Content\Graphics\neutral-destroyer.xnb +C:\Users\Miau\documents\visual studio 2010\Projects\Super Polarity\Super Polarity\bin\WindowsGL\Debug\Content\Graphics\neutral-scout.xnb +C:\Users\Miau\documents\visual studio 2010\Projects\Super Polarity\Super Polarity\bin\WindowsGL\Debug\Content\Graphics\neutral-ship.xnb +C:\Users\Miau\documents\visual studio 2010\Projects\Super Polarity\Super Polarity\bin\WindowsGL\Debug\Content\Graphics\neutral-supercruiser.xnb +C:\Users\Miau\documents\visual studio 2010\Projects\Super Polarity\Super Polarity\bin\WindowsGL\Debug\Content\Graphics\positive-cruiser.xnb +C:\Users\Miau\documents\visual studio 2010\Projects\Super Polarity\Super Polarity\bin\WindowsGL\Debug\Content\Graphics\positive-destroyer.xnb +C:\Users\Miau\documents\visual studio 2010\Projects\Super Polarity\Super Polarity\bin\WindowsGL\Debug\Content\Graphics\positive-scout.xnb +C:\Users\Miau\documents\visual studio 2010\Projects\Super Polarity\Super Polarity\bin\WindowsGL\Debug\Content\Graphics\positive-ship.xnb +C:\Users\Miau\documents\visual studio 2010\Projects\Super Polarity\Super Polarity\bin\WindowsGL\Debug\Content\Graphics\positive-supercruiser.xnb +C:\Users\Miau\documents\visual studio 2010\Projects\Super Polarity\Super Polarity\bin\WindowsGL\Debug\Content\Graphics\circle.xnb +C:\Users\Miau\documents\visual studio 2010\Projects\Super Polarity\Super Polarity\bin\WindowsGL\Debug\Content\Graphics\diamond.xnb +C:\Users\Miau\documents\visual studio 2010\Projects\Super Polarity\Super Polarity\bin\WindowsGL\Debug\Content\Graphics\star.xnb diff --git a/Super Polarity/obj/x86/Debug/Super Polarity.exe b/Super Polarity/obj/x86/Debug/Super Polarity.exe Binary files differindex a73e117..1a7422b 100644 --- a/Super Polarity/obj/x86/Debug/Super Polarity.exe +++ b/Super Polarity/obj/x86/Debug/Super Polarity.exe diff --git a/Super Polarity/obj/x86/Debug/Super Polarity.pdb b/Super Polarity/obj/x86/Debug/Super Polarity.pdb Binary files differindex adf5387..2b5ca6a 100644 --- a/Super Polarity/obj/x86/Debug/Super Polarity.pdb +++ b/Super Polarity/obj/x86/Debug/Super Polarity.pdb |