예제 #1
0
파일: Program.cs 프로젝트: Koneke/SpaceAce
 /// <summary>
 /// The main entry point for the application.
 /// </summary>
 static void Main(string[] args)
 {
     using (Game1 game = new Game1())
     {
         game.Run();
     }
 }
예제 #2
0
파일: Bullet.cs 프로젝트: Koneke/SpaceAce
 public Bullet(Game1 super, Vector2 position, Vector2 velocity, Vector2 size)
 {
     this.super = super;
     this.position = position;
     this.velocity = velocity;
     this.size = size;
 }
예제 #3
0
파일: Particle.cs 프로젝트: Koneke/SpaceAce
 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;
 }
예제 #4
0
파일: Enemy.cs 프로젝트: Koneke/SpaceAce
 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;
 }
예제 #5
0
파일: Particle.cs 프로젝트: Koneke/SpaceAce
 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);
     }
 }
예제 #6
0
파일: Player.cs 프로젝트: Koneke/SpaceAce
 public Player(Game1 super)
 {
     this.super = super;
     init();
 }
예제 #7
0
파일: Player.cs 프로젝트: Koneke/SpaceAce
 public Player(Game1 super)
 {
     this.super = super;
     init();
 }