From 0cafec445af0a97d96feb1a1daefa1486142c73f Mon Sep 17 00:00:00 2001 From: Ben Beltran Date: Mon, 3 Feb 2014 09:55:31 -0600 Subject: Removes old stuff, adds mac proj --- SuperPolarityMac/Content/logo.png | Bin 0 -> 8994 bytes SuperPolarityMac/Game1.cs | 110 ++++++++++++++++++++++++++++ SuperPolarityMac/Info.plist | 17 +++++ SuperPolarityMac/Main.cs | 44 +++++++++++ SuperPolarityMac/Properties/AssemblyInfo.cs | 27 +++++++ SuperPolarityMac/SuperPolarityMac.csproj | 82 +++++++++++++++++++++ 6 files changed, 280 insertions(+) create mode 100644 SuperPolarityMac/Content/logo.png create mode 100644 SuperPolarityMac/Game1.cs create mode 100644 SuperPolarityMac/Info.plist create mode 100644 SuperPolarityMac/Main.cs create mode 100644 SuperPolarityMac/Properties/AssemblyInfo.cs create mode 100644 SuperPolarityMac/SuperPolarityMac.csproj (limited to 'SuperPolarityMac') diff --git a/SuperPolarityMac/Content/logo.png b/SuperPolarityMac/Content/logo.png new file mode 100644 index 0000000..701c1b5 Binary files /dev/null and b/SuperPolarityMac/Content/logo.png differ 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 +{ + /// + /// Default Project Template + /// + 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; + } + + /// + /// Overridden from the base Game.Initialize. Once the GraphicsDevice is setup, + /// we'll use the viewport to initialize some values. + /// + protected override void Initialize() + { + base.Initialize(); + } + + + /// + /// Load your graphics content. + /// + 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("logo"); + } + + #endregion + + #region Update and Draw + + /// + /// Allows the game to run logic such as updating the world, + /// checking for collisions, gathering input, and playing audio. + /// + /// Provides a snapshot of timing values. + protected override void Update(GameTime gameTime) + { + // TODO: Add your update logic here + + base.Update(gameTime); + } + + /// + /// This is called when the game should draw itself. + /// + /// Provides a snapshot of timing values. + 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 @@ + + + + + CFBundleIdentifier + com.yourcompany.MonoGame.Samples.Draw2D.MacOS + CFBundleName + MonoGame.Samples.Draw2D.MacOS + CFBundleVersion + 1 + LSMinimumSystemVersion + 10.6 + NSPrincipalClass + NSApplication + + + 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 + { + /// + /// The main entry point for the application. + /// + 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 @@ + + + + Debug + AnyCPU + 10.0.0 + 2.0 + {008F4BF1-A2AB-4EC4-977D-451AE4B1B0FE} + {948B3504-5B70-4649-8FE4-BDE1FB46EC69};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + Exe + SuperPolarityMac + Resources + SuperPolarityMac + + + true + full + false + bin\Debug + DEBUG; + prompt + 4 + false + false + false + false + Mac Developer + false + false + + + full + true + bin\Release + prompt + 4 + false + Full + false + true + false + Developer ID Application + true + true + + + full + true + bin\AppStore + prompt + 4 + false + Full + false + true + 3rd Party Mac Developer Installer + true + 3rd Party Mac Developer Application + true + true + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file -- cgit