public GeomCloneMainMenu(GeomCloneGame game) : base(game) { AddMenuItem("Evolved mode", delegate(GameTime time) { game.ChangeLevel(new GeomCloneEvolved(game)); }); AddMenuItem("Peace Keeper mode", delegate(GameTime time) { game.ChangeLevel(new GeomClonePeaceKeeper(game)); }); AddMenuItem("Exit", delegate(GameTime time) { game.Exit(); }); }
/// <summary> /// The main entry point for the application. /// </summary> static void Main(string[] args) { using (GeomCloneGame game = new GeomCloneGame()) { game.Run(); } }
public GeomCloneTestLevel(GeomCloneGame setGame) : base(setGame) { player.SetWeaponsControl(Input); r = new SmartRhomb(this, new Vector2(0.5f, 0.8f), player); this.EntityManager.AddEnemy(r); this.EnemyGenerator = null; }
public GeomCloneLevel(GeomCloneGame setGame) : base(setGame) { Input.SetActionOnTriggered(Microsoft.Xna.Framework.Input.Keys.P, delegate(GameTime time) { setGame.ChangeLevel(new GamePause(game)); }); player = new Player(this, "smallRect"); player.SetMovementControl(Input); entityManager = new EntityManager(setGame, player); targetSize = new Vector2( GraphicsDevice.Viewport.Width, GraphicsDevice.Viewport.Height ); blur = game.Content.Load <Effect>("Blur"); blur.Parameters["TargetSize"].SetValue(targetSize); blur.Parameters["GlowScalar"].SetValue(intensity); blur.Parameters["numPixel"].SetValue(30); //blur.Parameters["Intensity"].SetValue(hue); //Input.SetActionOnPressed(Keys.PageUp, delegate(GameTime t) { intensity += 0.01f; blur.Parameters["GlowScalar"].SetValue(intensity); }); //Input.SetActionOnPressed(Keys.PageDown, delegate(GameTime t) { intensity -= 0.01f; blur.Parameters["GlowScalar"].SetValue(intensity); }); //Input.SetActionOnPressed(Keys.Z, delegate(GameTime t) { hue += 0.01f; blur.Parameters["Intensity"].SetValue(hue); }); //Input.SetActionOnPressed(Keys.X, delegate(GameTime t) { hue -= 0.01f; blur.Parameters["Intensity"].SetValue(hue); }); target1 = new RenderTarget2D( GraphicsDevice, (int)targetSize.X, (int)targetSize.Y, 0, SurfaceFormat.Color ); target2 = new RenderTarget2D( GraphicsDevice, (int)targetSize.X, (int)targetSize.Y, 0, SurfaceFormat.Color ); fps = new FPSCounter(game, "GeomCloneFont"); state = LevelState.PlayerAlive; borders = new Line2D[4]; borders[0] = new Line2D(setGame, new Vector2(0.5f, 0.0f), 0.0f, 2.5f, 1600.0f, Color.White); borders[1] = new Line2D(setGame, new Vector2(0.5f, 1.0f), 0.0f, 2.5f, 1600.0f, Color.White); borders[2] = new Line2D(setGame, new Vector2(0.0f, 0.5f), 90.0f, 2.5f, 1280.0f, Color.White); borders[3] = new Line2D(setGame, new Vector2(1.0f, 0.5f), 90.0f, 2.5f, 1280.0f, Color.White); }
public EntityManager(GeomCloneGame setGame, Player setPlayer) : base(setGame) { player = setPlayer; enemies = new List<Enemy>(); bullets = new List<Bullet>(); enemiesToAdd = new List<Enemy>(); enemiesToRemove = new List<Enemy>(); bulletsToRemove = new List<Bullet>(); game = setGame; vehicleList = new List<Vehicle>(); bulletVehicleList = new List<Vehicle>(); bombs = new List<Bomb>(); bombsToRemove = new List<Bomb>(); }
public EntityManager(GeomCloneGame setGame, Player setPlayer) : base(setGame) { player = setPlayer; enemies = new List <Enemy>(); bullets = new List <Bullet>(); enemiesToAdd = new List <Enemy>(); enemiesToRemove = new List <Enemy>(); bulletsToRemove = new List <Bullet>(); game = setGame; vehicleList = new List <Vehicle>(); bulletVehicleList = new List <Vehicle>(); bombs = new List <Bomb>(); bombsToRemove = new List <Bomb>(); }
public GeomCloneEvolved(GeomCloneGame setGame) : base(setGame) { player.SetWeaponsControl(Input); ChangeEnemyGenerator(new CornerGenerator(this, EnemyType.SmartRhomb, 10)); }
public GeomClonePeaceKeeper(GeomCloneGame setGame) : base(setGame) { ChangeEnemyGenerator(new RhombGenerator(this)); }
public GeomCloneLevel(GeomCloneGame setGame) : base(setGame) { Input.SetActionOnTriggered(Microsoft.Xna.Framework.Input.Keys.P, delegate(GameTime time) { setGame.ChangeLevel(new GamePause(game)); }); player = new Player(this, "smallRect"); player.SetMovementControl(Input); entityManager = new EntityManager(setGame, player); targetSize = new Vector2( GraphicsDevice.Viewport.Width, GraphicsDevice.Viewport.Height ); blur = game.Content.Load<Effect>("Blur"); blur.Parameters["TargetSize"].SetValue(targetSize); blur.Parameters["GlowScalar"].SetValue(intensity); blur.Parameters["numPixel"].SetValue(30); //blur.Parameters["Intensity"].SetValue(hue); //Input.SetActionOnPressed(Keys.PageUp, delegate(GameTime t) { intensity += 0.01f; blur.Parameters["GlowScalar"].SetValue(intensity); }); //Input.SetActionOnPressed(Keys.PageDown, delegate(GameTime t) { intensity -= 0.01f; blur.Parameters["GlowScalar"].SetValue(intensity); }); //Input.SetActionOnPressed(Keys.Z, delegate(GameTime t) { hue += 0.01f; blur.Parameters["Intensity"].SetValue(hue); }); //Input.SetActionOnPressed(Keys.X, delegate(GameTime t) { hue -= 0.01f; blur.Parameters["Intensity"].SetValue(hue); }); target1 = new RenderTarget2D( GraphicsDevice, (int)targetSize.X, (int)targetSize.Y, 0, SurfaceFormat.Color ); target2 = new RenderTarget2D( GraphicsDevice, (int)targetSize.X, (int)targetSize.Y, 0, SurfaceFormat.Color ); fps = new FPSCounter(game, "GeomCloneFont"); state = LevelState.PlayerAlive; borders = new Line2D[4]; borders[0] = new Line2D(setGame, new Vector2(0.5f, 0.0f), 0.0f, 2.5f, 1600.0f, Color.White); borders[1] = new Line2D(setGame, new Vector2(0.5f, 1.0f), 0.0f, 2.5f, 1600.0f, Color.White); borders[2] = new Line2D(setGame, new Vector2(0.0f, 0.5f), 90.0f, 2.5f, 1280.0f, Color.White); borders[3] = new Line2D(setGame, new Vector2(1.0f, 0.5f), 90.0f, 2.5f, 1280.0f, Color.White); }
public GeomCloneTestLevel(GeomCloneGame setGame) : base(setGame) { player.SetWeaponsControl(Input); r = new SmartRhomb(this, new Vector2(0.5f,0.8f), player); this.EntityManager.AddEnemy(r); this.EnemyGenerator = null; }