public void Shoot(Vector2f dir) { switch (gun) { case "Water Gun": { WaterBullet b = new WaterBullet("~", pos.x, pos.y); b.direction = dir; World.AddDynamicEntity(b); break; } case "Cannon Gun": { Bullet b = new Bullet("~", pos.x, pos.y); b.direction = dir; World.AddDynamicEntity(b); break; } case "Confetti Gun": { ExplodeyBullet b = new ExplodeyBullet("*", pos.x, pos.y); b.direction = dir; World.AddDynamicEntity(b); break; } } }
public void Shoot( Vector2f dir ) { switch( gun ) { case "Water Gun": { WaterBullet b = new WaterBullet( "~", pos.x, pos.y ); b.direction = dir; World.AddDynamicEntity( b ); break; } case "Cannon Gun": { Bullet b = new Bullet( "~", pos.x, pos.y ); b.direction = dir; World.AddDynamicEntity( b ); break; } case "Confetti Gun": { ExplodeyBullet b = new ExplodeyBullet( "*", pos.x, pos.y ); b.direction = dir; World.AddDynamicEntity( b ); break; } } }