diff --git a/Human_vs_Zombies/DINk.ttf b/Human_vs_Zombies/DINk.ttf new file mode 100755 index 0000000..c132966 Binary files /dev/null and b/Human_vs_Zombies/DINk.ttf differ diff --git a/Human_vs_Zombies/Human_vs_Zombies/GameElements/GameWorld.cs b/Human_vs_Zombies/Human_vs_Zombies/GameElements/GameWorld.cs index cc84af0..43a24bb 100644 --- a/Human_vs_Zombies/Human_vs_Zombies/GameElements/GameWorld.cs +++ b/Human_vs_Zombies/Human_vs_Zombies/GameElements/GameWorld.cs @@ -84,6 +84,7 @@ protected override void LoadContent() TextureStatic.Load("Wall", @"Art\Wall"); TextureStatic.Load("Shadow", @"Art\Shadow"); TextureStatic.Load("Ammo", @"Art\Ammo"); + TextureStatic.Load("MenuBackground", @"Art\MenuBackground"); audio = new AudioManager(this); diff --git a/Human_vs_Zombies/Human_vs_Zombies/GameElements/Settings.cs b/Human_vs_Zombies/Human_vs_Zombies/GameElements/Settings.cs index 896a28e..877b7b5 100644 --- a/Human_vs_Zombies/Human_vs_Zombies/GameElements/Settings.cs +++ b/Human_vs_Zombies/Human_vs_Zombies/GameElements/Settings.cs @@ -55,8 +55,8 @@ public static class Settings public static float itemWarningTime { get { return 5; } } public static float itemBlinkRate { get { return .5f; } } - - public static int itemMax { get { return 20; } } + + public static int itemMax { get { return 20; } } public static int itemAmmo { get { return 10; } } } diff --git a/Human_vs_Zombies/Human_vs_Zombies/HvZClasses/HvZWorld.cs b/Human_vs_Zombies/Human_vs_Zombies/HvZClasses/HvZWorld.cs index fbe34e6..02a247c 100644 --- a/Human_vs_Zombies/Human_vs_Zombies/HvZClasses/HvZWorld.cs +++ b/Human_vs_Zombies/Human_vs_Zombies/HvZClasses/HvZWorld.cs @@ -200,10 +200,7 @@ public void Update(float dTime) { this.SpawnZombie(); } - if (this.numItems < Settings.itemMax) - { - this.SpawnItem(); - } + this.SpawnItem(); zombieCountdown = Settings.zombieTimer; } @@ -266,14 +263,24 @@ public void Draw() Drawer.DrawString( "Ammo: " + this.m_Player.GetAmmo(), + new Vector2(20, Settings.worldHeight-2*(Drawer.font.MeasureString("Ammo").Y)), + Color.Red, + 0f, new Vector2(0, 0), + 2f, + SpriteEffects.None, + 1f); + + String scoreString = "Score: " + this.m_Player.GetAmmo(); // OWEN: REPLACE THIS WITH GET SCORE!!!! + Drawer.DrawString( + scoreString, + new Vector2(Settings.worldWidth-2*(Drawer.font.MeasureString(scoreString).X)-20, Settings.worldHeight - 2*(Drawer.font.MeasureString("Ammo").Y)), Color.Red, 0f, new Vector2(0, 0), - 4f, + 2f, SpriteEffects.None, 1f); - foreach (Entity e in m_Entities.Values) { diff --git a/Human_vs_Zombies/Human_vs_Zombies/Screens/GameOverScreen.cs b/Human_vs_Zombies/Human_vs_Zombies/Screens/GameOverScreen.cs index f7b55f5..462449d 100644 --- a/Human_vs_Zombies/Human_vs_Zombies/Screens/GameOverScreen.cs +++ b/Human_vs_Zombies/Human_vs_Zombies/Screens/GameOverScreen.cs @@ -79,7 +79,7 @@ public override void Draw() TextureStatic.Get("background"), Drawer.FullScreenRectangle, null, - Color.White, + Color.Black, 0f, Vector2.Zero, SpriteEffects.None, @@ -91,7 +91,7 @@ public override void Draw() Color.Red, 0f, this.textDrawOrigin, - 4f, + 2f, SpriteEffects.None, 1f); diff --git a/Human_vs_Zombies/Human_vs_Zombies/Screens/StartScreen.cs b/Human_vs_Zombies/Human_vs_Zombies/Screens/StartScreen.cs index 0680cba..3f6164c 100644 --- a/Human_vs_Zombies/Human_vs_Zombies/Screens/StartScreen.cs +++ b/Human_vs_Zombies/Human_vs_Zombies/Screens/StartScreen.cs @@ -46,16 +46,16 @@ public StartScreen() { // Note: Do not use GameClock, it will be paused! this.initialTime = DateTime.Now.Ticks; - this.menu = new StartMenu( - new Vector2(1000, 330), + this.menu = new StartMenu( + new Vector2(Settings.worldWidth / 2, 1000 * Drawer.GetRatio()), new MenuAction[] { new MenuAction(ActionType.GoBack, new StartGameDelegate()), }, 75f); - this.textDrawPosition = new Vector2(Settings.worldWidth / 2, 200); - this.textDrawOrigin = Drawer.font.MeasureString("HUMAN VS ZOMBIES") / 2f; + this.textDrawPosition = new Vector2(Settings.worldWidth / 2, 700*Drawer.GetRatio()); + this.textDrawOrigin = Drawer.font.MeasureString("Human Vs. Zombies") / 2f; } /// @@ -74,10 +74,10 @@ public override void Update(float dTime) /// public override void Draw() { - + int offset = (int)(initialTime - DateTime.Now.Ticks)/5000000; Drawer.Draw( - TextureStatic.Get("background"), - Drawer.FullScreenRectangle, + TextureStatic.Get("MenuBackground"), + new Rectangle(Math.Min(offset,300), 0, TextureStatic.Get("MenuBackground").Width, TextureStatic.Get("MenuBackground").Height), null, Color.White, 0f, @@ -86,7 +86,7 @@ public override void Draw() 0f); Drawer.DrawString( - "HUMAN VS ZOMBIES", + "HUMAN VS. ZOMBIES", this.textDrawPosition, Color.Red, 0f, diff --git a/Human_vs_Zombies/Human_vs_ZombiesContent/Art/MenuBackground.jpg b/Human_vs_Zombies/Human_vs_ZombiesContent/Art/MenuBackground.jpg new file mode 100755 index 0000000..1bbeb92 Binary files /dev/null and b/Human_vs_Zombies/Human_vs_ZombiesContent/Art/MenuBackground.jpg differ diff --git a/Human_vs_Zombies/Human_vs_ZombiesContent/Fonts/HvZ.spritefont b/Human_vs_Zombies/Human_vs_ZombiesContent/Fonts/HvZ.spritefont index ac92e43..b3d88bd 100755 --- a/Human_vs_Zombies/Human_vs_ZombiesContent/Fonts/HvZ.spritefont +++ b/Human_vs_Zombies/Human_vs_ZombiesContent/Fonts/HvZ.spritefont @@ -1,8 +1,8 @@ - Kootenay - 14 + Dink + 24 0 true diff --git a/Human_vs_Zombies/Human_vs_ZombiesContent/Human_vs_ZombiesContent.contentproj b/Human_vs_Zombies/Human_vs_ZombiesContent/Human_vs_ZombiesContent.contentproj index 60140fd..2100d1d 100644 --- a/Human_vs_Zombies/Human_vs_ZombiesContent/Human_vs_ZombiesContent.contentproj +++ b/Human_vs_Zombies/Human_vs_ZombiesContent/Human_vs_ZombiesContent.contentproj @@ -120,6 +120,13 @@ SongProcessor + + + MenuBackground + TextureImporter + TextureProcessor + +