Exemple #1
0
 /// <summary>
 /// The main entry point for the application.
 /// </summary>
 static void Main(string[] args)
 {
     using (Game1 game = new Game1())
     {
         game.Run();
     }
 }
Exemple #2
0
 public Bullet(Game1 super, Vector2 position, Vector2 velocity, Vector2 size)
 {
     this.super = super;
     this.position = position;
     this.velocity = velocity;
     this.size = size;
 }
Exemple #3
0
 public Particle(Game1 super, int life, Vector2 position, Vector2 velocity, Vector2 size)
 {
     this.super = super;
     this.texture = super.particle;
     this.color = new Color(1f,1f,1f,1f);
     this.life = life;
     this.position = position;
     this.velocity = velocity;
     this.size = size;
     fadetime = -1;
 }
Exemple #4
0
 public Enemy(Game1 super, Vector2 position, Vector2 velocity)
 {
     this.super = super;
     this.position = position;
     this.velocity = velocity;
     health = 2;
     bulletTimerFreq = 45;
     bulletTimer = bulletTimerFreq;
     bullets = 0;
     bulletsMax = 1;
 }
Exemple #5
0
 public static void Explosion(Game1 super, int amount, Vector2 position)
 {
     for(int r = 0;r<amount;r++) {
         float angle = (float)super.random.NextDouble()*360f;
         float speed = 4+(float)super.random.NextDouble();
         Particle p =
             new Particle(
                 super, 7+(int)(3*super.random.NextDouble()), position,
                 new Vector2(
                     (float)Math.Cos(MathHelper.ToRadians(angle))*speed,
                     (float)Math.Sin(MathHelper.ToRadians(angle))*speed),
                 new Vector2(2,2));
         p.color = new Color(255, super.random.NextDouble()>0.5?255:0, 0);
         super.particles.Add(p);
     }
 }
Exemple #6
0
 public Player(Game1 super)
 {
     this.super = super;
     init();
 }
Exemple #7
0
 public Player(Game1 super)
 {
     this.super = super;
     init();
 }