Beispiel #1
1
 public Bullet(SchmupGame game, Vector2 position, Vector2 velocity, string bulletTexturePath)
     : base(game)
 {
     Position = position;
     Velocity = velocity;
     this.bulletTexturePath = bulletTexturePath;
 }
Beispiel #2
0
 public FrameRateCounter(SchmupGame game)
     : base(game)
 {
     format = new NumberFormatInfo();
     format.NumberDecimalSeparator = ".";
     position = new Vector2(5, 5);
 }
Beispiel #3
0
 /// <summary>
 /// The main entry point for the application.
 /// </summary>
 static void Main(string[] args)
 {
     using (SchmupGame game = new SchmupGame())
     {
         game.Run();
     }
 }
Beispiel #4
0
 public OptionsMenu(SchmupGame game)
     : base(game)
 {
     MenuEntry menuEntry;
     menuEntry = new MenuEntry("Back to main menu");
     AddEntry(menuEntry);
     this.Enabled = this.Visible = false;
 }
Beispiel #5
0
 /// <summary>
 /// Initialize a new instance of MainMenu
 /// </summary>
 /// <param name="game">The game</param>
 public OptionsMenu(SchmupGame game)
     : base(game)
 {
     MenuEntry menuEntry;
     menuEntry = new MenuEntry("Back to main menu");
     AddEntry(menuEntry);
     Stop();
 }
Beispiel #6
0
 public Level(SchmupGame game)
     : base(game)
 {
     this.Enabled = this.Visible = false;
     #if DEBUG
     levelTracer = new LevelTracer(game, this);
     #endif
 }
Beispiel #7
0
 /// <summary>
 /// Initialize a new instance of Level that is disabled and invisible
 /// </summary>
 /// <param name="game">The game instance</param>
 public Level(SchmupGame game)
     : base(game)
 {
     Stop();
     EnnemyWaves = new List<EnnemyWave>();
     #if DEBUG
     levelTracer = new LevelTracer(game, this);
     #endif
 }
Beispiel #8
0
 /// <summary>
 /// Initialize an instance of Level1
 /// </summary>
 /// <param name="game">The game</param>
 public Level1(SchmupGame game)
     : base(game)
 {
     EnnemyWave wave;
     wave = new EnnemyWave(new TimeSpan(0, 0, 3));
     wave.EnnemyWaveItems.Add(new EnnemyWaveItem(new DarkDrone(game, new Vector2(0, 0), new Vector2(0, 5)), new TimeSpan(0, 0, 0)));
     wave.EnnemyWaveItems.Add(new EnnemyWaveItem(new DarkDrone(game, new Vector2(0, 0), new Vector2(0, 5)), new TimeSpan(0, 0, 1)));
     wave.EnnemyWaveItems.Add(new EnnemyWaveItem(new DarkDrone(game, new Vector2(0, 0), new Vector2(0, 5)), new TimeSpan(0, 0, 2)));
     EnnemyWaves.Add(wave);
 }
Beispiel #9
0
 /// <summary>
 /// Initialize a new instance of MainMenu
 /// </summary>
 /// <param name="game">The game</param>
 public MainMenu(SchmupGame game)
     : base(game)
 {
     MenuEntry menuEntry;
     menuEntry = new MenuEntry("Start");
     AddEntry(menuEntry);
     menuEntry = new MenuEntry("Options");
     AddEntry(menuEntry);
     menuEntry = new MenuEntry("Exit");
     AddEntry(menuEntry);
 }
Beispiel #10
0
        public ScoreManager(SchmupGame game)
            : base(game)
        {
            Bombs = 3;
            Lives = 3;

            bombsLabelPosition = bombsValuePosition = new Vector2(40, 250);
            chainsLabelPosition = chainsValuePosition = new Vector2(40, 150);
            livesLabelPosition = livesValuePosition = new Vector2(40, 200);
            scoreLabelPosition = scoreValuePosition = new Vector2(40, 100);

            bombsValuePosition.X = 140;
            chainsValuePosition.X = 140;
            livesValuePosition.X = 140;
            scoreValuePosition.X = 140;

            this.Enabled = this.Visible = false;
        }
Beispiel #11
0
 /// <summary>
 /// Initialize a new instance of ComponentsTracer
 /// </summary>
 /// <param name="game">The game</param>
 public ComponentsTracer(SchmupGame game)
     : base(game)
 {
 }
Beispiel #12
0
 /// <summary>
 /// Initialize a new instance of Menu
 /// </summary>
 /// <param name="game">The game</param>
 public Menu(SchmupGame game)
     : base(game)
 {
     MenuTopPosition = new Vector2(100, 300);
 }
Beispiel #13
0
 /// <summary>
 /// Initialize a new instance of Ship and sets the default position
 /// </summary>
 /// <param name="game">The game</param>
 /// <param name="position">Default position</param>
 public Ship(SchmupGame game, Vector2 position)
     : base(game, position)
 {
 }
Beispiel #14
0
 /// <summary>
 /// Initialize a new instance of Sprite and sets the default position
 /// </summary>
 /// <param name="game">The game</param>
 /// <param name="position">Default position</param>
 public Sprite(SchmupGame game, Vector2 position)
 {
     Game = game;
     Position = position;
     Bounds = new Rectangle((int)Position.X, (int)Position.Y, 1, 1);
 }
Beispiel #15
0
 /// <summary>
 /// Initialize a new instance of Ennemy with the default position and velocity
 /// </summary>
 /// <param name="game">The game</param>
 /// <param name="position">Default position</param>
 /// <param name="velocity">Default velocity</param>
 public Ennemy(SchmupGame game, Vector2 position, Vector2 velocity)
     : base(game, position)
 {
     Energy = MaxEnergy;
     Velocity = velocity;
 }
Beispiel #16
0
 public Ship(SchmupGame game)
     : base(game)
 {
 }
Beispiel #17
0
 /// <summary>
 /// Initialize a new instance of DarkDrone with the default position and velocity
 /// </summary>
 /// <param name="game">The game</param>
 /// <param name="position">Default position</param>
 /// <param name="velocity">Default velocity</param>
 public DarkDrone(SchmupGame game, Vector2 position, Vector2 velocity)
     : base(game, position, velocity)
 {
 }
 public SchmupDrawableGameComponent(SchmupGame game)
     : base(game)
 {
     SchmupGame = game;
 }
Beispiel #19
0
 public Sprite(SchmupGame game)
 {
     Game = game;
     Bounds = new Rectangle(0, 0, 1, 1);
 }