aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Beltran <ben@nsovocal.com>2014-02-03 10:06:44 -0600
committerBen Beltran <ben@nsovocal.com>2014-02-03 10:06:44 -0600
commit4fc09567c557a1110180940cca40fd7144921026 (patch)
tree5fb7b0b787b739a3f4a2785651c69219a8318ab0
parent0cafec445af0a97d96feb1a1daefa1486142c73f (diff)
Removes spaces.
-rw-r--r--Super Polarity.suobin59392 -> 0 bytes
-rw-r--r--Super Polarity/Super Polarity.csproj.user3
-rw-r--r--Super Polarity/bin/WindowsGL/Debug/GameName1.vshost.exebin11600 -> 0 bytes
-rw-r--r--Super Polarity/bin/WindowsGL/Debug/GameName1.vshost.exe.manifest11
-rw-r--r--Super Polarity/bin/WindowsGL/Debug/Lidgren.Network.dllbin118272 -> 0 bytes
-rw-r--r--Super Polarity/bin/WindowsGL/Debug/MonoGame.Framework.dllbin637440 -> 0 bytes
-rw-r--r--Super Polarity/bin/WindowsGL/Debug/OpenTK.dllbin3290624 -> 0 bytes
-rw-r--r--Super Polarity/bin/WindowsGL/Debug/SDL.dllbin324096 -> 0 bytes
-rw-r--r--Super Polarity/bin/WindowsGL/Debug/Super Polarity.exebin72704 -> 0 bytes
-rw-r--r--Super Polarity/bin/WindowsGL/Debug/Super Polarity.pdbbin128512 -> 0 bytes
-rw-r--r--Super Polarity/bin/WindowsGL/Debug/Super Polarity.vshost.exebin11600 -> 0 bytes
-rw-r--r--Super Polarity/bin/WindowsGL/Debug/Tao.Sdl.dllbin69632 -> 0 bytes
-rw-r--r--Super Polarity/obj/x86/Debug/DesignTimeResolveAssemblyReferencesInput.cachebin9636 -> 0 bytes
-rw-r--r--Super Polarity/obj/x86/Debug/ResolveAssemblyReference.cachebin17159 -> 0 bytes
-rw-r--r--Super Polarity/obj/x86/Debug/Super Polarity.csproj.FileListAbsolute.txt42
-rw-r--r--Super Polarity/obj/x86/Debug/Super Polarity.exebin72704 -> 0 bytes
-rw-r--r--Super Polarity/obj/x86/Debug/Super Polarity.pdbbin128512 -> 0 bytes
-rw-r--r--SuperPolarity.sln (renamed from Super Polarity.sln)6
-rw-r--r--SuperPolarity.userprefs12
-rw-r--r--SuperPolarity/ActorFactory.cs (renamed from Super Polarity/ActorFactory.cs)0
-rw-r--r--SuperPolarity/ActorManager.cs (renamed from Super Polarity/ActorManager.cs)0
-rw-r--r--SuperPolarity/Actors/Actor.cs (renamed from Super Polarity/Actors/Actor.cs)0
-rw-r--r--SuperPolarity/Actors/Bullet.cs (renamed from Super Polarity/Actors/Bullet.cs)0
-rw-r--r--SuperPolarity/Actors/MainShip.cs (renamed from Super Polarity/Actors/MainShip.cs)0
-rw-r--r--SuperPolarity/Actors/Ship.cs (renamed from Super Polarity/Actors/Ship.cs)0
-rw-r--r--SuperPolarity/Actors/StandardShip.cs (renamed from Super Polarity/Actors/StandardShip.cs)0
-rw-r--r--SuperPolarity/BasicGenerator.cs (renamed from Super Polarity/BasicGenerator.cs)0
-rw-r--r--SuperPolarity/Content/Fonts/SegoeUIMono14.xnb (renamed from Super Polarity/Content/Fonts/SegoeUIMono14.xnb)bin20142 -> 20142 bytes
-rw-r--r--SuperPolarity/Content/Fonts/bigfont.xnb (renamed from Super Polarity/Content/Fonts/bigfont.xnb)bin115931 -> 115931 bytes
-rw-r--r--SuperPolarity/Content/Fonts/smallfont.xnb (renamed from Super Polarity/Content/Fonts/smallfont.xnb)bin50395 -> 50395 bytes
-rw-r--r--SuperPolarity/Content/Graphics/circle.xnb (renamed from Super Polarity/Content/Graphics/circle.xnb)bin1211 -> 1211 bytes
-rw-r--r--SuperPolarity/Content/Graphics/diamond.xnb (renamed from Super Polarity/Content/Graphics/diamond.xnb)bin1211 -> 1211 bytes
-rw-r--r--SuperPolarity/Content/Graphics/main-ship.xnb (renamed from Super Polarity/Content/Graphics/main-ship.xnb)bin11707 -> 11707 bytes
-rw-r--r--SuperPolarity/Content/Graphics/negative-cruiser.xnb (renamed from Super Polarity/Content/Graphics/negative-cruiser.xnb)bin72187 -> 72187 bytes
-rw-r--r--SuperPolarity/Content/Graphics/negative-destroyer.xnb (renamed from Super Polarity/Content/Graphics/negative-destroyer.xnb)bin11707 -> 11707 bytes
-rw-r--r--SuperPolarity/Content/Graphics/negative-scout.xnb (renamed from Super Polarity/Content/Graphics/negative-scout.xnb)bin5707 -> 5707 bytes
-rw-r--r--SuperPolarity/Content/Graphics/negative-ship.xnb (renamed from Super Polarity/Content/Graphics/negative-ship.xnb)bin11707 -> 11707 bytes
-rw-r--r--SuperPolarity/Content/Graphics/negative-supercruiser.xnb (renamed from Super Polarity/Content/Graphics/negative-supercruiser.xnb)bin72187 -> 72187 bytes
-rw-r--r--SuperPolarity/Content/Graphics/neutral-cruiser.xnb (renamed from Super Polarity/Content/Graphics/neutral-cruiser.xnb)bin72187 -> 72187 bytes
-rw-r--r--SuperPolarity/Content/Graphics/neutral-destroyer.xnb (renamed from Super Polarity/Content/Graphics/neutral-destroyer.xnb)bin11707 -> 11707 bytes
-rw-r--r--SuperPolarity/Content/Graphics/neutral-scout.xnb (renamed from Super Polarity/Content/Graphics/neutral-scout.xnb)bin5707 -> 5707 bytes
-rw-r--r--SuperPolarity/Content/Graphics/neutral-ship.xnb (renamed from Super Polarity/Content/Graphics/neutral-ship.xnb)bin11707 -> 11707 bytes
-rw-r--r--SuperPolarity/Content/Graphics/neutral-supercruiser.xnb (renamed from Super Polarity/Content/Graphics/neutral-supercruiser.xnb)bin72187 -> 72187 bytes
-rw-r--r--SuperPolarity/Content/Graphics/pause-screen.xnb (renamed from Super Polarity/Content/Graphics/pause-screen.xnb)bin3686587 -> 3686587 bytes
-rw-r--r--SuperPolarity/Content/Graphics/polaritydemotitle.xnb (renamed from Super Polarity/Content/Graphics/polaritydemotitle.xnb)bin3686587 -> 3686587 bytes
-rw-r--r--SuperPolarity/Content/Graphics/positive-cruiser.xnb (renamed from Super Polarity/Content/Graphics/positive-cruiser.xnb)bin72187 -> 72187 bytes
-rw-r--r--SuperPolarity/Content/Graphics/positive-destroyer.xnb (renamed from Super Polarity/Content/Graphics/positive-destroyer.xnb)bin11707 -> 11707 bytes
-rw-r--r--SuperPolarity/Content/Graphics/positive-scout.xnb (renamed from Super Polarity/Content/Graphics/positive-scout.xnb)bin5707 -> 5707 bytes
-rw-r--r--SuperPolarity/Content/Graphics/positive-ship.xnb (renamed from Super Polarity/Content/Graphics/positive-ship.xnb)bin11707 -> 11707 bytes
-rw-r--r--SuperPolarity/Content/Graphics/positive-supercruiser.xnb (renamed from Super Polarity/Content/Graphics/positive-supercruiser.xnb)bin72187 -> 72187 bytes
-rw-r--r--SuperPolarity/Content/Graphics/square.xnb (renamed from Super Polarity/Content/Graphics/square.xnb)bin1147 -> 1147 bytes
-rw-r--r--SuperPolarity/Content/Graphics/star.xnb (renamed from Super Polarity/Content/Graphics/star.xnb)bin1147 -> 1147 bytes
-rw-r--r--SuperPolarity/Content/Sound/bomb.wav (renamed from Super Polarity/Content/Sound/bomb.wav)bin403244 -> 403244 bytes
-rw-r--r--SuperPolarity/Content/Sound/bullet.wav (renamed from Super Polarity/Content/Sound/bullet.wav)bin201644 -> 201644 bytes
-rw-r--r--SuperPolarity/Content/Sound/gameover.wav (renamed from Super Polarity/Content/Sound/gameover.wav)bin1612844 -> 1612844 bytes
-rw-r--r--SuperPolarity/Content/Sound/hit.wav (renamed from Super Polarity/Content/Sound/hit.wav)bin403244 -> 403244 bytes
-rw-r--r--SuperPolarity/Content/Sound/life.wav (renamed from Super Polarity/Content/Sound/life.wav)bin403244 -> 403244 bytes
-rw-r--r--SuperPolarity/Content/Sound/polaritychange.wav (renamed from Super Polarity/Content/Sound/polaritychange.wav)bin403244 -> 403244 bytes
-rw-r--r--SuperPolarity/Content/Sound/polaritytheme.wav (renamed from Super Polarity Content/Super Polarity ContentContent/Sound/polaritytheme.wav)bin48384044 -> 48384044 bytes
-rw-r--r--SuperPolarity/GameScreen.cs (renamed from Super Polarity/GameScreen.cs)0
-rw-r--r--SuperPolarity/Icon.ico (renamed from Super Polarity/Icon.ico)bin32038 -> 32038 bytes
-rw-r--r--SuperPolarity/InputController.cs (renamed from Super Polarity/InputController.cs)0
-rw-r--r--SuperPolarity/LetterChooseWidget.cs (renamed from Super Polarity/LetterChooseWidget.cs)0
-rw-r--r--SuperPolarity/MenuItem.cs (renamed from Super Polarity/MenuItem.cs)0
-rw-r--r--SuperPolarity/MenuWidget.cs (renamed from Super Polarity/MenuWidget.cs)0
-rw-r--r--SuperPolarity/NameChooserWidget.cs (renamed from Super Polarity/NameChooserWidget.cs)0
-rw-r--r--SuperPolarity/Particle.cs (renamed from Super Polarity/Particle.cs)0
-rw-r--r--SuperPolarity/ParticleEffectFactory.cs (renamed from Super Polarity/ParticleEffectFactory.cs)0
-rw-r--r--SuperPolarity/ParticleEngine.cs (renamed from Super Polarity/ParticleEngine.cs)0
-rw-r--r--SuperPolarity/Player.cs (renamed from Super Polarity/Player.cs)0
-rw-r--r--SuperPolarity/Program.cs (renamed from Super Polarity/Program.cs)0
-rw-r--r--SuperPolarity/Properties/AssemblyInfo.cs (renamed from Super Polarity/Properties/AssemblyInfo.cs)4
-rw-r--r--SuperPolarity/Renderer.cs (renamed from Super Polarity/Renderer.cs)0
-rw-r--r--SuperPolarity/ScoreScreen.cs (renamed from Super Polarity/ScoreScreen.cs)0
-rw-r--r--SuperPolarity/Screen.cs (renamed from Super Polarity/Screen.cs)0
-rw-r--r--SuperPolarity/ScreenManager.cs (renamed from Super Polarity/ScreenManager.cs)0
-rw-r--r--SuperPolarity/SuperPolarity.cs (renamed from Super Polarity/SuperPolarity.cs)0
-rw-r--r--SuperPolarity/SuperPolarity.csproj (renamed from Super Polarity/Super Polarity.csproj)2
-rw-r--r--SuperPolarity/TitleScreen.cs (renamed from Super Polarity/TitleScreen.cs)0
-rw-r--r--SuperPolarity/Widget.cs (renamed from Super Polarity/Widget.cs)0
-rw-r--r--SuperPolarity/neutral-supercruiser.xnb (renamed from Super Polarity/neutral-supercruiser.xnb)bin72187 -> 72187 bytes
-rw-r--r--SuperPolarity/scores.txt (renamed from Super Polarity/scores.txt)0
-rw-r--r--SuperPolarityContent/SuperPolarityContent/SuperPolarityContent.csproj (renamed from Super Polarity Content/Super Polarity Content/Super Polarity Content.csproj)6
-rw-r--r--SuperPolarityContent/SuperPolarityContentContent/Fonts/SegoeUIMono14.spritefont (renamed from Super Polarity Content/Super Polarity ContentContent/Fonts/SegoeUIMono14.spritefont)0
-rw-r--r--SuperPolarityContent/SuperPolarityContentContent/Fonts/bigfont.png (renamed from Super Polarity Content/Super Polarity ContentContent/Fonts/bigfont.png)bin18385 -> 18385 bytes
-rw-r--r--SuperPolarityContent/SuperPolarityContentContent/Fonts/smallfont.png (renamed from Super Polarity Content/Super Polarity ContentContent/Fonts/smallfont.png)bin8490 -> 8490 bytes
-rw-r--r--SuperPolarityContent/SuperPolarityContentContent/Graphics/circle.png (renamed from Super Polarity Content/Super Polarity ContentContent/Graphics/circle.png)bin355 -> 355 bytes
-rw-r--r--SuperPolarityContent/SuperPolarityContentContent/Graphics/diamond.png (renamed from Super Polarity Content/Super Polarity ContentContent/Graphics/diamond.png)bin388 -> 388 bytes
-rw-r--r--SuperPolarityContent/SuperPolarityContentContent/Graphics/main-ship.png (renamed from Super Polarity Content/Super Polarity ContentContent/Graphics/main-ship.png)bin1838 -> 1838 bytes
-rw-r--r--SuperPolarityContent/SuperPolarityContentContent/Graphics/negative-cruiser.png (renamed from Super Polarity Content/Super Polarity ContentContent/Graphics/negative-cruiser.png)bin3283 -> 3283 bytes
-rw-r--r--SuperPolarityContent/SuperPolarityContentContent/Graphics/negative-destroyer.png (renamed from Super Polarity Content/Super Polarity ContentContent/Graphics/negative-destroyer.png)bin1720 -> 1720 bytes
-rw-r--r--SuperPolarityContent/SuperPolarityContentContent/Graphics/negative-scout.png (renamed from Super Polarity Content/Super Polarity ContentContent/Graphics/negative-scout.png)bin1487 -> 1487 bytes
-rw-r--r--SuperPolarityContent/SuperPolarityContentContent/Graphics/negative-ship.png (renamed from Super Polarity Content/Super Polarity ContentContent/Graphics/negative-ship.png)bin824 -> 824 bytes
-rw-r--r--SuperPolarityContent/SuperPolarityContentContent/Graphics/negative-supercruiser.png (renamed from Super Polarity Content/Super Polarity ContentContent/Graphics/negative-supercruiser.png)bin3097 -> 3097 bytes
-rw-r--r--SuperPolarityContent/SuperPolarityContentContent/Graphics/neutral-cruiser.png (renamed from Super Polarity Content/Super Polarity ContentContent/Graphics/neutral-cruiser.png)bin2924 -> 2924 bytes
-rw-r--r--SuperPolarityContent/SuperPolarityContentContent/Graphics/neutral-destroyer.png (renamed from Super Polarity Content/Super Polarity ContentContent/Graphics/neutral-destroyer.png)bin1559 -> 1559 bytes
-rw-r--r--SuperPolarityContent/SuperPolarityContentContent/Graphics/neutral-scout.png (renamed from Super Polarity Content/Super Polarity ContentContent/Graphics/neutral-scout.png)bin1305 -> 1305 bytes
-rw-r--r--SuperPolarityContent/SuperPolarityContentContent/Graphics/neutral-ship.png (renamed from Super Polarity Content/Super Polarity ContentContent/Graphics/neutral-ship.png)bin1579 -> 1579 bytes
-rw-r--r--SuperPolarityContent/SuperPolarityContentContent/Graphics/neutral-supercruiser.png (renamed from Super Polarity Content/Super Polarity ContentContent/Graphics/neutral-supercruiser.png)bin2969 -> 2969 bytes
-rw-r--r--SuperPolarityContent/SuperPolarityContentContent/Graphics/pause-screen.png (renamed from Super Polarity Content/Super Polarity ContentContent/Graphics/pause-screen.png)bin34294 -> 34294 bytes
-rw-r--r--SuperPolarityContent/SuperPolarityContentContent/Graphics/polaritydemotitle.png (renamed from Super Polarity Content/Super Polarity ContentContent/Graphics/polaritydemotitle.png)bin16528 -> 16528 bytes
-rw-r--r--SuperPolarityContent/SuperPolarityContentContent/Graphics/positive-cruiser.png (renamed from Super Polarity Content/Super Polarity ContentContent/Graphics/positive-cruiser.png)bin3290 -> 3290 bytes
-rw-r--r--SuperPolarityContent/SuperPolarityContentContent/Graphics/positive-destroyer.png (renamed from Super Polarity Content/Super Polarity ContentContent/Graphics/positive-destroyer.png)bin1738 -> 1738 bytes
-rw-r--r--SuperPolarityContent/SuperPolarityContentContent/Graphics/positive-scout.png (renamed from Super Polarity Content/Super Polarity ContentContent/Graphics/positive-scout.png)bin1486 -> 1486 bytes
-rw-r--r--SuperPolarityContent/SuperPolarityContentContent/Graphics/positive-ship.png (renamed from Super Polarity Content/Super Polarity ContentContent/Graphics/positive-ship.png)bin1812 -> 1812 bytes
-rw-r--r--SuperPolarityContent/SuperPolarityContentContent/Graphics/positive-supercruiser.png (renamed from Super Polarity Content/Super Polarity ContentContent/Graphics/positive-supercruiser.png)bin3093 -> 3093 bytes
-rw-r--r--SuperPolarityContent/SuperPolarityContentContent/Graphics/square.png (renamed from Super Polarity Content/Super Polarity ContentContent/Graphics/square.png)bin169 -> 169 bytes
-rw-r--r--SuperPolarityContent/SuperPolarityContentContent/Graphics/star.png (renamed from Super Polarity Content/Super Polarity ContentContent/Graphics/star.png)bin380 -> 380 bytes
-rw-r--r--SuperPolarityContent/SuperPolarityContentContent/Sound/polaritytheme.wav (renamed from Super Polarity/Content/Sound/polaritytheme.wav)bin48384044 -> 48384044 bytes
-rw-r--r--SuperPolarityContent/SuperPolarityContentContent/SuperPolarityContentContent.contentproj (renamed from Super Polarity Content/Super Polarity ContentContent/Super Polarity ContentContent.contentproj)0
-rw-r--r--SuperPolarityMac/ActorFactory.cs144
-rw-r--r--SuperPolarityMac/ActorManager.cs160
-rw-r--r--SuperPolarityMac/BasicGenerator.cs77
-rw-r--r--SuperPolarityMac/Content/logo.pngbin8994 -> 0 bytes
-rw-r--r--SuperPolarityMac/Game1.cs110
-rw-r--r--SuperPolarityMac/GameScreen.cs209
-rw-r--r--SuperPolarityMac/Icon.icobin0 -> 32038 bytes
-rw-r--r--SuperPolarityMac/Info.plist17
-rw-r--r--SuperPolarityMac/InputController.cs248
-rw-r--r--SuperPolarityMac/LetterChooseWidget.cs84
-rw-r--r--SuperPolarityMac/Main.cs44
-rw-r--r--SuperPolarityMac/MenuItem.cs11
-rw-r--r--SuperPolarityMac/MenuWidget.cs11
-rw-r--r--SuperPolarityMac/NameChooserWidget.cs99
-rw-r--r--SuperPolarityMac/Particle.cs51
-rw-r--r--SuperPolarityMac/ParticleEffectFactory.cs66
-rw-r--r--SuperPolarityMac/ParticleEngine.cs86
-rw-r--r--SuperPolarityMac/Player.cs81
-rw-r--r--SuperPolarityMac/Program.cs26
-rw-r--r--SuperPolarityMac/Properties/AssemblyInfo.cs27
-rw-r--r--SuperPolarityMac/Renderer.cs42
-rw-r--r--SuperPolarityMac/ScoreScreen.cs108
-rw-r--r--SuperPolarityMac/Screen.cs40
-rw-r--r--SuperPolarityMac/ScreenManager.cs55
-rw-r--r--SuperPolarityMac/SuperPolarity.cs161
-rw-r--r--SuperPolarityMac/TitleScreen.cs50
-rw-r--r--SuperPolarityMac/Widget.cs92
-rw-r--r--SuperPolarityMac/neutral-supercruiser.xnbbin0 -> 72187 bytes
138 files changed, 1922 insertions, 263 deletions
diff --git a/Super Polarity.suo b/Super Polarity.suo
deleted file mode 100644
index 360a22a..0000000
--- a/Super Polarity.suo
+++ /dev/null
Binary files differ
diff --git a/Super Polarity/Super Polarity.csproj.user b/Super Polarity/Super Polarity.csproj.user
deleted file mode 100644
index ace9a86..0000000
--- a/Super Polarity/Super Polarity.csproj.user
+++ /dev/null
@@ -1,3 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-</Project> \ No newline at end of file
diff --git a/Super Polarity/bin/WindowsGL/Debug/GameName1.vshost.exe b/Super Polarity/bin/WindowsGL/Debug/GameName1.vshost.exe
deleted file mode 100644
index bb84a51..0000000
--- a/Super Polarity/bin/WindowsGL/Debug/GameName1.vshost.exe
+++ /dev/null
Binary files differ
diff --git a/Super Polarity/bin/WindowsGL/Debug/GameName1.vshost.exe.manifest b/Super Polarity/bin/WindowsGL/Debug/GameName1.vshost.exe.manifest
deleted file mode 100644
index 061c9ca..0000000
--- a/Super Polarity/bin/WindowsGL/Debug/GameName1.vshost.exe.manifest
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
-<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
- <assemblyIdentity version="1.0.0.0" name="MyApplication.app"/>
- <trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
- <security>
- <requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
- <requestedExecutionLevel level="asInvoker" uiAccess="false"/>
- </requestedPrivileges>
- </security>
- </trustInfo>
-</assembly>
diff --git a/Super Polarity/bin/WindowsGL/Debug/Lidgren.Network.dll b/Super Polarity/bin/WindowsGL/Debug/Lidgren.Network.dll
deleted file mode 100644
index fd45367..0000000
--- a/Super Polarity/bin/WindowsGL/Debug/Lidgren.Network.dll
+++ /dev/null
Binary files differ
diff --git a/Super Polarity/bin/WindowsGL/Debug/MonoGame.Framework.dll b/Super Polarity/bin/WindowsGL/Debug/MonoGame.Framework.dll
deleted file mode 100644
index c087ac2..0000000
--- a/Super Polarity/bin/WindowsGL/Debug/MonoGame.Framework.dll
+++ /dev/null
Binary files differ
diff --git a/Super Polarity/bin/WindowsGL/Debug/OpenTK.dll b/Super Polarity/bin/WindowsGL/Debug/OpenTK.dll
deleted file mode 100644
index b1cd2e9..0000000
--- a/Super Polarity/bin/WindowsGL/Debug/OpenTK.dll
+++ /dev/null
Binary files differ
diff --git a/Super Polarity/bin/WindowsGL/Debug/SDL.dll b/Super Polarity/bin/WindowsGL/Debug/SDL.dll
deleted file mode 100644
index 628cdfc..0000000
--- a/Super Polarity/bin/WindowsGL/Debug/SDL.dll
+++ /dev/null
Binary files differ
diff --git a/Super Polarity/bin/WindowsGL/Debug/Super Polarity.exe b/Super Polarity/bin/WindowsGL/Debug/Super Polarity.exe
deleted file mode 100644
index 746c670..0000000
--- a/Super Polarity/bin/WindowsGL/Debug/Super Polarity.exe
+++ /dev/null
Binary files differ
diff --git a/Super Polarity/bin/WindowsGL/Debug/Super Polarity.pdb b/Super Polarity/bin/WindowsGL/Debug/Super Polarity.pdb
deleted file mode 100644
index fea49a1..0000000
--- a/Super Polarity/bin/WindowsGL/Debug/Super Polarity.pdb
+++ /dev/null
Binary files differ
diff --git a/Super Polarity/bin/WindowsGL/Debug/Super Polarity.vshost.exe b/Super Polarity/bin/WindowsGL/Debug/Super Polarity.vshost.exe
deleted file mode 100644
index bb84a51..0000000
--- a/Super Polarity/bin/WindowsGL/Debug/Super Polarity.vshost.exe
+++ /dev/null
Binary files differ
diff --git a/Super Polarity/bin/WindowsGL/Debug/Tao.Sdl.dll b/Super Polarity/bin/WindowsGL/Debug/Tao.Sdl.dll
deleted file mode 100644
index d2e2d47..0000000
--- a/Super Polarity/bin/WindowsGL/Debug/Tao.Sdl.dll
+++ /dev/null
Binary files differ
diff --git a/Super Polarity/obj/x86/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/Super Polarity/obj/x86/Debug/DesignTimeResolveAssemblyReferencesInput.cache
deleted file mode 100644
index ef9920b..0000000
--- a/Super Polarity/obj/x86/Debug/DesignTimeResolveAssemblyReferencesInput.cache
+++ /dev/null
Binary files differ
diff --git a/Super Polarity/obj/x86/Debug/ResolveAssemblyReference.cache b/Super Polarity/obj/x86/Debug/ResolveAssemblyReference.cache
deleted file mode 100644
index d619ccb..0000000
--- a/Super Polarity/obj/x86/Debug/ResolveAssemblyReference.cache
+++ /dev/null
Binary files differ
diff --git a/Super Polarity/obj/x86/Debug/Super Polarity.csproj.FileListAbsolute.txt b/Super Polarity/obj/x86/Debug/Super Polarity.csproj.FileListAbsolute.txt
deleted file mode 100644
index cabc9d2..0000000
--- a/Super Polarity/obj/x86/Debug/Super Polarity.csproj.FileListAbsolute.txt
+++ /dev/null
@@ -1,42 +0,0 @@
-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
-C:\Users\Miau\documents\visual studio 2010\Projects\Super Polarity\Super Polarity\bin\WindowsGL\Debug\Tao.Sdl.dll
-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\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\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
-C:\Users\Miau\documents\visual studio 2010\Projects\Super Polarity\Super Polarity\bin\WindowsGL\Debug\Content\Graphics\negative-ship.xnb
-C:\Users\Miau\documents\visual studio 2010\Projects\Super Polarity\Super Polarity\bin\WindowsGL\Debug\Content\Graphics\square.xnb
-C:\Users\Miau\documents\visual studio 2010\Projects\Super Polarity\Super Polarity\bin\WindowsGL\Debug\Content\Fonts\SegoeUIMono14.xnb
-C:\Users\Miau\documents\visual studio 2010\Projects\Super Polarity\Super Polarity\bin\WindowsGL\Debug\neutral-supercruiser.xnb
-C:\Users\Miau\documents\visual studio 2010\Projects\Super Polarity\Super Polarity\bin\WindowsGL\Debug\Content\Sound\polaritytheme.wav
-C:\Users\Miau\documents\visual studio 2010\Projects\Super Polarity\Super Polarity\bin\WindowsGL\Debug\Content\Sound\bullet.wav
-C:\Users\Miau\documents\visual studio 2010\Projects\Super Polarity\Super Polarity\bin\WindowsGL\Debug\Content\Sound\polaritychange.wav
-C:\Users\Miau\documents\visual studio 2010\Projects\Super Polarity\Super Polarity\bin\WindowsGL\Debug\Content\Graphics\pause-screen.xnb
-C:\Users\Miau\documents\visual studio 2010\Projects\Super Polarity\Super Polarity\bin\WindowsGL\Debug\Content\Graphics\polaritydemotitle.xnb
-C:\Users\Miau\documents\visual studio 2010\Projects\Super Polarity\Super Polarity\bin\WindowsGL\Debug\Content\Sound\gameover.wav
-C:\Users\Miau\documents\visual studio 2010\Projects\Super Polarity\Super Polarity\bin\WindowsGL\Debug\Content\Sound\bomb.wav
-C:\Users\Miau\documents\visual studio 2010\Projects\Super Polarity\Super Polarity\bin\WindowsGL\Debug\Content\Sound\hit.wav
-C:\Users\Miau\documents\visual studio 2010\Projects\Super Polarity\Super Polarity\bin\WindowsGL\Debug\Content\Sound\life.wav
-C:\Users\Miau\documents\visual studio 2010\Projects\Super Polarity\Super Polarity\bin\WindowsGL\Debug\Content\Fonts\bigfont.xnb
-C:\Users\Miau\documents\visual studio 2010\Projects\Super Polarity\Super Polarity\bin\WindowsGL\Debug\Content\Fonts\smallfont.xnb
diff --git a/Super Polarity/obj/x86/Debug/Super Polarity.exe b/Super Polarity/obj/x86/Debug/Super Polarity.exe
deleted file mode 100644
index 746c670..0000000
--- a/Super Polarity/obj/x86/Debug/Super Polarity.exe
+++ /dev/null
Binary files differ
diff --git a/Super Polarity/obj/x86/Debug/Super Polarity.pdb b/Super Polarity/obj/x86/Debug/Super Polarity.pdb
deleted file mode 100644
index fea49a1..0000000
--- a/Super Polarity/obj/x86/Debug/Super Polarity.pdb
+++ /dev/null
Binary files differ
diff --git a/Super Polarity.sln b/SuperPolarity.sln
index 6742318..4037050 100644
--- a/Super Polarity.sln
+++ b/SuperPolarity.sln
@@ -1,11 +1,11 @@

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}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SuperPolarity", "SuperPolarity\SuperPolarity.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}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SuperPolarity Content", "SuperPolarity Content\SuperPolarity Content\SuperPolarity 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}"
+Project("{96E2B04D-8817-42C6-938A-82C39BA4D311}") = "SuperPolarity ContentContent", "SuperPolarity Content\SuperPolarity ContentContent\SuperPolarity ContentContent.contentproj", "{468F8415-7D38-4718-B0B4-E18F1A427136}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
diff --git a/SuperPolarity.userprefs b/SuperPolarity.userprefs
new file mode 100644
index 0000000..0d7562c
--- /dev/null
+++ b/SuperPolarity.userprefs
@@ -0,0 +1,12 @@
+<Properties>
+ <MonoDevelop.Ide.Workspace ActiveConfiguration="Debug" />
+ <MonoDevelop.Ide.Workbench ActiveDocument="SuperPolarity/Properties/AssemblyInfo.cs">
+ <Files>
+ <File FileName="SuperPolarity/Properties/AssemblyInfo.cs" Line="9" Column="34" />
+ </Files>
+ </MonoDevelop.Ide.Workbench>
+ <MonoDevelop.Ide.DebuggingService.Breakpoints>
+ <BreakpointStore />
+ </MonoDevelop.Ide.DebuggingService.Breakpoints>
+ <MonoDevelop.Ide.DebuggingService.PinnedWatches />
+</Properties>
diff --git a/Super Polarity/ActorFactory.cs b/SuperPolarity/ActorFactory.cs
index f9c7697..f9c7697 100644
--- a/Super Polarity/ActorFactory.cs
+++ b/SuperPolarity/ActorFactory.cs
diff --git a/Super Polarity/ActorManager.cs b/SuperPolarity/ActorManager.cs
index f5587b9..f5587b9 100644
--- a/Super Polarity/ActorManager.cs
+++ b/SuperPolarity/ActorManager.cs
diff --git a/Super Polarity/Actors/Actor.cs b/SuperPolarity/Actors/Actor.cs
index 3bb06be..3bb06be 100644
--- a/Super Polarity/Actors/Actor.cs
+++ b/SuperPolarity/Actors/Actor.cs
diff --git a/Super Polarity/Actors/Bullet.cs b/SuperPolarity/Actors/Bullet.cs
index d20289c..d20289c 100644
--- a/Super Polarity/Actors/Bullet.cs
+++ b/SuperPolarity/Actors/Bullet.cs
diff --git a/Super Polarity/Actors/MainShip.cs b/SuperPolarity/Actors/MainShip.cs
index bf4f3bb..bf4f3bb 100644
--- a/Super Polarity/Actors/MainShip.cs
+++ b/SuperPolarity/Actors/MainShip.cs
diff --git a/Super Polarity/Actors/Ship.cs b/SuperPolarity/Actors/Ship.cs
index 229f639..229f639 100644
--- a/Super Polarity/Actors/Ship.cs
+++ b/SuperPolarity/Actors/Ship.cs
diff --git a/Super Polarity/Actors/StandardShip.cs b/SuperPolarity/Actors/StandardShip.cs
index ef2fe7f..ef2fe7f 100644
--- a/Super Polarity/Actors/StandardShip.cs
+++ b/SuperPolarity/Actors/StandardShip.cs
diff --git a/Super Polarity/BasicGenerator.cs b/SuperPolarity/BasicGenerator.cs
index ba51742..ba51742 100644
--- a/Super Polarity/BasicGenerator.cs
+++ b/SuperPolarity/BasicGenerator.cs
diff --git a/Super Polarity/Content/Fonts/SegoeUIMono14.xnb b/SuperPolarity/Content/Fonts/SegoeUIMono14.xnb
index 51c4abd..51c4abd 100644
--- a/Super Polarity/Content/Fonts/SegoeUIMono14.xnb
+++ b/SuperPolarity/Content/Fonts/SegoeUIMono14.xnb
Binary files differ
diff --git a/Super Polarity/Content/Fonts/bigfont.xnb b/SuperPolarity/Content/Fonts/bigfont.xnb
index c1d876c..c1d876c 100644
--- a/Super Polarity/Content/Fonts/bigfont.xnb
+++ b/SuperPolarity/Content/Fonts/bigfont.xnb
Binary files differ
diff --git a/Super Polarity/Content/Fonts/smallfont.xnb b/SuperPolarity/Content/Fonts/smallfont.xnb
index a87e66a..a87e66a 100644
--- a/Super Polarity/Content/Fonts/smallfont.xnb
+++ b/SuperPolarity/Content/Fonts/smallfont.xnb
Binary files differ
diff --git a/Super Polarity/Content/Graphics/circle.xnb b/SuperPolarity/Content/Graphics/circle.xnb
index 3471449..3471449 100644
--- a/Super Polarity/Content/Graphics/circle.xnb
+++ b/SuperPolarity/Content/Graphics/circle.xnb
Binary files differ
diff --git a/Super Polarity/Content/Graphics/diamond.xnb b/SuperPolarity/Content/Graphics/diamond.xnb
index 8bda70c..8bda70c 100644
--- a/Super Polarity/Content/Graphics/diamond.xnb
+++ b/SuperPolarity/Content/Graphics/diamond.xnb
Binary files differ
diff --git a/Super Polarity/Content/Graphics/main-ship.xnb b/SuperPolarity/Content/Graphics/main-ship.xnb
index 7108e2f..7108e2f 100644
--- a/Super Polarity/Content/Graphics/main-ship.xnb
+++ b/SuperPolarity/Content/Graphics/main-ship.xnb
Binary files differ
diff --git a/Super Polarity/Content/Graphics/negative-cruiser.xnb b/SuperPolarity/Content/Graphics/negative-cruiser.xnb
index 5c9f41d..5c9f41d 100644
--- a/Super Polarity/Content/Graphics/negative-cruiser.xnb
+++ b/SuperPolarity/Content/Graphics/negative-cruiser.xnb
Binary files differ
diff --git a/Super Polarity/Content/Graphics/negative-destroyer.xnb b/SuperPolarity/Content/Graphics/negative-destroyer.xnb
index fe13745..fe13745 100644
--- a/Super Polarity/Content/Graphics/negative-destroyer.xnb
+++ b/SuperPolarity/Content/Graphics/negative-destroyer.xnb
Binary files differ
diff --git a/Super Polarity/Content/Graphics/negative-scout.xnb b/SuperPolarity/Content/Graphics/negative-scout.xnb
index a5a2e7a..a5a2e7a 100644
--- a/Super Polarity/Content/Graphics/negative-scout.xnb
+++ b/SuperPolarity/Content/Graphics/negative-scout.xnb
Binary files differ
diff --git a/Super Polarity/Content/Graphics/negative-ship.xnb b/SuperPolarity/Content/Graphics/negative-ship.xnb
index ed41216..ed41216 100644
--- a/Super Polarity/Content/Graphics/negative-ship.xnb
+++ b/SuperPolarity/Content/Graphics/negative-ship.xnb
Binary files differ
diff --git a/Super Polarity/Content/Graphics/negative-supercruiser.xnb b/SuperPolarity/Content/Graphics/negative-supercruiser.xnb
index b77f364..b77f364 100644
--- a/Super Polarity/Content/Graphics/negative-supercruiser.xnb
+++ b/SuperPolarity/Content/Graphics/negative-supercruiser.xnb
Binary files differ
diff --git a/Super Polarity/Content/Graphics/neutral-cruiser.xnb b/SuperPolarity/Content/Graphics/neutral-cruiser.xnb
index ac99113..ac99113 100644
--- a/Super Polarity/Content/Graphics/neutral-cruiser.xnb
+++ b/SuperPolarity/Content/Graphics/neutral-cruiser.xnb
Binary files differ
diff --git a/Super Polarity/Content/Graphics/neutral-destroyer.xnb b/SuperPolarity/Content/Graphics/neutral-destroyer.xnb
index 69b5924..69b5924 100644
--- a/Super Polarity/Content/Graphics/neutral-destroyer.xnb
+++ b/SuperPolarity/Content/Graphics/neutral-destroyer.xnb
Binary files differ
diff --git a/Super Polarity/Content/Graphics/neutral-scout.xnb b/SuperPolarity/Content/Graphics/neutral-scout.xnb
index 5e9ff59..5e9ff59 100644
--- a/Super Polarity/Content/Graphics/neutral-scout.xnb
+++ b/SuperPolarity/Content/Graphics/neutral-scout.xnb
Binary files differ
diff --git a/Super Polarity/Content/Graphics/neutral-ship.xnb b/SuperPolarity/Content/Graphics/neutral-ship.xnb
index 04259be..04259be 100644
--- a/Super Polarity/Content/Graphics/neutral-ship.xnb
+++ b/SuperPolarity/Content/Graphics/neutral-ship.xnb
Binary files differ
diff --git a/Super Polarity/Content/Graphics/neutral-supercruiser.xnb b/SuperPolarity/Content/Graphics/neutral-supercruiser.xnb
index 1389842..1389842 100644
--- a/Super Polarity/Content/Graphics/neutral-supercruiser.xnb
+++ b/SuperPolarity/Content/Graphics/neutral-supercruiser.xnb
Binary files differ
diff --git a/Super Polarity/Content/Graphics/pause-screen.xnb b/SuperPolarity/Content/Graphics/pause-screen.xnb
index 2307009..2307009 100644
--- a/Super Polarity/Content/Graphics/pause-screen.xnb
+++ b/SuperPolarity/Content/Graphics/pause-screen.xnb
Binary files differ
diff --git a/Super Polarity/Content/Graphics/polaritydemotitle.xnb b/SuperPolarity/Content/Graphics/polaritydemotitle.xnb
index 2fa9cf3..2fa9cf3 100644
--- a/Super Polarity/Content/Graphics/polaritydemotitle.xnb
+++ b/SuperPolarity/Content/Graphics/polaritydemotitle.xnb
Binary files differ
diff --git a/Super Polarity/Content/Graphics/positive-cruiser.xnb b/SuperPolarity/Content/Graphics/positive-cruiser.xnb
index b65d2bd..b65d2bd 100644
--- a/Super Polarity/Content/Graphics/positive-cruiser.xnb
+++ b/SuperPolarity/Content/Graphics/positive-cruiser.xnb
Binary files differ
diff --git a/Super Polarity/Content/Graphics/positive-destroyer.xnb b/SuperPolarity/Content/Graphics/positive-destroyer.xnb
index d773175..d773175 100644
--- a/Super Polarity/Content/Graphics/positive-destroyer.xnb
+++ b/SuperPolarity/Content/Graphics/positive-destroyer.xnb
Binary files differ
diff --git a/Super Polarity/Content/Graphics/positive-scout.xnb b/SuperPolarity/Content/Graphics/positive-scout.xnb
index 2b8f9fe..2b8f9fe 100644
--- a/Super Polarity/Content/Graphics/positive-scout.xnb
+++ b/SuperPolarity/Content/Graphics/positive-scout.xnb
Binary files differ
diff --git a/Super Polarity/Content/Graphics/positive-ship.xnb b/SuperPolarity/Content/Graphics/positive-ship.xnb
index e4e21f1..e4e21f1 100644
--- a/Super Polarity/Content/Graphics/positive-ship.xnb
+++ b/SuperPolarity/Content/Graphics/positive-ship.xnb
Binary files differ
diff --git a/Super Polarity/Content/Graphics/positive-supercruiser.xnb b/SuperPolarity/Content/Graphics/positive-supercruiser.xnb
index 2ecca79..2ecca79 100644
--- a/Super Polarity/Content/Graphics/positive-supercruiser.xnb
+++ b/SuperPolarity/Content/Graphics/positive-supercruiser.xnb
Binary files differ
diff --git a/Super Polarity/Content/Graphics/square.xnb b/SuperPolarity/Content/Graphics/square.xnb
index 5a88d89..5a88d89 100644
--- a/Super Polarity/Content/Graphics/square.xnb
+++ b/SuperPolarity/Content/Graphics/square.xnb
Binary files differ
diff --git a/Super Polarity/Content/Graphics/star.xnb b/SuperPolarity/Content/Graphics/star.xnb
index 763addf..763addf 100644
--- a/Super Polarity/Content/Graphics/star.xnb
+++ b/SuperPolarity/Content/Graphics/star.xnb
Binary files differ
diff --git a/Super Polarity/Content/Sound/bomb.wav b/SuperPolarity/Content/Sound/bomb.wav
index 5af439b..5af439b 100644
--- a/Super Polarity/Content/Sound/bomb.wav
+++ b/SuperPolarity/Content/Sound/bomb.wav
Binary files differ
diff --git a/Super Polarity/Content/Sound/bullet.wav b/SuperPolarity/Content/Sound/bullet.wav
index 6586489..6586489 100644
--- a/Super Polarity/Content/Sound/bullet.wav
+++ b/SuperPolarity/Content/Sound/bullet.wav
Binary files differ
diff --git a/Super Polarity/Content/Sound/gameover.wav b/SuperPolarity/Content/Sound/gameover.wav
index cac9d23..cac9d23 100644
--- a/Super Polarity/Content/Sound/gameover.wav
+++ b/SuperPolarity/Content/Sound/gameover.wav
Binary files differ
diff --git a/Super Polarity/Content/Sound/hit.wav b/SuperPolarity/Content/Sound/hit.wav
index 43433cd..43433cd 100644
--- a/Super Polarity/Content/Sound/hit.wav
+++ b/SuperPolarity/Content/Sound/hit.wav
Binary files differ
diff --git a/Super Polarity/Content/Sound/life.wav b/SuperPolarity/Content/Sound/life.wav
index a1d0436..a1d0436 100644
--- a/Super Polarity/Content/Sound/life.wav
+++ b/SuperPolarity/Content/Sound/life.wav
Binary files differ
diff --git a/Super Polarity/Content/Sound/polaritychange.wav b/SuperPolarity/Content/Sound/polaritychange.wav
index 25b59a4..25b59a4 100644
--- a/Super Polarity/Content/Sound/polaritychange.wav
+++ b/SuperPolarity/Content/Sound/polaritychange.wav
Binary files differ
diff --git a/Super Polarity Content/Super Polarity ContentContent/Sound/polaritytheme.wav b/SuperPolarity/Content/Sound/polaritytheme.wav
index 28a6bce..28a6bce 100644
--- a/Super Polarity Content/Super Polarity ContentContent/Sound/polaritytheme.wav
+++ b/SuperPolarity/Content/Sound/polaritytheme.wav
Binary files differ
diff --git a/Super Polarity/GameScreen.cs b/SuperPolarity/GameScreen.cs
index 783e3c1..783e3c1 100644
--- a/Super Polarity/GameScreen.cs
+++ b/SuperPolarity/GameScreen.cs
diff --git a/Super Polarity/Icon.ico b/SuperPolarity/Icon.ico
index 13be62a..13be62a 100644
--- a/Super Polarity/Icon.ico
+++ b/SuperPolarity/Icon.ico
Binary files differ
diff --git a/Super Polarity/InputController.cs b/SuperPolarity/InputController.cs
index c92bb9c..c92bb9c 100644
--- a/Super Polarity/InputController.cs
+++ b/SuperPolarity/InputController.cs
diff --git a/Super Polarity/LetterChooseWidget.cs b/SuperPolarity/LetterChooseWidget.cs
index e52733f..e52733f 100644
--- a/Super Polarity/LetterChooseWidget.cs
+++ b/SuperPolarity/LetterChooseWidget.cs
diff --git a/Super Polarity/MenuItem.cs b/SuperPolarity/MenuItem.cs
index 8e24c97..8e24c97 100644
--- a/Super Polarity/MenuItem.cs
+++ b/SuperPolarity/MenuItem.cs
diff --git a/Super Polarity/MenuWidget.cs b/SuperPolarity/MenuWidget.cs
index 992ef43..992ef43 100644
--- a/Super Polarity/MenuWidget.cs
+++ b/SuperPolarity/MenuWidget.cs
diff --git a/Super Polarity/NameChooserWidget.cs b/SuperPolarity/NameChooserWidget.cs
index ce7c149..ce7c149 100644
--- a/Super Polarity/NameChooserWidget.cs
+++ b/SuperPolarity/NameChooserWidget.cs
diff --git a/Super Polarity/Particle.cs b/SuperPolarity/Particle.cs
index d65bac6..d65bac6 100644
--- a/Super Polarity/Particle.cs
+++ b/SuperPolarity/Particle.cs
diff --git a/Super Polarity/ParticleEffectFactory.cs b/SuperPolarity/ParticleEffectFactory.cs
index 0cd9ed3..0cd9ed3 100644
--- a/Super Polarity/ParticleEffectFactory.cs
+++ b/SuperPolarity/ParticleEffectFactory.cs
diff --git a/Super Polarity/ParticleEngine.cs b/SuperPolarity/ParticleEngine.cs
index 51188ae..51188ae 100644
--- a/Super Polarity/ParticleEngine.cs
+++ b/SuperPolarity/ParticleEngine.cs
diff --git a/Super Polarity/Player.cs b/SuperPolarity/Player.cs
index 184abdd..184abdd 100644
--- a/Super Polarity/Player.cs
+++ b/SuperPolarity/Player.cs
diff --git a/Super Polarity/Program.cs b/SuperPolarity/Program.cs
index 6c3f614..6c3f614 100644
--- a/Super Polarity/Program.cs
+++ b/SuperPolarity/Program.cs
diff --git a/Super Polarity/Properties/AssemblyInfo.cs b/SuperPolarity/Properties/AssemblyInfo.cs
index 91a7e87..bd24ce8 100644
--- a/Super Polarity/Properties/AssemblyInfo.cs
+++ b/SuperPolarity/Properties/AssemblyInfo.cs
@@ -5,8 +5,8 @@ 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("Super Polarity")]
-[assembly: AssemblyProduct("Super Polarity")]
+[assembly: AssemblyTitle("SuperPolarity")]
+[assembly: AssemblyProduct("SuperPolarity")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyCompany("")]
diff --git a/Super Polarity/Renderer.cs b/SuperPolarity/Renderer.cs
index 7ca8158..7ca8158 100644
--- a/Super Polarity/Renderer.cs
+++ b/SuperPolarity/Renderer.cs
diff --git a/Super Polarity/ScoreScreen.cs b/SuperPolarity/ScoreScreen.cs
index bf43275..bf43275 100644
--- a/Super Polarity/ScoreScreen.cs
+++ b/SuperPolarity/ScoreScreen.cs
diff --git a/Super Polarity/Screen.cs b/SuperPolarity/Screen.cs
index 006b047..006b047 100644
--- a/Super Polarity/Screen.cs
+++ b/SuperPolarity/Screen.cs
diff --git a/Super Polarity/ScreenManager.cs b/SuperPolarity/ScreenManager.cs
index b88741b..b88741b 100644
--- a/Super Polarity/ScreenManager.cs
+++ b/SuperPolarity/ScreenManager.cs
diff --git a/Super Polarity/SuperPolarity.cs b/SuperPolarity/SuperPolarity.cs
index 9311d53..9311d53 100644
--- a/Super Polarity/SuperPolarity.cs
+++ b/SuperPolarity/SuperPolarity.cs
diff --git a/Super Polarity/Super Polarity.csproj b/SuperPolarity/SuperPolarity.csproj
index 24cea5c..76124b7 100644
--- a/Super Polarity/Super Polarity.csproj
+++ b/SuperPolarity/SuperPolarity.csproj
@@ -9,7 +9,7 @@
<OutputType>WinExe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>SuperPolarity</RootNamespace>
- <AssemblyName>Super Polarity</AssemblyName>
+ <AssemblyName>SuperPolarity</AssemblyName>
<FileAlignment>512</FileAlignment>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
diff --git a/Super Polarity/TitleScreen.cs b/SuperPolarity/TitleScreen.cs
index a953f27..a953f27 100644
--- a/Super Polarity/TitleScreen.cs
+++ b/SuperPolarity/TitleScreen.cs
diff --git a/Super Polarity/Widget.cs b/SuperPolarity/Widget.cs
index ea92cfd..ea92cfd 100644
--- a/Super Polarity/Widget.cs
+++ b/SuperPolarity/Widget.cs
diff --git a/Super Polarity/neutral-supercruiser.xnb b/SuperPolarity/neutral-supercruiser.xnb
index 1389842..1389842 100644
--- a/Super Polarity/neutral-supercruiser.xnb
+++ b/SuperPolarity/neutral-supercruiser.xnb
Binary files differ
diff --git a/Super Polarity/scores.txt b/SuperPolarity/scores.txt
index e69de29..e69de29 100644
--- a/Super Polarity/scores.txt
+++ b/SuperPolarity/scores.txt
diff --git a/Super Polarity Content/Super Polarity Content/Super Polarity Content.csproj b/SuperPolarityContent/SuperPolarityContent/SuperPolarityContent.csproj
index 4cc2f56..9075af4 100644
--- a/Super Polarity Content/Super Polarity Content/Super Polarity Content.csproj
+++ b/SuperPolarityContent/SuperPolarityContent/SuperPolarityContent.csproj
@@ -46,9 +46,9 @@
<Reference Include="mscorlib" />
</ItemGroup>
<ItemGroup>
- <ProjectReference Include="..\Super Polarity ContentContent\Super Polarity ContentContent.contentproj">
+ <ProjectReference Include="..\SuperPolarity ContentContent\SuperPolarity ContentContent.contentproj">
<Project>{468F8415-7D38-4718-B0B4-E18F1A427136}</Project>
- <Name>Super Polarity ContentContent %28Content%29</Name>
+ <Name>SuperPolarity ContentContent %28Content%29</Name>
<XnaReferenceType>Content</XnaReferenceType>
</ProjectReference>
</ItemGroup>
@@ -62,4 +62,4 @@
<Target Name="AfterBuild">
</Target>
-->
-</Project> \ No newline at end of file
+</Project>
diff --git a/Super Polarity Content/Super Polarity ContentContent/Fonts/SegoeUIMono14.spritefont b/SuperPolarityContent/SuperPolarityContentContent/Fonts/SegoeUIMono14.spritefont
index 6c68f5d..6c68f5d 100644
--- a/Super Polarity Content/Super Polarity ContentContent/Fonts/SegoeUIMono14.spritefont
+++ b/SuperPolarityContent/SuperPolarityContentContent/Fonts/SegoeUIMono14.spritefont
diff --git a/Super Polarity Content/Super Polarity ContentContent/Fonts/bigfont.png b/SuperPolarityContent/SuperPolarityContentContent/Fonts/bigfont.png
index 67307dd..67307dd 100644
--- a/Super Polarity Content/Super Polarity ContentContent/Fonts/bigfont.png
+++ b/SuperPolarityContent/SuperPolarityContentContent/Fonts/bigfont.png
Binary files differ
diff --git a/Super Polarity Content/Super Polarity ContentContent/Fonts/smallfont.png b/SuperPolarityContent/SuperPolarityContentContent/Fonts/smallfont.png
index 51a2c14..51a2c14 100644
--- a/Super Polarity Content/Super Polarity ContentContent/Fonts/smallfont.png
+++ b/SuperPolarityContent/SuperPolarityContentContent/Fonts/smallfont.png
Binary files differ
diff --git a/Super Polarity Content/Super Polarity ContentContent/Graphics/circle.png b/SuperPolarityContent/SuperPolarityContentContent/Graphics/circle.png
index ede9996..ede9996 100644
--- a/Super Polarity Content/Super Polarity ContentContent/Graphics/circle.png
+++ b/SuperPolarityContent/SuperPolarityContentContent/Graphics/circle.png
Binary files differ
diff --git a/Super Polarity Content/Super Polarity ContentContent/Graphics/diamond.png b/SuperPolarityContent/SuperPolarityContentContent/Graphics/diamond.png
index f06a523..f06a523 100644
--- a/Super Polarity Content/Super Polarity ContentContent/Graphics/diamond.png
+++ b/SuperPolarityContent/SuperPolarityContentContent/Graphics/diamond.png
Binary files differ
diff --git a/Super Polarity Content/Super Polarity ContentContent/Graphics/main-ship.png b/SuperPolarityContent/SuperPolarityContentContent/Graphics/main-ship.png
index 168ce43..168ce43 100644
--- a/Super Polarity Content/Super Polarity ContentContent/Graphics/main-ship.png
+++ b/SuperPolarityContent/SuperPolarityContentContent/Graphics/main-ship.png
Binary files differ
diff --git a/Super Polarity Content/Super Polarity ContentContent/Graphics/negative-cruiser.png b/SuperPolarityContent/SuperPolarityContentContent/Graphics/negative-cruiser.png
index 0461e90..0461e90 100644
--- a/Super Polarity Content/Super Polarity ContentContent/Graphics/negative-cruiser.png
+++ b/SuperPolarityContent/SuperPolarityContentContent/Graphics/negative-cruiser.png
Binary files differ
diff --git a/Super Polarity Content/Super Polarity ContentContent/Graphics/negative-destroyer.png b/SuperPolarityContent/SuperPolarityContentContent/Graphics/negative-destroyer.png
index 25244f2..25244f2 100644
--- a/Super Polarity Content/Super Polarity ContentContent/Graphics/negative-destroyer.png
+++ b/SuperPolarityContent/SuperPolarityContentContent/Graphics/negative-destroyer.png
Binary files differ
diff --git a/Super Polarity Content/Super Polarity ContentContent/Graphics/negative-scout.png b/SuperPolarityContent/SuperPolarityContentContent/Graphics/negative-scout.png
index fdc372b..fdc372b 100644
--- a/Super Polarity Content/Super Polarity ContentContent/Graphics/negative-scout.png
+++ b/SuperPolarityContent/SuperPolarityContentContent/Graphics/negative-scout.png
Binary files differ
diff --git a/Super Polarity Content/Super Polarity ContentContent/Graphics/negative-ship.png b/SuperPolarityContent/SuperPolarityContentContent/Graphics/negative-ship.png
index 1407d5d..1407d5d 100644
--- a/Super Polarity Content/Super Polarity ContentContent/Graphics/negative-ship.png
+++ b/SuperPolarityContent/SuperPolarityContentContent/Graphics/negative-ship.png
Binary files differ
diff --git a/Super Polarity Content/Super Polarity ContentContent/Graphics/negative-supercruiser.png b/SuperPolarityContent/SuperPolarityContentContent/Graphics/negative-supercruiser.png
index 344ef93..344ef93 100644
--- a/Super Polarity Content/Super Polarity ContentContent/Graphics/negative-supercruiser.png
+++ b/SuperPolarityContent/SuperPolarityContentContent/Graphics/negative-supercruiser.png
Binary files differ
diff --git a/Super Polarity Content/Super Polarity ContentContent/Graphics/neutral-cruiser.png b/SuperPolarityContent/SuperPolarityContentContent/Graphics/neutral-cruiser.png
index 3f5be69..3f5be69 100644
--- a/Super Polarity Content/Super Polarity ContentContent/Graphics/neutral-cruiser.png
+++ b/SuperPolarityContent/SuperPolarityContentContent/Graphics/neutral-cruiser.png
Binary files differ
diff --git a/Super Polarity Content/Super Polarity ContentContent/Graphics/neutral-destroyer.png b/SuperPolarityContent/SuperPolarityContentContent/Graphics/neutral-destroyer.png
index 458ec8e..458ec8e 100644
--- a/Super Polarity Content/Super Polarity ContentContent/Graphics/neutral-destroyer.png
+++ b/SuperPolarityContent/SuperPolarityContentContent/Graphics/neutral-destroyer.png
Binary files differ
diff --git a/Super Polarity Content/Super Polarity ContentContent/Graphics/neutral-scout.png b/SuperPolarityContent/SuperPolarityContentContent/Graphics/neutral-scout.png
index e7a1364..e7a1364 100644
--- a/Super Polarity Content/Super Polarity ContentContent/Graphics/neutral-scout.png
+++ b/SuperPolarityContent/SuperPolarityContentContent/Graphics/neutral-scout.png
Binary files differ
diff --git a/Super Polarity Content/Super Polarity ContentContent/Graphics/neutral-ship.png b/SuperPolarityContent/SuperPolarityContentContent/Graphics/neutral-ship.png
index 6b0a767..6b0a767 100644
--- a/Super Polarity Content/Super Polarity ContentContent/Graphics/neutral-ship.png
+++ b/SuperPolarityContent/SuperPolarityContentContent/Graphics/neutral-ship.png
Binary files differ
diff --git a/Super Polarity Content/Super Polarity ContentContent/Graphics/neutral-supercruiser.png b/SuperPolarityContent/SuperPolarityContentContent/Graphics/neutral-supercruiser.png
index 183b71c..183b71c 100644
--- a/Super Polarity Content/Super Polarity ContentContent/Graphics/neutral-supercruiser.png
+++ b/SuperPolarityContent/SuperPolarityContentContent/Graphics/neutral-supercruiser.png
Binary files differ
diff --git a/Super Polarity Content/Super Polarity ContentContent/Graphics/pause-screen.png b/SuperPolarityContent/SuperPolarityContentContent/Graphics/pause-screen.png
index 0d6db73..0d6db73 100644
--- a/Super Polarity Content/Super Polarity ContentContent/Graphics/pause-screen.png
+++ b/SuperPolarityContent/SuperPolarityContentContent/Graphics/pause-screen.png
Binary files differ
diff --git a/Super Polarity Content/Super Polarity ContentContent/Graphics/polaritydemotitle.png b/SuperPolarityContent/SuperPolarityContentContent/Graphics/polaritydemotitle.png
index 10a9b92..10a9b92 100644
--- a/Super Polarity Content/Super Polarity ContentContent/Graphics/polaritydemotitle.png
+++ b/SuperPolarityContent/SuperPolarityContentContent/Graphics/polaritydemotitle.png
Binary files differ
diff --git a/Super Polarity Content/Super Polarity ContentContent/Graphics/positive-cruiser.png b/SuperPolarityContent/SuperPolarityContentContent/Graphics/positive-cruiser.png
index 62da8bc..62da8bc 100644
--- a/Super Polarity Content/Super Polarity ContentContent/Graphics/positive-cruiser.png
+++ b/SuperPolarityContent/SuperPolarityContentContent/Graphics/positive-cruiser.png
Binary files differ
diff --git a/Super Polarity Content/Super Polarity ContentContent/Graphics/positive-destroyer.png b/SuperPolarityContent/SuperPolarityContentContent/Graphics/positive-destroyer.png
index 735d473..735d473 100644
--- a/Super Polarity Content/Super Polarity ContentContent/Graphics/positive-destroyer.png
+++ b/SuperPolarityContent/SuperPolarityContentContent/Graphics/positive-destroyer.png
Binary files differ
diff --git a/Super Polarity Content/Super Polarity ContentContent/Graphics/positive-scout.png b/SuperPolarityContent/SuperPolarityContentContent/Graphics/positive-scout.png
index 1970625..1970625 100644
--- a/Super Polarity Content/Super Polarity ContentContent/Graphics/positive-scout.png
+++ b/SuperPolarityContent/SuperPolarityContentContent/Graphics/positive-scout.png
Binary files differ
diff --git a/Super Polarity Content/Super Polarity ContentContent/Graphics/positive-ship.png b/SuperPolarityContent/SuperPolarityContentContent/Graphics/positive-ship.png
index 9d07a8c..9d07a8c 100644
--- a/Super Polarity Content/Super Polarity ContentContent/Graphics/positive-ship.png
+++ b/SuperPolarityContent/SuperPolarityContentContent/Graphics/positive-ship.png
Binary files differ
diff --git a/Super Polarity Content/Super Polarity ContentContent/Graphics/positive-supercruiser.png b/SuperPolarityContent/SuperPolarityContentContent/Graphics/positive-supercruiser.png
index 6b2a77b..6b2a77b 100644
--- a/Super Polarity Content/Super Polarity ContentContent/Graphics/positive-supercruiser.png
+++ b/SuperPolarityContent/SuperPolarityContentContent/Graphics/positive-supercruiser.png
Binary files differ
diff --git a/Super Polarity Content/Super Polarity ContentContent/Graphics/square.png b/SuperPolarityContent/SuperPolarityContentContent/Graphics/square.png
index 960c50a..960c50a 100644
--- a/Super Polarity Content/Super Polarity ContentContent/Graphics/square.png
+++ b/SuperPolarityContent/SuperPolarityContentContent/Graphics/square.png
Binary files differ
diff --git a/Super Polarity Content/Super Polarity ContentContent/Graphics/star.png b/SuperPolarityContent/SuperPolarityContentContent/Graphics/star.png
index 4f207f4..4f207f4 100644
--- a/Super Polarity Content/Super Polarity ContentContent/Graphics/star.png
+++ b/SuperPolarityContent/SuperPolarityContentContent/Graphics/star.png
Binary files differ
diff --git a/Super Polarity/Content/Sound/polaritytheme.wav b/SuperPolarityContent/SuperPolarityContentContent/Sound/polaritytheme.wav
index 28a6bce..28a6bce 100644
--- a/Super Polarity/Content/Sound/polaritytheme.wav
+++ b/SuperPolarityContent/SuperPolarityContentContent/Sound/polaritytheme.wav
Binary files differ
diff --git a/Super Polarity Content/Super Polarity ContentContent/Super Polarity ContentContent.contentproj b/SuperPolarityContent/SuperPolarityContentContent/SuperPolarityContentContent.contentproj
index 12417a2..12417a2 100644
--- a/Super Polarity Content/Super Polarity ContentContent/Super Polarity ContentContent.contentproj
+++ b/SuperPolarityContent/SuperPolarityContentContent/SuperPolarityContentContent.contentproj
diff --git a/SuperPolarityMac/ActorFactory.cs b/SuperPolarityMac/ActorFactory.cs
new file mode 100644
index 0000000..f9c7697
--- /dev/null
+++ b/SuperPolarityMac/ActorFactory.cs
@@ -0,0 +1,144 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using Microsoft.Xna.Framework;
+using Microsoft.Xna.Framework.Graphics;
+using Microsoft.Xna.Framework.Content;
+
+namespace SuperPolarity
+{
+ static class ActorFactory
+ {
+ static internal SuperPolarity Game;
+
+ static public MainShip CreateMainShip(Vector2 position)
+ {
+ MainShip mainShip = new MainShip(Game);
+ mainShip.Initialize(Game.Content.Load<Texture2D>("Graphics\\main-ship"), position);
+
+ ActorManager.CheckIn(mainShip);
+
+ return mainShip;
+ }
+
+ static public StandardShip CreateShip(Ship.Polarity polarity, Vector2 position)
+ {
+ StandardShip ship = new StandardShip(Game);
+ Texture2D texture;
+
+ if (polarity == Ship.Polarity.Positive)
+ {
+ texture = Game.Content.Load<Texture2D>("Graphics\\positive-ship");
+ }
+ else if (polarity == Ship.Polarity.Negative)
+ {
+ texture = Game.Content.Load<Texture2D>("Graphics\\negative-ship");
+ }
+ else
+ {
+ texture = Game.Content.Load<Texture2D>("Graphics\\neutral-ship");
+ }
+
+ ship.Initialize(texture, position);
+ ship.SetPolarity(polarity);
+
+ ActorManager.CheckIn(ship);
+
+ return ship;
+ }
+
+ internal static void SetGame(SuperPolarity game)
+ {
+ ActorFactory.Game = game;
+ }
+
+ internal static Bullet CreateBullet(Vector2 position, float angle)
+ {
+ Bullet bullet = new Bullet(Game);
+
+ bullet.Initialize(Game.Content.Load<Texture2D>("Graphics\\square"), position);
+
+ bullet.Angle = angle;
+
+ ActorManager.CheckIn(bullet);
+
+ return bullet;
+ }
+
+ static public StandardShip CreateScout(Ship.Polarity polarity, Vector2 position)
+ {
+ StandardShip ship = new StandardShip(Game);
+ Texture2D texture;
+
+ if (polarity == Ship.Polarity.Positive)
+ {
+ texture = Game.Content.Load<Texture2D>("Graphics\\positive-scout");
+ }
+ else if (polarity == Ship.Polarity.Negative)
+ {
+ texture = Game.Content.Load<Texture2D>("Graphics\\negative-scout");
+ }
+ else
+ {
+ texture = Game.Content.Load<Texture2D>("Graphics\\neutral-scout");
+ }
+
+ ship.BoxDimensions.X = 10;
+ ship.BoxDimensions.Y = 10;
+ ship.BoxDimensions.W = 10;
+ ship.BoxDimensions.Z = 10;
+
+ ship.Initialize(texture, position);
+ ship.MaxVelocity = 5.2f;
+ ship.FleeVelocity = 6.5f;
+ ship.ChargeVelocity = 5.5f;
+ ship.Value = 3;
+ ship.HP = 0;
+ ship.AngleChangeProbability = 20;
+ ship.SetPolarity(polarity);
+
+ ActorManager.CheckIn(ship);
+
+ return ship;
+ }
+
+ static public StandardShip CreateCruiser(Ship.Polarity polarity, Vector2 position)
+ {
+ StandardShip ship = new StandardShip(Game);
+ Texture2D texture;
+
+ if (polarity == Ship.Polarity.Positive)
+ {
+ texture = Game.Content.Load<Texture2D>("Graphics\\positive-cruiser");
+ }
+ else if (polarity == Ship.Polarity.Negative)
+ {
+ texture = Game.Content.Load<Texture2D>("Graphics\\negative-cruiser");
+ }
+ else
+ {
+ texture = Game.Content.Load<Texture2D>("Graphics\\neutral-cruiser");
+ }
+
+ ship.BoxDimensions.X = 40;
+ ship.BoxDimensions.Y = 40;
+ ship.BoxDimensions.W = 40;
+ ship.BoxDimensions.Z = 40;
+
+ ship.Initialize(texture, position);
+ ship.MagneticRadius = 1000;
+ ship.RepelRadius = 200;
+ ship.MaxVelocity = 0.5f;
+ ship.FleeVelocity = 5;
+ ship.ChargeVelocity = 1;
+ ship.Value = 10;
+ ship.HP = 29;
+ ship.SetPolarity(polarity);
+
+ ActorManager.CheckIn(ship);
+
+ return ship;
+ }
+ }
+}
diff --git a/SuperPolarityMac/ActorManager.cs b/SuperPolarityMac/ActorManager.cs
new file mode 100644
index 0000000..f5587b9
--- /dev/null
+++ b/SuperPolarityMac/ActorManager.cs
@@ -0,0 +1,160 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using Microsoft.Xna.Framework;
+using Microsoft.Xna.Framework.Graphics;
+
+namespace SuperPolarity
+{
+ static class ActorManager
+ {
+
+ static SuperPolarity Game;
+ static int OutlierBounds;
+ static IList<Actor> Actors;
+
+ static ActorManager()
+ {
+ OutlierBounds = 100;
+ Actors = new List<Actor>();
+ }
+
+ static public void CheckIn(Actor actor)
+ {
+ Actors.Add(actor);
+ }
+
+ static public void CheckOut(Actor actor)
+ {
+ actor.CleanUp();
+ Actors.Remove(actor);
+ actor = null;
+ }
+
+ static public void Update(GameTime gameTime)
+ {
+ CheckActors();
+ CheckOutliers();
+ foreach (Actor actor in Actors)
+ {
+ actor.Update(gameTime);
+ }
+ }
+
+ static public void Draw(SpriteBatch spriteBatch)
+ {
+ foreach (Actor actor in Actors)
+ {
+ actor.Draw(spriteBatch);
+ }
+ }
+
+ static void CheckActors()
+ {
+ for (var i = Actors.Count - 1; i >= 0; i--)
+ {
+ if (i >= Actors.Count) {
+ i = Actors.Count - 1;
+ }
+
+ if (Actors.Count == 0)
+ {
+ return;
+ }
+
+ Actor actor = Actors[i];
+ for (var j = i - 1; j >= 0; j--)
+ {
+ Actor other = Actors[j];
+
+ CheckCollision(actor, other);
+
+ if (actor.GetType().IsSubclassOf(typeof(Ship)) && other.GetType().IsSubclassOf(typeof(Ship)))
+ {
+ CheckMagnetism((Ship)actor, (Ship)other);
+ }
+ }
+ }
+ }
+
+ static void CheckCollision(Actor actor, Actor other)
+ {
+ var collision = Rectangle.Intersect(actor.Box, other.Box);
+ var inverseCollision = Rectangle.Intersect(other.Box, actor.Box);
+ if (!collision.IsEmpty && !actor.Dying && !other.Dying)
+ {
+ actor.Collide(other, collision);
+ other.Collide(actor, inverseCollision);
+ }
+
+ }
+
+ static void CheckMagnetism(Ship actor, Ship other)
+ {
+ if (actor.CurrentPolarity != Ship.Polarity.Neutral && other.CurrentPolarity != Ship.Polarity.Neutral)
+ {
+ var dy = other.Position.Y - actor.Position.Y;
+ var dx = other.Position.X - actor.Position.X;
+ var linearDistance = Math.Sqrt(Math.Pow(dx, 2) + Math.Pow(dy, 2));
+ var angle = (float) Math.Atan2(dy, dx);
+ var otherAngle = (float)Math.Atan2(-dy, -dx);
+
+ if (linearDistance < actor.MagneticRadius || linearDistance < other.MagneticRadius)
+ {
+ actor.Magnetize(other, (float)linearDistance, angle);
+ other.Magnetize(actor, (float)linearDistance, otherAngle);
+ }
+ }
+ }
+
+ static void CheckOutliers()
+ {
+ for (var i = Actors.Count; i > 0; i--)
+ {
+ var actor = Actors[i-1];
+ if (actor.Position.X < -OutlierBounds || actor.Position.Y < -OutlierBounds ||
+ actor.Position.X > Game.GraphicsDevice.Viewport.Width + OutlierBounds ||
+ actor.Position.Y > Game.GraphicsDevice.Viewport.Height + OutlierBounds)
+ {
+ CheckOut(actor);
+ if (actor.Parent != null)
+ {
+ actor.Parent.Children.Remove(actor);
+ }
+ }
+ }
+ }
+
+ static public void Empty()
+ {
+ foreach (Actor actor in Actors) {
+ actor.CleanUp();
+ }
+ Actors.Clear();
+ }
+
+ internal static void SetGame(SuperPolarity game)
+ {
+ Game = game;
+ }
+
+ public static void Bomb()
+ {
+ for (var i = Actors.Count - 1; i >= 0; i--)
+ {
+ var actor = Actors[i];
+ if (actor.GetType() == typeof(StandardShip))
+ {
+ CheckOut(actor);
+ Renderer.CheckOut(actor);
+ }
+ }
+ }
+
+ public static int CountBaddies()
+ {
+ return Actors.Where(a => a.GetType() == typeof(StandardShip)).Count();
+ }
+ }
+}
diff --git a/SuperPolarityMac/BasicGenerator.cs b/SuperPolarityMac/BasicGenerator.cs
new file mode 100644
index 0000000..ba51742
--- /dev/null
+++ b/SuperPolarityMac/BasicGenerator.cs
@@ -0,0 +1,77 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using Microsoft.Xna.Framework;
+
+namespace SuperPolarity
+{
+ class BasicGenerator
+ {
+ public enum Ships : byte { Ship, Scout, Battlecruiser };
+
+ protected Ships ShipType;
+ protected SuperPolarity Game;
+ protected int ScoreThreshold;
+ protected int Rate;
+ protected int CurrentTime;
+ protected Random Randomizer;
+ protected Vector2 Position;
+
+ public void Initialize(SuperPolarity game, Vector2 position, Ships shipType, int rate, int scoreThreshold)
+ {
+ Game = game;
+ ShipType = shipType;
+ ScoreThreshold = scoreThreshold;
+ Rate = rate;
+ Randomizer = new Random();
+ Position = position;
+ CurrentTime = rate;
+ }
+
+ public void Update(GameTime gameTime)
+ {
+ if (ActorManager.CountBaddies() > 50)
+ {
+ return;
+ }
+
+ if (Game.Player.Score >= ScoreThreshold)
+ {
+ CurrentTime = CurrentTime + gameTime.ElapsedGameTime.Milliseconds;
+
+ if (CurrentTime >= Rate)
+ {
+ CurrentTime = 0;
+ Spawn();
+ }
+ }
+ }
+
+ protected void Spawn()
+ {
+ var polarity = Ship.Polarity.Positive;
+
+ if (Randomizer.Next(2) == 1)
+ {
+ polarity = Ship.Polarity.Negative;
+ }
+
+ if (ShipType == Ships.Ship)
+ {
+ Renderer.CheckIn(ActorFactory.CreateShip(polarity, Position));
+ }
+
+ if (ShipType == Ships.Scout)
+ {
+ Renderer.CheckIn(ActorFactory.CreateScout(polarity, Position));
+ }
+
+ if (ShipType == Ships.Battlecruiser)
+ {
+ Renderer.CheckIn(ActorFactory.CreateCruiser(polarity, Position));
+ }
+
+ }
+ }
+}
diff --git a/SuperPolarityMac/Content/logo.png b/SuperPolarityMac/Content/logo.png
deleted file mode 100644
index 701c1b5..0000000
--- a/SuperPolarityMac/Content/logo.png
+++ /dev/null
Binary files differ
diff --git a/SuperPolarityMac/Game1.cs b/SuperPolarityMac/Game1.cs
deleted file mode 100644
index c0756a1..0000000
--- a/SuperPolarityMac/Game1.cs
+++ /dev/null
@@ -1,110 +0,0 @@
-#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/GameScreen.cs b/SuperPolarityMac/GameScreen.cs
new file mode 100644
index 0000000..783e3c1
--- /dev/null
+++ b/SuperPolarityMac/GameScreen.cs
@@ -0,0 +1,209 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using Microsoft.Xna.Framework;
+using Microsoft.Xna.Framework.Graphics;
+using Microsoft.Xna.Framework.Audio;
+using Microsoft.Xna.Framework.Media;
+using Microsoft.Xna.Framework.Input;
+
+namespace SuperPolarity
+{
+ class GameScreen : Screen
+ {
+ public GameScreen(SuperPolarity newGame) : base(newGame) {}
+
+ protected List<BasicGenerator> Generators;
+
+ protected int LivesRate;
+ protected int CurrentLivesRate;
+ protected int BombRate;
+ protected int CurrentBombRate;
+ protected SoundEffect BombSound;
+ protected SoundEffect LifeSound;
+
+ protected bool Flashing;
+
+ protected bool IsPaused;
+ protected Texture2D PauseScreen;
+
+ public override void Initialize()
+ {
+ Generators = new List<BasicGenerator>();
+
+ CurrentBombRate = 1;
+ BombRate = 6000;
+
+ LivesRate = 10000;
+ CurrentLivesRate = 1;
+
+ InputController.RegisterEventForButton("changePolarity", Buttons.A);
+ InputController.RegisterEventForKey("changePolarity", Keys.Z);
+
+ InputController.RegisterEventForButton("shoot", Buttons.X);
+ InputController.RegisterEventForKey("shoot", Keys.X);
+
+ InputController.Bind("pause", HandlePause);
+
+ PauseScreen = Game.Content.Load<Texture2D>("Graphics\\pause-screen");
+ }
+
+ protected void HandlePause(float value)
+ {
+ Console.WriteLine("Paused");
+ IsPaused = !IsPaused;
+
+ if (IsPaused)
+ {
+ MediaPlayer.Volume = 0.05f;
+ }
+ else
+ {
+ MediaPlayer.Volume = 1;
+ }
+ }
+
+ public override void LoadContent()
+ {
+ CreateGenerators();
+
+ Vector2 playerPosition = new Vector2(Game.GraphicsDevice.Viewport.TitleSafeArea.X + Game.GraphicsDevice.Viewport.Width / 2, Game.GraphicsDevice.Viewport.TitleSafeArea.Y + Game.GraphicsDevice.Viewport.TitleSafeArea.Height / 2);
+
+ BombSound = Game.Content.Load<SoundEffect>("Sound\\bomb");
+ LifeSound = Game.Content.Load<SoundEffect>("Sound\\life");
+
+ Renderer.CheckIn(ActorFactory.CreateMainShip(playerPosition));
+
+ Game.PlaySong("game");
+ }
+
+ protected void CalculateBomb()
+ {
+ if (Game.Player.Score >= BombRate * CurrentBombRate)
+ {
+ ActorManager.Bomb();
+ Flashing = true;
+ BombSound.Play();
+ CurrentBombRate = CurrentBombRate + 1;
+ }
+ }
+
+ protected void CalculateLife()
+ {
+ if (Game.Player.Score >= LivesRate * CurrentLivesRate)
+ {
+ Game.Player.Lives = Game.Player.Lives + 1;
+ LifeSound.Play();
+ CurrentLivesRate = CurrentLivesRate + 1;
+ }
+ }
+
+ public override void Update(GameTime gameTime)
+ {
+ CalculateBomb();
+ CalculateLife();
+ InputController.UpdateInput(IsPaused);
+ if (IsPaused)
+ {
+ return;
+ }
+ ActorManager.Update(gameTime);
+
+ foreach (BasicGenerator generator in Generators)
+ {
+ generator.Update(gameTime);
+ }
+ }
+
+ public override void Draw(SpriteBatch spriteBatch)
+ {
+ Renderer.Draw(spriteBatch);
+ Game.Player.Draw(spriteBatch);
+
+ if (IsPaused)
+ {
+ spriteBatch.Draw(PauseScreen, new Vector2(0, 0), Color.White);
+ }
+
+ if (Flashing)
+ {
+ Game.GraphicsDevice.Clear(Color.Black);
+ Flashing = false;
+ }
+ }
+
+ protected void CreateGenerators()
+ {
+ // The basic ship generators.
+ var gen = new BasicGenerator();
+ gen.Initialize(Game, new Vector2(-50, -50), BasicGenerator.Ships.Ship, 3000, 0);
+ Generators.Add(gen);
+
+ gen = new BasicGenerator();
+ gen.Initialize(Game, new Vector2(-50, Game.GraphicsDevice.Viewport.Height + 50), BasicGenerator.Ships.Ship, 3000, 0);
+ Generators.Add(gen);
+
+ gen = new BasicGenerator();
+ gen.Initialize(Game, new Vector2(Game.GraphicsDevice.Viewport.Width + 50, -50), BasicGenerator.Ships.Ship, 3000, 0);
+ Generators.Add(gen);
+
+ gen = new BasicGenerator();
+ gen.Initialize(Game, new Vector2(Game.GraphicsDevice.Viewport.Width + 50, Game.GraphicsDevice.Viewport.Height + 50), BasicGenerator.Ships.Ship, 3000, 0);
+ Generators.Add(gen);
+
+ // After 1.5k liberate some sporadic Scouts, and add two more ship generators.
+ gen = new BasicGenerator();
+ gen.Initialize(Game, new Vector2(Game.GraphicsDevice.Viewport.Width / 2, -50), BasicGenerator.Ships.Ship, 3000, 1500);
+ Generators.Add(gen);
+
+ gen = new BasicGenerator();
+ gen.Initialize(Game, new Vector2(Game.GraphicsDevice.Viewport.Width / 2, Game.GraphicsDevice.Viewport.Height + 50), BasicGenerator.Ships.Ship, 3000, 1500);
+ Generators.Add(gen);
+
+ gen = new BasicGenerator();
+ gen.Initialize(Game, new Vector2(-50, Game.GraphicsDevice.Viewport.Height / 2), BasicGenerator.Ships.Scout, 6000, 1500);
+ Generators.Add(gen);
+
+ gen = new BasicGenerator();
+ gen.Initialize(Game, new Vector2(Game.GraphicsDevice.Viewport.Width + 50, Game.GraphicsDevice.Viewport.Height / 2), BasicGenerator.Ships.Scout, 6000, 1500);
+ Generators.Add(gen);
+
+
+ // After 3k add more scouts.
+ gen = new BasicGenerator();
+ gen.Initialize(Game, new Vector2(Game.GraphicsDevice.Viewport.Width / 2, -50), BasicGenerator.Ships.Scout, 3000, 3000);
+ Generators.Add(gen);
+
+ gen = new BasicGenerator();
+ gen.Initialize(Game, new Vector2(Game.GraphicsDevice.Viewport.Width / 2, Game.GraphicsDevice.Viewport.Height + 50), BasicGenerator.Ships.Scout, 3000, 5000);
+ Generators.Add(gen);
+
+ // After 5k release more ships and a cruiser.
+ gen = new BasicGenerator();
+ gen.Initialize(Game, new Vector2(Game.GraphicsDevice.Viewport.Width / 2, -50), BasicGenerator.Ships.Ship, 1500, 5000);
+ Generators.Add(gen);
+
+ gen = new BasicGenerator();
+ gen.Initialize(Game, new Vector2(Game.GraphicsDevice.Viewport.Width / 2, Game.GraphicsDevice.Viewport.Height + 50), BasicGenerator.Ships.Ship, 1500, 5000);
+ Generators.Add(gen);
+
+ gen = new BasicGenerator();
+ gen.Initialize(Game, new Vector2(-50, Game.GraphicsDevice.Viewport.Height / 2), BasicGenerator.Ships.Battlecruiser, 10000, 5000);
+ Generators.Add(gen);
+
+ gen = new BasicGenerator();
+ gen.Initialize(Game, new Vector2(Game.GraphicsDevice.Viewport.Width + 50, Game.GraphicsDevice.Viewport.Height / 2), BasicGenerator.Ships.Battlecruiser, 10000, 5000);
+ Generators.Add(gen);
+ }
+
+ public override void CleanUp()
+ {
+ base.CleanUp();
+ Generators.Clear();
+ InputController.Unbind("pause", HandlePause);
+ Renderer.Empty();
+ ActorManager.Empty();
+ }
+ }
+}
diff --git a/SuperPolarityMac/Icon.ico b/SuperPolarityMac/Icon.ico
new file mode 100644
index 0000000..13be62a
--- /dev/null
+++ b/SuperPolarityMac/Icon.ico
Binary files differ
diff --git a/SuperPolarityMac/Info.plist b/SuperPolarityMac/Info.plist
deleted file mode 100644
index 07a58c3..0000000
--- a/SuperPolarityMac/Info.plist
+++ /dev/null
@@ -1,17 +0,0 @@
-<?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/InputController.cs b/SuperPolarityMac/InputController.cs
new file mode 100644
index 0000000..c92bb9c
--- /dev/null
+++ b/SuperPolarityMac/InputController.cs
@@ -0,0 +1,248 @@
+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 List<string> BlockedKeys;
+ static List<string> BlockedButtons;
+
+ 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>>>();
+ RegisteredButtons = new Dictionary<string, List<Buttons>>();
+ RegisteredKeys = new Dictionary<string, List<Keys>>();
+ BlockedKeys = new List<string>();
+ BlockedButtons = new List<string>();
+ InputKeyboardState = new KeyboardState();
+ InputGamePadState = new GamePadState();
+ }
+
+ public static void UpdateInput()
+ {
+ DispatchMoveEvents();
+ DispatchRegisteredEvents();
+ }
+
+ public static void UpdateInput(bool highPriorityOnly)
+ {
+ Poll();
+ DispatchPauseEvent();
+ if (!highPriorityOnly)
+ {
+ UpdateInput();
+ }
+ }
+
+ public static void DispatchPauseEvent()
+ {
+ // OK THIS IS ALL KINDS OF WRONG. THIS IS A PLACEHOLDER BECAUSE DEMO!
+ var keyPressed = false;
+ if ((InputKeyboardState.IsKeyDown(Keys.Enter) || InputGamePadState.IsButtonDown(Buttons.Start))) {
+ keyPressed = true;
+ if(!BlockedButtons.Contains("pause") && !BlockedKeys.Contains("pause"))
+ {
+ BlockedButtons.Add("pause");
+ BlockedKeys.Add("pause");
+ Console.WriteLine("Dispatch");
+ Dispatch("pause", 0);
+ }
+ }
+
+ if (!keyPressed)
+ {
+ BlockedButtons.Remove("pause");
+ BlockedKeys.Remove("pause");
+ }
+ }
+
+ private static void Poll()
+ {
+ InputGamePadState = GamePad.GetState(Microsoft.Xna.Framework.PlayerIndex.One);
+ InputKeyboardState = Keyboard.GetState();
+ }
+
+ public static void RegisterEventForKey(string eventName, Keys key)
+ {
+ List<Keys> newKeyList;
+ if (!RegisteredKeys.ContainsKey(eventName))
+ {
+ newKeyList = new List<Keys>();
+ RegisteredKeys.Add(eventName, newKeyList);
+ }
+
+ RegisteredKeys.TryGetValue(eventName, out newKeyList);
+
+ newKeyList.Add(key);
+ }
+
+ public static void RegisterEventForButton(string eventName, Buttons button)
+ {
+ List<Buttons> newButtonList;
+ if (!RegisteredButtons.ContainsKey(eventName))
+ {
+ newButtonList = new List<Buttons>();
+ RegisteredButtons.Add(eventName, newButtonList);
+ }
+
+ RegisteredButtons.TryGetValue(eventName, out newButtonList);
+
+ newButtonList.Add(button);
+ }
+
+ private static void DispatchRegisteredEvents()
+ {
+ var keyFired = false;
+
+ foreach (KeyValuePair<string,List<Keys>> entry in RegisteredKeys) {
+ keyFired = false;
+ foreach (Keys key in entry.Value)
+ {
+ if (InputKeyboardState.IsKeyDown(key))
+ {
+ if (!BlockedKeys.Contains(entry.Key))
+ {
+ BlockedKeys.Add(entry.Key);
+ Dispatch(entry.Key, 1);
+ }
+ keyFired = true;
+ break;
+ }
+ }
+
+ if (!keyFired)
+ {
+ BlockedKeys.Remove(entry.Key);
+ }
+ }
+
+ foreach (KeyValuePair<string, List<Buttons>> entry in RegisteredButtons)
+ {
+ keyFired = false;
+ foreach (Buttons button in entry.Value)
+ {
+ if (InputGamePadState.IsButtonDown(button))
+ {
+ if (!BlockedButtons.Contains(entry.Key))
+ {
+ BlockedButtons.Add(entry.Key);
+ Dispatch(entry.Key, 1);
+ }
+ keyFired = true;
+ break;
+ };
+ }
+
+ if (!keyFired)
+ {
+ BlockedButtons.Remove(entry.Key);
+ }
+ }
+ }
+
+ 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;
+
+ 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 Unbind(string eventName, Action<float> listener)
+ {
+ List<Action<float>> listenerList;
+ bool foundListeners;
+
+ if (!Listeners.ContainsKey(eventName))
+ {
+ return;
+ }
+
+ foundListeners = Listeners.TryGetValue(eventName, out listenerList);
+
+ listenerList.Remove(listener);
+ }
+
+ public static void Dispatch(string eventName, float value)
+ {
+ List<Action<float>> listenerList;
+ bool foundListeners;
+
+ foundListeners = Listeners.TryGetValue(eventName, out listenerList);
+
+ if (!foundListeners)
+ {
+ return;
+ }
+
+ for (var i = listenerList.Count - 1; i >= 0; i--)
+ {
+ listenerList[i](value);
+ }
+ }
+
+ public static void Unlock(string eventName)
+ {
+ BlockedButtons.Remove(eventName);
+ BlockedKeys.Remove(eventName);
+ }
+ }
+}
diff --git a/SuperPolarityMac/LetterChooseWidget.cs b/SuperPolarityMac/LetterChooseWidget.cs
new file mode 100644
index 0000000..e52733f
--- /dev/null
+++ b/SuperPolarityMac/LetterChooseWidget.cs
@@ -0,0 +1,84 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using Microsoft.Xna.Framework;
+using Microsoft.Xna.Framework.Graphics;
+
+namespace SuperPolarity
+{
+ class LetterChooseWidget : Widget
+ {
+ int CurrentChar;
+ bool Locked;
+ int LockRate;
+ int CurrentTime;
+
+ SpriteFont Font;
+
+ public LetterChooseWidget(SuperPolarity game, Vector2 position) : base(game, position)
+ {
+ Active = false;
+ CurrentChar = 65;
+ Font = game.Content.Load<SpriteFont>("Fonts\\bigfont");
+ LockRate = 300;
+ CurrentTime = 0;
+
+ InputController.Bind("moveY", HandleMovement);
+ }
+
+ public void HandleMovement(float value)
+ {
+ if (!Active) { return; }
+
+ if (value > 0.8 && !Locked) {
+ CurrentChar = CurrentChar + 1;
+
+ if (CurrentChar > 90)
+ {
+ CurrentChar = 32;
+ }
+
+ Locked = true;
+ }
+
+ if (value < -0.8 && !Locked) {
+ CurrentChar = CurrentChar - 1;
+
+ if (CurrentChar < 32)
+ {
+ CurrentChar = 90;
+ }
+
+ Locked = true;
+ }
+ }
+
+ public override void Update(GameTime gameTime)
+ {
+ base.Update(gameTime);
+
+ CurrentTime = CurrentTime + gameTime.ElapsedGameTime.Milliseconds;
+ if (CurrentTime > LockRate)
+ {
+ CurrentTime = 0;
+ Locked = false;
+ }
+ }
+
+ public string Value()
+ {
+ return char.ConvertFromUtf32(CurrentChar);
+ }
+
+ public override void Draw(SpriteBatch spriteBatch)
+ {
+ var color = new Color(0, 0, 0, 128);
+ if (Active)
+ {
+ color = new Color(201, 0, 68, 255);
+ }
+ spriteBatch.DrawString(Font, Value(), Position, color);
+ }
+ }
+}
diff --git a/SuperPolarityMac/Main.cs b/SuperPolarityMac/Main.cs
deleted file mode 100644
index f21bf0b..0000000
--- a/SuperPolarityMac/Main.cs
+++ /dev/null
@@ -1,44 +0,0 @@
-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/MenuItem.cs b/SuperPolarityMac/MenuItem.cs
new file mode 100644
index 0000000..8e24c97
--- /dev/null
+++ b/SuperPolarityMac/MenuItem.cs
@@ -0,0 +1,11 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace SuperPolarity
+{
+ class MenuItem
+ {
+ }
+}
diff --git a/SuperPolarityMac/MenuWidget.cs b/SuperPolarityMac/MenuWidget.cs
new file mode 100644
index 0000000..992ef43
--- /dev/null
+++ b/SuperPolarityMac/MenuWidget.cs
@@ -0,0 +1,11 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace SuperPolarity
+{
+ class MenuWidget
+ {
+ }
+}
diff --git a/SuperPolarityMac/NameChooserWidget.cs b/SuperPolarityMac/NameChooserWidget.cs
new file mode 100644
index 0000000..ce7c149
--- /dev/null
+++ b/SuperPolarityMac/NameChooserWidget.cs
@@ -0,0 +1,99 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using Microsoft.Xna.Framework;
+using Microsoft.Xna.Framework.Graphics;
+
+namespace SuperPolarity
+{
+ class NameChooserWidget : Widget
+ {
+ int CurrentIndex;
+ bool Lock;
+ int LockRate;
+ int CurrentTime;
+
+ public NameChooserWidget(SuperPolarity game, Vector2 position)
+ : base(game, position)
+ {
+ AppendChild(new LetterChooseWidget(game, new Vector2(position.X, position.Y)));
+ AppendChild(new LetterChooseWidget(game, new Vector2(position.X + 32, position.Y)));
+ AppendChild(new LetterChooseWidget(game, new Vector2(position.X + 64, position.Y)));
+ CurrentIndex = 0;
+ Children[CurrentIndex].Activate();
+ LockRate = 300;
+ CurrentTime = 0;
+
+ InputController.Bind("moveX", HandleMovement);
+ }
+
+ public override void Update(GameTime gameTime)
+ {
+ base.Update(gameTime);
+
+ CurrentTime = CurrentTime + gameTime.ElapsedGameTime.Milliseconds;
+ if (CurrentTime > LockRate)
+ {
+ CurrentTime = 0;
+ Lock = false;
+ }
+
+ foreach (LetterChooseWidget widget in Children)
+ {
+ widget.Update(gameTime);
+ }
+ }
+
+ public void HandleMovement(float value)
+ {
+ if (value > 0.8 && !Lock)
+ {
+ Children[CurrentIndex].Deactivate();
+ CurrentIndex = CurrentIndex + 1;
+
+ if (CurrentIndex > Children.Count - 1)
+ {
+ CurrentIndex = 0;
+ }
+
+ Lock = true;
+ }
+
+ if (value < -0.8 && !Lock)
+ {
+ Children[CurrentIndex].Deactivate();
+ CurrentIndex = CurrentIndex - 1;
+
+ if (CurrentIndex < 0)
+ {
+ CurrentIndex = Children.Count - 1;
+ }
+
+ Lock = true;
+ }
+
+ Children[CurrentIndex].Activate();
+ }
+
+ public string Value()
+ {
+ var name = "";
+
+ foreach (LetterChooseWidget letter in Children)
+ {
+ name = name + letter.Value();
+ }
+
+ return name;
+ }
+
+ public override void Draw(SpriteBatch spriteBatch)
+ {
+ foreach (LetterChooseWidget widget in Children)
+ {
+ widget.Draw(spriteBatch);
+ }
+ }
+ }
+}
diff --git a/SuperPolarityMac/Particle.cs b/SuperPolarityMac/Particle.cs
new file mode 100644
index 0000000..d65bac6
--- /dev/null
+++ b/SuperPolarityMac/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/SuperPolarityMac/ParticleEffectFactory.cs b/SuperPolarityMac/ParticleEffectFactory.cs
new file mode 100644
index 0000000..0cd9ed3
--- /dev/null
+++ b/SuperPolarityMac/ParticleEffectFactory.cs
@@ -0,0 +1,66 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using Microsoft.Xna.Framework;
+using Microsoft.Xna.Framework.Graphics;
+
+namespace SuperPolarity
+{
+ static class ParticleEffectFactory
+ {
+ static Game Game;
+ static Random random;
+
+ static ParticleEffectFactory()
+ {
+ random = new Random();
+ }
+
+ public static ParticleEngine CreatePolarCircle(Vector2 location)
+ {
+ List<Texture2D> texturesList = new List<Texture2D>();
+
+ //texturesList.Add(Game.Content.Load<Texture2D>("Graphics\\circle"));
+ texturesList.Add(Game.Content.Load<Texture2D>("Graphics\\diamond"));
+ texturesList.Add(Game.Content.Load<Texture2D>("Graphics\\square"));
+
+ ParticleEngine particleEngine = new ParticleEngine(texturesList, location);
+
+ particleEngine.Color = new Color(239, 203, 204);
+ particleEngine.TTL = 10;
+ particleEngine.TTLRandomFactor = 5;
+ particleEngine.ScatterFactor = 40;
+ particleEngine.ParticleCount = 50;
+ particleEngine.StretchFactor = 2.8f;
+
+
+ return particleEngine;
+ }
+
+ public static ParticleEngine CreateBullet(Vector2 location)
+ {
+ List<Texture2D> texturesList = new List<Texture2D>();
+
+ texturesList.Add(Game.Content.Load<Texture2D>("Graphics\\circle"));
+ //texturesList.Add(Game.Content.Load<Texture2D>("Graphics\\diamond"));
+ texturesList.Add(Game.Content.Load<Texture2D>("Graphics\\square"));
+
+ ParticleEngine particleEngine = new ParticleEngine(texturesList, location);
+
+ particleEngine.Color = Color.Gray;
+ particleEngine.TTL = 5;
+ particleEngine.TTLRandomFactor = 5;
+ particleEngine.ScatterFactor = 5;
+ particleEngine.ParticleCount = 10;
+ particleEngine.StretchFactor = 1;
+
+ return particleEngine;
+ }
+
+ internal static void SetGame(Game game)
+ {
+ ParticleEffectFactory.Game = game;
+ }
+ }
+}
diff --git a/SuperPolarityMac/ParticleEngine.cs b/SuperPolarityMac/ParticleEngine.cs
new file mode 100644
index 0000000..51188ae
--- /dev/null
+++ b/SuperPolarityMac/ParticleEngine.cs
@@ -0,0 +1,86 @@
+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; }
+ public Color Color; //TODO: Color list for random colors.
+ public int TTL;
+ public int TTLRandomFactor;
+ public int ScatterFactor;
+ public int ParticleCount;
+ public float StretchFactor;
+ 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();
+ Color = Color.Red;
+ TTL = 20;
+ TTLRandomFactor = 40;
+ StretchFactor = 1;
+ }
+
+ 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 = Color;
+ float size = (float)random.NextDouble() * StretchFactor;
+
+ position.X += random.Next(-ScatterFactor, ScatterFactor);
+ position.Y += random.Next(-ScatterFactor, ScatterFactor);
+
+ int ttl = TTL + random.Next(TTLRandomFactor);
+
+ 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/SuperPolarityMac/Player.cs b/SuperPolarityMac/Player.cs
new file mode 100644
index 0000000..184abdd
--- /dev/null
+++ b/SuperPolarityMac/Player.cs
@@ -0,0 +1,81 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using Microsoft.Xna.Framework;
+using Microsoft.Xna.Framework.Graphics;
+
+namespace SuperPolarity
+{
+ public class Player
+ {
+ public int Score;
+ public int Multiplier;
+ public int Lives;
+
+
+ SpriteFont DebugFont;
+ SuperPolarity Game;
+
+ Texture2D LifeSprite;
+
+ public Player(SuperPolarity game)
+ {
+ Score = 0;
+ Multiplier = 1;
+ Lives = 3;
+ Game = game;
+ DebugFont = Game.Content.Load<SpriteFont>("Fonts\\bigfont");
+ LifeSprite = Game.Content.Load<Texture2D>("Graphics\\neutral-ship");
+ }
+
+ public void AddScore(int value)
+ {
+ Score = Score + (value * Multiplier);
+ }
+
+ public void AddMultiplier(int value)
+ {
+ Multiplier = Multiplier + 1;
+ }
+
+ public void ResetMultiplier()
+ {
+ Multiplier = 1;
+ }
+
+ public void Draw(SpriteBatch spriteBatch)
+ {
+ var UiColor = new Color(0, 0, 0, 200);
+ var lightColor = new Color(0, 0, 0, 128);
+ spriteBatch.DrawString(DebugFont, Score.ToString(), new Vector2(40, 30), UiColor);
+ spriteBatch.DrawString(DebugFont, "x" + Multiplier.ToString(), new Vector2(40, 50), lightColor);
+
+ var lifePosition = new Vector2(Game.GraphicsDevice.Viewport.Width - 140, 30);
+ if (Lives > 4)
+ {
+ spriteBatch.Draw(LifeSprite, lifePosition, null, UiColor, (float)(Math.PI / 2), Vector2.Zero, 0.5f, SpriteEffects.None, 0f);
+ spriteBatch.DrawString(DebugFont, "x " + Lives.ToString(), new Vector2(lifePosition.X + 8, lifePosition.Y + 5), UiColor);
+ }
+ else
+ {
+ for (var i = 0; i < Lives; i++)
+ {
+ spriteBatch.Draw(LifeSprite, new Vector2(lifePosition.X + (i * 28), lifePosition.Y), null, UiColor, (float)(Math.PI / 2), Vector2.Zero, 0.5f, SpriteEffects.None, 0f);
+ }
+ }
+ }
+
+ public void Update()
+ {
+
+ }
+
+ public void Reset()
+ {
+ Score = 0;
+ Multiplier = 1;
+ Lives = 3;
+ }
+ }
+}
diff --git a/SuperPolarityMac/Program.cs b/SuperPolarityMac/Program.cs
new file mode 100644
index 0000000..6c3f614
--- /dev/null
+++ b/SuperPolarityMac/Program.cs
@@ -0,0 +1,26 @@
+#region Using Statements
+using System;
+using System.Collections.Generic;
+using System.Linq;
+#endregion
+
+namespace SuperPolarity
+{
+#if WINDOWS || LINUX
+ /// <summary>
+ /// The main class.
+ /// </summary>
+ public static class Program
+ {
+ /// <summary>
+ /// The main entry point for the application.
+ /// </summary>
+ [STAThread]
+ static void Main()
+ {
+ using (var superPolarity = new SuperPolarity())
+ superPolarity.Run();
+ }
+ }
+#endif
+}
diff --git a/SuperPolarityMac/Properties/AssemblyInfo.cs b/SuperPolarityMac/Properties/AssemblyInfo.cs
deleted file mode 100644
index d61ed27..0000000
--- a/SuperPolarityMac/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,27 +0,0 @@
-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/Renderer.cs b/SuperPolarityMac/Renderer.cs
new file mode 100644
index 0000000..7ca8158
--- /dev/null
+++ b/SuperPolarityMac/Renderer.cs
@@ -0,0 +1,42 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using Microsoft.Xna.Framework.Graphics;
+
+namespace SuperPolarity
+{
+ class Renderer
+ {
+
+ static List<Actor> Actors;
+
+ static Renderer()
+ {
+ Actors = new List<Actor>();
+ }
+
+ static public void CheckIn(Actor actor)
+ {
+ Actors.Add(actor);
+ }
+
+ static public void CheckOut(Actor actor)
+ {
+ Actors.Remove(actor);
+ }
+
+ static public void Draw(SpriteBatch spriteBatch)
+ {
+ foreach (Actor actor in Actors)
+ {
+ actor.Draw(spriteBatch);
+ }
+ }
+
+ static public void Empty()
+ {
+ Actors.Clear();
+ }
+ }
+}
diff --git a/SuperPolarityMac/ScoreScreen.cs b/SuperPolarityMac/ScoreScreen.cs
new file mode 100644
index 0000000..bf43275
--- /dev/null
+++ b/SuperPolarityMac/ScoreScreen.cs
@@ -0,0 +1,108 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.IO;
+using Microsoft.Xna.Framework;
+using Microsoft.Xna.Framework.Graphics;
+using Microsoft.Xna.Framework.Input;
+
+namespace SuperPolarity
+{
+ class ScoreScreen : Screen
+ {
+ protected SpriteFont Font;
+ protected NameChooserWidget nameChooser;
+ protected Dictionary<string, int> Scores;
+
+ public ScoreScreen(SuperPolarity newGame) : base(newGame) { }
+
+ public override void Initialize()
+ {
+ base.Initialize();
+ nameChooser = new NameChooserWidget(Game, new Vector2(40, Game.GraphicsDevice.Viewport.Height / 4));
+ InputController.RegisterEventForButton("OK", Buttons.A);
+ InputController.RegisterEventForKey("OK", Keys.Z);
+ Scores = new Dictionary<string, int>();
+ ReadScore();
+ }
+
+ public override void LoadContent()
+ {
+ base.LoadContent();
+ Font = Game.Content.Load<SpriteFont>("Fonts\\bigfont");
+ InputController.Bind("OK", HandleNext);
+ }
+
+ public void HandleNext(float value)
+ {
+ if (!Active) { return; }
+ WriteScore();
+ ScreenManager.Pop();
+ }
+
+ public void WriteScore()
+ {
+ using (StreamWriter swriter = new StreamWriter("scores.txt", true))
+ {
+ swriter.WriteLine(nameChooser.Value() + "," + Game.Player.Score.ToString());
+ }
+ }
+
+ public void ReadScore()
+ {
+ try
+ {
+ using (StreamReader sreader = new StreamReader("scores.txt"))
+ {
+ string line = null;
+ while ((line = sreader.ReadLine()) != null)
+ {
+ string[] parts = line.Split(',');
+ Scores.Add(parts[0], int.Parse(parts[1]));
+ }
+ }
+ }
+ catch (FileNotFoundException)
+ {
+ }
+ }
+
+ public override void CleanUp()
+ {
+ base.CleanUp();
+ Font = null;
+ }
+
+ public override void Draw(SpriteBatch spriteBatch)
+ {
+ base.Draw(spriteBatch);
+ spriteBatch.DrawString(Font, "YOUR SCORE WAS: " + Game.Player.Score.ToString(), new Vector2(40, Game.GraphicsDevice.Viewport.Height / 2), Color.Black);
+ spriteBatch.DrawString(Font, "Use Left Stick or Arrows to Choose Name Press A when done", new Vector2(40, Game.GraphicsDevice.Viewport.Height / 2 + 40), new Color(0, 0, 0, 128));
+ nameChooser.Draw(spriteBatch);
+ DrawScores(spriteBatch);
+ }
+
+ public override void Update(GameTime gameTime)
+ {
+ base.Update(gameTime);
+ InputController.UpdateInput(false);
+ nameChooser.Update(gameTime);
+ }
+
+ protected void DrawScores(SpriteBatch spriteBatch)
+ {
+ var sortedDict = (from entry in Scores orderby entry.Value descending select entry)
+ .Take(5)
+ .ToDictionary(pair => pair.Key, pair => pair.Value);
+
+ var i = 0;
+
+ foreach (KeyValuePair<string, int> entry in sortedDict) {
+ i++;
+ spriteBatch.DrawString(Font, entry.Key + " " + entry.Value, new Vector2(40, Game.GraphicsDevice.Viewport.Height / 2 + 100 + (32 * i)), new Color(0, 0, 0, 64));
+ }
+
+ }
+ }
+}
diff --git a/SuperPolarityMac/Screen.cs b/SuperPolarityMac/Screen.cs
new file mode 100644
index 0000000..006b047
--- /dev/null
+++ b/SuperPolarityMac/Screen.cs
@@ -0,0 +1,40 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using Microsoft.Xna.Framework;
+using Microsoft.Xna.Framework.Graphics;
+
+namespace SuperPolarity
+{
+ class Screen
+ {
+ protected SuperPolarity Game;
+ public bool Active;
+ public Screen(SuperPolarity game)
+ {
+ Active = false;
+ Game = game;
+ }
+
+ public virtual void Update(GameTime gameTime)
+ {
+ }
+
+ public virtual void Draw(SpriteBatch spriteBatch)
+ {
+ }
+
+ public virtual void LoadContent()
+ {
+ }
+
+ public virtual void Initialize()
+ {
+ }
+
+ public virtual void CleanUp()
+ {
+ }
+ }
+}
diff --git a/SuperPolarityMac/ScreenManager.cs b/SuperPolarityMac/ScreenManager.cs
new file mode 100644
index 0000000..b88741b
--- /dev/null
+++ b/SuperPolarityMac/ScreenManager.cs
@@ -0,0 +1,55 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using Microsoft.Xna.Framework;
+using Microsoft.Xna.Framework.Graphics;
+
+namespace SuperPolarity
+{
+ static class ScreenManager
+ {
+ static Stack<Screen> Screens;
+ static SuperPolarity Game;
+
+ static ScreenManager()
+ {
+ Screens = new Stack<Screen>();
+ }
+
+ static public void Push(Screen screen)
+ {
+ if (Screens.Count > 0)
+ {
+ Screens.Peek().Active = false;
+ }
+
+ screen.LoadContent();
+ screen.Active = true;
+ Screens.Push(screen);
+ }
+
+ static public void Pop()
+ {
+ var screen = Screens.Pop();
+ screen.Active = false;
+ screen.CleanUp();
+ Screens.Peek().Active = true;
+ }
+
+ static public void Update(GameTime gameTime)
+ {
+ Screens.Peek().Update(gameTime);
+ }
+
+ static public void Draw(SpriteBatch spriteBatch)
+ {
+ Screens.Peek().Draw(spriteBatch);
+ }
+
+ internal static void SetGame(SuperPolarity game)
+ {
+ Game = game;
+ }
+ }
+}
diff --git a/SuperPolarityMac/SuperPolarity.cs b/SuperPolarityMac/SuperPolarity.cs
new file mode 100644
index 0000000..9311d53
--- /dev/null
+++ b/SuperPolarityMac/SuperPolarity.cs
@@ -0,0 +1,161 @@
+#region Using Statements
+using System;
+using System.Collections.Generic;
+using Microsoft.Xna.Framework;
+using Microsoft.Xna.Framework.Content;
+using Microsoft.Xna.Framework.Graphics;
+using Microsoft.Xna.Framework.Input;
+using Microsoft.Xna.Framework.Storage;
+using Microsoft.Xna.Framework.GamerServices;
+using Microsoft.Xna.Framework.Media;
+using Microsoft.Xna.Framework.Audio;
+using SuperPolarity;
+#endregion
+
+namespace SuperPolarity
+{
+ /// <summary>
+ /// This is the main type for your game
+ /// </summary>
+ public class SuperPolarity : Game
+ {
+ public GraphicsDeviceManager graphics;
+ SpriteBatch spriteBatch;
+
+ public static int OutlierBounds;
+
+ public Player Player;
+
+ Screen EntryScreen;
+
+ protected Song TitleSong;
+ protected Song GameSong;
+ protected SoundEffect GameOverSound;
+
+ public SuperPolarity()
+ : base()
+ {
+ graphics = new GraphicsDeviceManager(this);
+ Components.Add(new GamerServicesComponent(this));
+
+ graphics.PreferMultiSampling = true;
+ graphics.PreferredBackBufferWidth = 1280;
+ graphics.PreferredBackBufferHeight = 720;
+ graphics.ToggleFullScreen();
+
+ Content.RootDirectory = "Content";
+ ActorFactory.SetGame(this);
+ ParticleEffectFactory.SetGame(this);
+ ActorManager.SetGame(this);
+ ScreenManager.SetGame(this);
+
+ EntryScreen = (Screen)new TitleScreen(this);
+ }
+
+ /// <summary>
+ /// Allows the game to perform any initialization it needs to before starting to run.
+ /// This is where it can query for any required services and load any non-graphic
+ /// related content. Calling base.Initialize will enumerate through any components
+ /// and initialize them as well.
+ /// </summary>
+ protected override void Initialize()
+ {
+ base.Initialize();
+
+ InputController.RegisterEventForKey("fullScreenToggle", Keys.F11);
+ InputController.Bind("fullScreenToggle", HandleFullScreenToggle);
+
+ EntryScreen.Initialize();
+
+ OutlierBounds = 100;
+ }
+
+ protected void HandleFullScreenToggle(float value)
+ {
+ graphics.ToggleFullScreen();
+ graphics.ApplyChanges();
+ }
+
+ /// <summary>
+ /// LoadContent will be called once per game and is the place to load
+ /// all of your content.
+ /// </summary>
+ protected override void LoadContent()
+ {
+
+ MediaPlayer.IsRepeating = true;
+ GameSong = Content.Load<Song>("Sound\\polaritytheme.wav");
+ GameOverSound = Content.Load<SoundEffect>("Sound\\gameover");
+
+ // Create a new SpriteBatch, which can be used to draw textures.
+ spriteBatch = new SpriteBatch(GraphicsDevice);
+
+ ScreenManager.Push(EntryScreen);
+
+ Player = new Player(this);
+ }
+
+ /// <summary>
+ /// UnloadContent will be called once per game and is the place to unload
+ /// all content.
+ /// </summary>
+ protected override void UnloadContent()
+ {
+ // TODO: Unload any non ContentManager content here
+ }
+
+ /// <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)
+ {
+ if (GamePad.GetState(PlayerIndex.One).Buttons.Back == ButtonState.Pressed || Keyboard.GetState().IsKeyDown(Keys.Escape))
+ Exit();
+
+ ScreenManager.Update(gameTime);
+
+ Player.Update();
+
+ 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)
+ {
+ GraphicsDevice.Clear(Color.White);
+
+ spriteBatch.Begin();
+
+ ScreenManager.Draw(spriteBatch);
+
+ spriteBatch.End();
+
+ base.Draw(gameTime);
+ }
+
+ public void PlaySong(string songName)
+ {
+ // temp stuff before media manager is in
+ if (songName == "game")
+ {
+ MediaPlayer.Play(GameSong);
+ }
+ }
+
+ public void GameOver()
+ {
+ var scoreScreen = new ScoreScreen(this);
+ scoreScreen.Initialize();
+
+ MediaPlayer.Stop();
+ GameOverSound.Play();
+ ScreenManager.Pop();
+ ScreenManager.Push(scoreScreen);
+ }
+ }
+}
diff --git a/SuperPolarityMac/TitleScreen.cs b/SuperPolarityMac/TitleScreen.cs
new file mode 100644
index 0000000..a953f27
--- /dev/null
+++ b/SuperPolarityMac/TitleScreen.cs
@@ -0,0 +1,50 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using Microsoft.Xna.Framework;
+using Microsoft.Xna.Framework.Graphics;
+
+namespace SuperPolarity
+{
+ class TitleScreen : Screen
+ {
+ protected Texture2D TitleImage;
+
+ public TitleScreen(SuperPolarity newGame) : base(newGame) {}
+
+ public override void LoadContent()
+ {
+ base.LoadContent();
+ TitleImage = Game.Content.Load<Texture2D>("Graphics\\polaritydemotitle");
+ InputController.Bind("pause", HandleStart);
+ }
+
+ public void HandleStart(float value)
+ {
+ if (!Active) { return; }
+ Game.Player.Reset();
+ var gameScreen = new GameScreen(Game);
+ gameScreen.Initialize();
+ ScreenManager.Push(gameScreen);
+ }
+
+ public override void CleanUp()
+ {
+ base.CleanUp();
+ TitleImage = null;
+ }
+
+ public override void Draw(SpriteBatch spriteBatch)
+ {
+ base.Draw(spriteBatch);
+ spriteBatch.Draw(TitleImage, new Vector2(0, 0), Color.White);
+ }
+
+ public override void Update(GameTime gameTime)
+ {
+ base.Update(gameTime);
+ InputController.UpdateInput(false);
+ }
+ }
+}
diff --git a/SuperPolarityMac/Widget.cs b/SuperPolarityMac/Widget.cs
new file mode 100644
index 0000000..ea92cfd
--- /dev/null
+++ b/SuperPolarityMac/Widget.cs
@@ -0,0 +1,92 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using Microsoft.Xna.Framework;
+using Microsoft.Xna.Framework.Graphics;
+
+namespace SuperPolarity
+{
+ class Widget
+ {
+ public List<Widget> Children;
+ public Dictionary<string, List<Action<float>>> Listeners;
+
+ public Vector2 Position;
+ public SuperPolarity Game;
+
+ protected bool Active;
+
+ public Widget(SuperPolarity game, Vector2 position)
+ {
+ Game = game;
+ Position = position;
+ Active = false;
+ Children = new List<Widget>();
+ Listeners = new Dictionary<string, List<Action<float>>>();
+ }
+
+ public void Activate()
+ {
+ Active = true;
+ }
+
+ public void Deactivate()
+ {
+ Active = false;
+ }
+
+ public virtual void AppendChild(Widget widget)
+ {
+ Children.Add(widget);
+ }
+
+ public virtual void Bind(string eventName, Action<float> eventListener)
+ {
+ 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(eventListener);
+ }
+
+ public virtual void Unbind(string eventName, Action<float> eventListener)
+ {
+ // NOT YET IMPLEMENTED;
+ }
+
+ public virtual 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);
+ }
+ }
+
+ public virtual void Update(GameTime gameTime)
+ {
+ }
+
+ public virtual void Draw(SpriteBatch spriteBatch)
+ {
+ }
+ }
+}
diff --git a/SuperPolarityMac/neutral-supercruiser.xnb b/SuperPolarityMac/neutral-supercruiser.xnb
new file mode 100644
index 0000000..1389842
--- /dev/null
+++ b/SuperPolarityMac/neutral-supercruiser.xnb
Binary files differ