Skip to content

Commit

Permalink
Fixed compile errors (I accidentally renamed ObjectPool at some point).
Browse files Browse the repository at this point in the history
  • Loading branch information
PxlBuzzard committed Aug 18, 2014
1 parent 7a08993 commit e965b42
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions FourGuns/FourGuns/Game Objects/Weapons/Gun.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public enum GunWeight
{ Light, Medium, Heavy }
public GunWeight gunWeight; //which weight category the gun is

protected ObjectPool<Bullet> bulletPool; //bullet pool for the gun
protected DynamicObjectPool<Bullet> bulletPool; //bullet pool for the gun
#endregion

protected Gun() { }
Expand Down Expand Up @@ -72,7 +72,7 @@ public Gun(ContentManager theContentManager, Color bColor, bool ChargeGun) : thi
currentAmmo = maxAmmo;
bulletSprite = theContentManager.Load<Texture2D>("Sprites/Gun/Bullet/bullet");

bulletPool = new ObjectPool<Bullet>(10, new Bullet(bulletSprite, bulletColor));
bulletPool = new DynamicObjectPool<Bullet>(10, new Bullet(bulletSprite, bulletColor));
}

/// <summary>
Expand Down Expand Up @@ -105,7 +105,7 @@ public Gun(ContentManager theContentManager, string weaponName,
timeBetweenAttack = timeBetweenShots;
bulletSprite = theContentManager.Load<Texture2D>(theBulletSprite);
currentAmmo = maxAmmo;
bulletPool = new ObjectPool<Bullet>(10, new Bullet(bulletSprite, bulletColor));
bulletPool = new DynamicObjectPool<Bullet>(10, new Bullet(bulletSprite, bulletColor));
}

/// <summary>
Expand Down
4 changes: 2 additions & 2 deletions FourGuns/FourGuns/Missions/GameModes/WaveSurvival.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public class WaveSurvival : Gamemode
{
#region Fields
private Random rnd;
private ObjectPool<Zombie> enemyPool;
private DynamicObjectPool<Zombie> enemyPool;
private Vector2 spawnPosition;
private int mapWidth;
private int mapHeight;
Expand All @@ -46,7 +46,7 @@ public WaveSurvival(ContentManager theContentManager, TileLayer map)
//instantiate things
activeEnemies = new List<Enemy>();
rnd = new Random();
enemyPool = new ObjectPool<Zombie>(15, new Zombie(theContentManager, Vector2.Zero));
enemyPool = new DynamicObjectPool<Zombie>(15, new Zombie(theContentManager, Vector2.Zero));

//save map size
mapWidth = map.WidthInPixels;
Expand Down
2 changes: 1 addition & 1 deletion FourGuns/FourGuns/ObjectPool.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
using System.Collections.Generic;
#endregion

namespace CodeSamples
namespace FourGuns
{
/// <summary>
/// A generic-type object pool that can create new objects if empty.
Expand Down

0 comments on commit e965b42

Please sign in to comment.