diff options
Diffstat (limited to 'SuperPolarityMac')
| -rw-r--r-- | SuperPolarityMac/Content/logo.png | bin | 0 -> 8994 bytes | |||
| -rw-r--r-- | SuperPolarityMac/Game1.cs | 110 | ||||
| -rw-r--r-- | SuperPolarityMac/Info.plist | 17 | ||||
| -rw-r--r-- | SuperPolarityMac/Main.cs | 44 | ||||
| -rw-r--r-- | SuperPolarityMac/Properties/AssemblyInfo.cs | 27 | ||||
| -rw-r--r-- | SuperPolarityMac/SuperPolarityMac.csproj | 82 |
6 files changed, 280 insertions, 0 deletions
diff --git a/SuperPolarityMac/Content/logo.png b/SuperPolarityMac/Content/logo.png Binary files differnew file mode 100644 index 0000000..701c1b5 --- /dev/null +++ b/SuperPolarityMac/Content/logo.png diff --git a/SuperPolarityMac/Game1.cs b/SuperPolarityMac/Game1.cs new file mode 100644 index 0000000..c0756a1 --- /dev/null +++ b/SuperPolarityMac/Game1.cs @@ -0,0 +1,110 @@ +#region File Description +//----------------------------------------------------------------------------- +// SuperPolarityMacGame.cs +// +// Microsoft XNA Community Game Platform +// Copyright (C) Microsoft Corporation. All rights reserved. +//----------------------------------------------------------------------------- +#endregion + +#region Using Statements +using System; + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Audio; +using Microsoft.Xna.Framework.Graphics; +using Microsoft.Xna.Framework.Input; +using Microsoft.Xna.Framework.Input.Touch; +using Microsoft.Xna.Framework.Storage; +using Microsoft.Xna.Framework.Content; +using Microsoft.Xna.Framework.Media; + +#endregion + +namespace SuperPolarityMac +{ + /// <summary> + /// Default Project Template + /// </summary> + public class Game1 : Game + { + + #region Fields + GraphicsDeviceManager graphics; + SpriteBatch spriteBatch; + Texture2D logoTexture; + #endregion + + #region Initialization + + public Game1() + { + + graphics = new GraphicsDeviceManager(this); + + Content.RootDirectory = "Content"; + + graphics.IsFullScreen = false; + } + + /// <summary> + /// Overridden from the base Game.Initialize. Once the GraphicsDevice is setup, + /// we'll use the viewport to initialize some values. + /// </summary> + protected override void Initialize() + { + base.Initialize(); + } + + + /// <summary> + /// Load your graphics content. + /// </summary> + protected override void LoadContent() + { + // Create a new SpriteBatch, which can be use to draw textures. + spriteBatch = new SpriteBatch(graphics.GraphicsDevice); + + // TODO: use this.Content to load your game content here eg. + logoTexture = Content.Load<Texture2D>("logo"); + } + + #endregion + + #region Update and Draw + + /// <summary> + /// Allows the game to run logic such as updating the world, + /// checking for collisions, gathering input, and playing audio. + /// </summary> + /// <param name="gameTime">Provides a snapshot of timing values.</param> + protected override void Update(GameTime gameTime) + { + // TODO: Add your update logic here + + base.Update(gameTime); + } + + /// <summary> + /// This is called when the game should draw itself. + /// </summary> + /// <param name="gameTime">Provides a snapshot of timing values.</param> + protected override void Draw(GameTime gameTime) + { + // Clear the backbuffer + graphics.GraphicsDevice.Clear(Color.CornflowerBlue); + + spriteBatch.Begin(); + + // draw the logo + spriteBatch.Draw(logoTexture, new Vector2 (130, 200), Color.White); + + spriteBatch.End(); + + //TODO: Add your drawing code here + base.Draw(gameTime); + } + + #endregion + } +} diff --git a/SuperPolarityMac/Info.plist b/SuperPolarityMac/Info.plist new file mode 100644 index 0000000..07a58c3 --- /dev/null +++ b/SuperPolarityMac/Info.plist @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>CFBundleIdentifier</key> + <string>com.yourcompany.MonoGame.Samples.Draw2D.MacOS</string> + <key>CFBundleName</key> + <string>MonoGame.Samples.Draw2D.MacOS</string> + <key>CFBundleVersion</key> + <string>1</string> + <key>LSMinimumSystemVersion</key> + <string>10.6</string> + <key>NSPrincipalClass</key> + <string>NSApplication</string> +</dict> +</plist> + diff --git a/SuperPolarityMac/Main.cs b/SuperPolarityMac/Main.cs new file mode 100644 index 0000000..f21bf0b --- /dev/null +++ b/SuperPolarityMac/Main.cs @@ -0,0 +1,44 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using MonoMac.AppKit; +using MonoMac.Foundation; + +namespace SuperPolarityMac +{ + static class Program + { + /// <summary> + /// The main entry point for the application. + /// </summary> + static void Main (string[] args) + { + NSApplication.Init (); + + using (var p = new NSAutoreleasePool ()) { + NSApplication.SharedApplication.Delegate = new AppDelegate (); + NSApplication.Main (args); + } + + + } + } + + class AppDelegate : NSApplicationDelegate + { + Game1 game; + + public override void FinishedLaunching (MonoMac.Foundation.NSObject notification) + { + game = new Game1 (); + game.Run (); + } + + public override bool ApplicationShouldTerminateAfterLastWindowClosed (NSApplication sender) + { + return true; + } + } +} + + diff --git a/SuperPolarityMac/Properties/AssemblyInfo.cs b/SuperPolarityMac/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..d61ed27 --- /dev/null +++ b/SuperPolarityMac/Properties/AssemblyInfo.cs @@ -0,0 +1,27 @@ +using System.Reflection; +using System.Runtime.CompilerServices; + +// Information about this assembly is defined by the following attributes. +// Change them to the values specific to your project. + +[assembly: AssemblyTitle("SuperPolarityMac")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("")] +[assembly: AssemblyCopyright("benbeltran")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}". +// The form "{Major}.{Minor}.*" will automatically update the build and revision, +// and "{Major}.{Minor}.{Build}.*" will update just the revision. + +[assembly: AssemblyVersion("1.0.0")] + +// The following attributes are used to specify the signing key for the assembly, +// if desired. See the Mono documentation for more information about signing. + +//[assembly: AssemblyDelaySign(false)] +//[assembly: AssemblyKeyFile("")] + diff --git a/SuperPolarityMac/SuperPolarityMac.csproj b/SuperPolarityMac/SuperPolarityMac.csproj new file mode 100644 index 0000000..4eac2c0 --- /dev/null +++ b/SuperPolarityMac/SuperPolarityMac.csproj @@ -0,0 +1,82 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <PropertyGroup> + <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> + <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> + <ProductVersion>10.0.0</ProductVersion> + <SchemaVersion>2.0</SchemaVersion> + <ProjectGuid>{008F4BF1-A2AB-4EC4-977D-451AE4B1B0FE}</ProjectGuid> + <ProjectTypeGuids>{948B3504-5B70-4649-8FE4-BDE1FB46EC69};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids> + <OutputType>Exe</OutputType> + <RootNamespace>SuperPolarityMac</RootNamespace> + <MonoMacResourcePrefix>Resources</MonoMacResourcePrefix> + <AssemblyName>SuperPolarityMac</AssemblyName> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> + <DebugSymbols>true</DebugSymbols> + <DebugType>full</DebugType> + <Optimize>false</Optimize> + <OutputPath>bin\Debug</OutputPath> + <DefineConstants>DEBUG;</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + <ConsolePause>false</ConsolePause> + <UseSGen>false</UseSGen> + <IncludeMonoRuntime>false</IncludeMonoRuntime> + <EnablePackageSigning>false</EnablePackageSigning> + <CodeSigningKey>Mac Developer</CodeSigningKey> + <EnableCodeSigning>false</EnableCodeSigning> + <CreatePackage>false</CreatePackage> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> + <DebugType>full</DebugType> + <Optimize>true</Optimize> + <OutputPath>bin\Release</OutputPath> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + <ConsolePause>false</ConsolePause> + <LinkMode>Full</LinkMode> + <UseSGen>false</UseSGen> + <IncludeMonoRuntime>true</IncludeMonoRuntime> + <EnablePackageSigning>false</EnablePackageSigning> + <CodeSigningKey>Developer ID Application</CodeSigningKey> + <EnableCodeSigning>true</EnableCodeSigning> + <CreatePackage>true</CreatePackage> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'AppStore|AnyCPU' "> + <DebugType>full</DebugType> + <Optimize>true</Optimize> + <OutputPath>bin\AppStore</OutputPath> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + <ConsolePause>false</ConsolePause> + <LinkMode>Full</LinkMode> + <UseSGen>false</UseSGen> + <IncludeMonoRuntime>true</IncludeMonoRuntime> + <PackageSigningKey>3rd Party Mac Developer Installer</PackageSigningKey> + <CreatePackage>true</CreatePackage> + <CodeSigningKey>3rd Party Mac Developer Application</CodeSigningKey> + <EnableCodeSigning>true</EnableCodeSigning> + <EnablePackageSigning>true</EnablePackageSigning> + </PropertyGroup> + <ItemGroup> + <Reference Include="System" /> + <Reference Include="System.Xml" /> + <Reference Include="System.Core" /> + <Reference Include="System.Xml.Linq" /> + <Reference Include="System.Drawing" /> + <Reference Include="MonoMac" /> + <Reference Include="MonoGame.Framework" /> + </ItemGroup> + <ItemGroup> + <Compile Include="Game1.cs" /> + <Compile Include="Main.cs" /> + <Compile Include="Properties\AssemblyInfo.cs" /> + </ItemGroup> + <ItemGroup> + <None Include="Info.plist" /> + <None Include="Content\logo.png" /> + </ItemGroup> + <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> + <Import Project="$(MSBuildExtensionsPath)\Mono\MonoMac\v0.0\Mono.MonoMac.targets" /> +</Project>
\ No newline at end of file |