Browse files

Merge branch 'master' of git://github.com/ted27/Human_vs_Zombies

  • Loading branch information...
2 parents e0218f0 + 466abe0 commit 6f1ce8ab5417eb21b05b589cdb6ad43f2a85c018 Owen Bell committed Mar 3, 2011
View
BIN Human_vs_Zombies/DINk.ttf
Binary file not shown.
View
1 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);
View
4 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; } }
}
View
19 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)
{
View
4 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);
View
16 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;
}
/// <summary>
@@ -74,10 +74,10 @@ public override void Update(float dTime)
/// </summary>
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,
View
BIN Human_vs_Zombies/Human_vs_ZombiesContent/Art/MenuBackground.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
4 Human_vs_Zombies/Human_vs_ZombiesContent/Fonts/HvZ.spritefont
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<XnaContent xmlns:Graphics="Microsoft.Xna.Framework.Content.Pipeline.Graphics">
<Asset Type="Graphics:FontDescription">
- <FontName>Kootenay</FontName>
- <Size>14</Size>
+ <FontName>Dink</FontName>
+ <Size>24</Size>
<Spacing>0</Spacing>
<UseKerning>true</UseKerning>
<Style>Regular</Style>
View
7 Human_vs_Zombies/Human_vs_ZombiesContent/Human_vs_ZombiesContent.contentproj
@@ -120,6 +120,13 @@
<Processor>SongProcessor</Processor>
</Compile>
</ItemGroup>
+ <ItemGroup>
+ <Compile Include="Art\MenuBackground.jpg">
+ <Name>MenuBackground</Name>
+ <Importer>TextureImporter</Importer>
+ <Processor>TextureProcessor</Processor>
+ </Compile>
+ </ItemGroup>
<Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\$(XnaFrameworkVersion)\Microsoft.Xna.GameStudio.ContentPipeline.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.

0 comments on commit 6f1ce8a

Please sign in to comment.