From 097781e6ad3f7bb1c13c16ff7b6bb7219764fb29 Mon Sep 17 00:00:00 2001 From: Ben Beltran Date: Fri, 22 Nov 2013 06:53:08 -0600 Subject: Stuffffffff --- Super Polarity/BasicGenerator.cs | 71 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 Super Polarity/BasicGenerator.cs (limited to 'Super Polarity/BasicGenerator.cs') diff --git a/Super Polarity/BasicGenerator.cs b/Super Polarity/BasicGenerator.cs new file mode 100644 index 0000000..7cc4544 --- /dev/null +++ b/Super Polarity/BasicGenerator.cs @@ -0,0 +1,71 @@ +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; + } + + public void Update(GameTime gameTime) + { + 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) + { + ActorFactory.CreateShip(polarity, Position); + } + + if (ShipType == Ships.Scout) + { + ActorFactory.CreateScout(polarity, Position); + } + + if (ShipType == Ships.Battlecruiser) + { + ActorFactory.CreateCruiser(polarity, Position); + } + + } + } +} -- cgit From b587e9d8e0cc5eb1edf972fd3b644704441e5289 Mon Sep 17 00:00:00 2001 From: Ben Beltran Date: Sat, 23 Nov 2013 13:54:16 -0600 Subject: Protoshow sprint. --- .../Fonts/bigfont.png | Bin 0 -> 18385 bytes .../Fonts/smallfont.png | Bin 0 -> 8490 bytes .../Graphics/pause-screen.png | Bin 0 -> 34294 bytes .../Graphics/polaritydemotitle.png | Bin 0 -> 16528 bytes .../Sound/polaritytheme.wav | Bin 0 -> 48384044 bytes .../Super Polarity ContentContent.contentproj | 32 +++- Super Polarity.suo | Bin 58880 -> 58880 bytes Super Polarity/ActorFactory.cs | 11 +- Super Polarity/ActorManager.cs | 38 +++++ Super Polarity/Actors/Actor.cs | 20 ++- Super Polarity/Actors/Bullet.cs | 6 + Super Polarity/Actors/MainShip.cs | 102 ++++++++---- Super Polarity/Actors/Ship.cs | 2 +- Super Polarity/BasicGenerator.cs | 14 +- Super Polarity/Content/Fonts/bigfont.xnb | Bin 0 -> 115931 bytes Super Polarity/Content/Fonts/smallfont.xnb | Bin 0 -> 50395 bytes Super Polarity/Content/Graphics/pause-screen.xnb | Bin 0 -> 3686587 bytes .../Content/Graphics/polaritydemotitle.xnb | Bin 0 -> 3686587 bytes Super Polarity/Content/Sound/bomb.wav | Bin 0 -> 403244 bytes Super Polarity/Content/Sound/bullet.wav | Bin 0 -> 201644 bytes Super Polarity/Content/Sound/gameover.wav | Bin 0 -> 1612844 bytes Super Polarity/Content/Sound/hit.wav | Bin 0 -> 403244 bytes Super Polarity/Content/Sound/life.wav | Bin 0 -> 403244 bytes Super Polarity/Content/Sound/polaritychange.wav | Bin 0 -> 403244 bytes Super Polarity/Content/Sound/polaritytheme.wav | Bin 0 -> 48384044 bytes Super Polarity/GameScreen.cs | 178 +++++++++++++++++++-- Super Polarity/InputController.cs | 52 +++++- Super Polarity/Player.cs | 39 ++++- Super Polarity/Renderer.cs | 5 + Super Polarity/Screen.cs | 2 + Super Polarity/ScreenManager.cs | 17 +- Super Polarity/Super Polarity.csproj | 37 ++++- Super Polarity/SuperPolarity.cs | 41 +++-- Super Polarity/TitleScreen.cs | 38 +++++ .../bin/WindowsGL/Debug/Super Polarity.exe | Bin 62976 -> 68096 bytes .../bin/WindowsGL/Debug/Super Polarity.pdb | Bin 116224 -> 130560 bytes .../DesignTimeResolveAssemblyReferencesInput.cache | Bin 8367 -> 9636 bytes .../Super Polarity.csproj.FileListAbsolute.txt | 11 ++ Super Polarity/obj/x86/Debug/Super Polarity.exe | Bin 62976 -> 68096 bytes Super Polarity/obj/x86/Debug/Super Polarity.pdb | Bin 116224 -> 130560 bytes 40 files changed, 564 insertions(+), 81 deletions(-) create mode 100644 Super Polarity Content/Super Polarity ContentContent/Fonts/bigfont.png create mode 100644 Super Polarity Content/Super Polarity ContentContent/Fonts/smallfont.png create mode 100644 Super Polarity Content/Super Polarity ContentContent/Graphics/pause-screen.png create mode 100644 Super Polarity Content/Super Polarity ContentContent/Graphics/polaritydemotitle.png create mode 100644 Super Polarity Content/Super Polarity ContentContent/Sound/polaritytheme.wav create mode 100644 Super Polarity/Content/Fonts/bigfont.xnb create mode 100644 Super Polarity/Content/Fonts/smallfont.xnb create mode 100644 Super Polarity/Content/Graphics/pause-screen.xnb create mode 100644 Super Polarity/Content/Graphics/polaritydemotitle.xnb create mode 100644 Super Polarity/Content/Sound/bomb.wav create mode 100644 Super Polarity/Content/Sound/bullet.wav create mode 100644 Super Polarity/Content/Sound/gameover.wav create mode 100644 Super Polarity/Content/Sound/hit.wav create mode 100644 Super Polarity/Content/Sound/life.wav create mode 100644 Super Polarity/Content/Sound/polaritychange.wav create mode 100644 Super Polarity/Content/Sound/polaritytheme.wav (limited to 'Super Polarity/BasicGenerator.cs') diff --git a/Super Polarity Content/Super Polarity ContentContent/Fonts/bigfont.png b/Super Polarity Content/Super Polarity ContentContent/Fonts/bigfont.png new file mode 100644 index 0000000..67307dd Binary files /dev/null and b/Super Polarity Content/Super Polarity ContentContent/Fonts/bigfont.png differ diff --git a/Super Polarity Content/Super Polarity ContentContent/Fonts/smallfont.png b/Super Polarity Content/Super Polarity ContentContent/Fonts/smallfont.png new file mode 100644 index 0000000..51a2c14 Binary files /dev/null and b/Super Polarity Content/Super Polarity ContentContent/Fonts/smallfont.png differ diff --git a/Super Polarity Content/Super Polarity ContentContent/Graphics/pause-screen.png b/Super Polarity Content/Super Polarity ContentContent/Graphics/pause-screen.png new file mode 100644 index 0000000..0d6db73 Binary files /dev/null and b/Super Polarity Content/Super Polarity ContentContent/Graphics/pause-screen.png differ diff --git a/Super Polarity Content/Super Polarity ContentContent/Graphics/polaritydemotitle.png b/Super Polarity Content/Super Polarity ContentContent/Graphics/polaritydemotitle.png new file mode 100644 index 0000000..10a9b92 Binary files /dev/null and b/Super Polarity Content/Super Polarity ContentContent/Graphics/polaritydemotitle.png differ diff --git a/Super Polarity Content/Super Polarity ContentContent/Sound/polaritytheme.wav b/Super Polarity Content/Super Polarity ContentContent/Sound/polaritytheme.wav new file mode 100644 index 0000000..28a6bce Binary files /dev/null and b/Super Polarity Content/Super Polarity ContentContent/Sound/polaritytheme.wav differ diff --git a/Super Polarity Content/Super Polarity ContentContent/Super Polarity ContentContent.contentproj b/Super Polarity Content/Super Polarity ContentContent/Super Polarity ContentContent.contentproj index 2b327e7..12417a2 100644 --- a/Super Polarity Content/Super Polarity ContentContent/Super Polarity ContentContent.contentproj +++ b/Super Polarity Content/Super Polarity ContentContent/Super Polarity ContentContent.contentproj @@ -110,7 +110,11 @@ - + + pause-screen + TextureImporter + TextureProcessor + @@ -150,6 +154,32 @@ FontDescriptionProcessor + + + polaritytheme + WavImporter + SongProcessor + + + + + polaritydemotitle + TextureImporter + TextureProcessor + + + + + bigfont + TextureImporter + FontTextureProcessor + + + smallfont + TextureImporter + FontTextureProcessor + +