Overrides the Game class to provide a common spritebatch for all components. Also provide common loading abilities for other components.
Inheritance: Microsoft.Xna.Framework.Game
 // A CORRIGER!
 public EasyBoss(LuxGame game, World world, int life, int takenDamageCollision, int givenDamageCollision, Sprite skin, Texture2D bulletText, int shotHitbox)
     : base(game, world, life, takenDamageCollision, givenDamageCollision, skin)
 {
     this.bigBulletText = this.Game.Content.Load<Texture2D>("bigbullet001-1");
     this.enemyTexture = this.Game.Content.Load<Texture2D>("commonEnemy");
     this.warningTexture = this.Game.Content.Load<Texture2D>("warning");
 }
示例#2
0
 public Hero(LuxGame game, World world, int life, int takenDamageCollision, int givenDamageCollision, int speed1, int speed2, Sprite skin = null)
     : base(game, world, life, takenDamageCollision, givenDamageCollision, skin)
 {
     this.speed1 = speed1;
     this.speed2 = speed2;
     this.currentSpeed = speed1;
 }
 /// <summary>
 /// The main entry point for the application.
 /// </summary>
 static void Main(string[] args)
 {
     using (LuxGame game = new LuxGame())
     {
         game.Components.Add(new Schmup.MainScene(game));
         game.Run();
     }
 }
 /// <summary>
 /// The main entry point for the application.
 /// </summary>
 static void Main(string[] args)
 {
     using (LuxGame game = new LuxGame())
     {
         //game.Components.Add(new Scenes.DemoTitleScene(game));
         game.Run();
     }
 }
 // INTEGRER LA HURTBOX DANS LE CONSTRUCTEUR;
 public Character(LuxGame game, World world, int life, int takenDamageCollision, int givenDamageCollision, Sprite skin)
     : base(game)
 {
     this.life = life;
     this.takenDamageCollision = takenDamageCollision;
     this.givenDamageCollision = givenDamageCollision;
     this.skin = skin;
     this.world = world;
 }
 // PAS CORRIGE, A FAIRE!
 public BigBoss(LuxGame game, World world, int life, int takenDamageCollision, int givenDamageCollision, bool shootsHero, int waitTimeFrames, Sprite skin, Texture2D bulletText)
     : base(game, world, life, takenDamageCollision, givenDamageCollision, skin)
 {
     // A AMELIORER
     this.bulletTexture = this.Content.Load<Texture2D>("bullet001-1");
     this.bulletTexture2 = this.Content.Load<Texture2D>("bullet002-1");
     this.bulletTexture3 = this.Content.Load<Texture2D>("bullet005-1");
     this.enemyTexture = this.Content.Load<Texture2D>("commonEnemy");
 }
示例#7
0
 public Shot(LuxGame game, double invincibleTimeSec, int hitbox, int damage, World world, Sprite skin = null)
     : base(game)
 {
     this.invincibleTimeSec = invincibleTimeSec;
     this.skin = skin;
     this.isABadShot = true;
     this.hitbox = hitbox;
     this.world = world;
     this.damage = damage;
 }
 public RotatingEnemy(LuxGame game, World world, int life, int takenDamageCollision, int givenDamageCollision, Sprite skin, int shotNb, float angleBtwShotsDegrees, Vector2 direction, double waitTimeSec, int patShotNb, int patAngleBtwShotsDegrees)
     : base(game, world, life, takenDamageCollision, givenDamageCollision, skin)
 {
     this.shotNb = shotNb;
     this.angleBtwShotsDegrees = angleBtwShotsDegrees;
     this.direction = direction;
     this.waitTimeSec = waitTimeSec;
     this.patAngleBtwShotsDegrees = patAngleBtwShotsDegrees;
     this.patShotNb = patShotNb;
 }
 public HeroLazer(LuxGame game, World world, int invincibleTimeMillisec, int spriteNb, int damage, Sprite skin)
     : base(game, invincibleTimeMillisec, true, world, 10, damage, skin)
 {
     this.spriteNb = spriteNb;
     texture = new List<Texture2D>(spriteNb);
     for (int i=0; i<spriteNb; i++)
     {
         Texture2D text = this.Content.Load<Texture2D>("lazermoche");
         this.texture.Add(text);
     }
 }
示例#10
0
 public ShotPool(LuxGame game, World world, bool isAGoodShot, 
     double invincibleTimeSec, int shotNb, int maxShotNb, int shotHitBox,
     int damage, Texture2D bulletText, Sprite skin = null)
     : base(game)
 {
     this.world = world;
     this.isAGoodShot = isAGoodShot;
     maxActiveShots = 0;
     this.invincibleTimeSec = invincibleTimeSec;
     this.shotNb = shotNb;
     this.maxShotNb = maxShotNb;
     this.shotHitBox = shotHitBox;
     this.damage = damage;
     this.bulletText = bulletText;
     allShots = new List<Shot>(shotNb);
     activeShots = new List<Shot>(shotNb);
     nonActiveShots = new List<Shot>(shotNb);
 }
示例#11
0
 // Si rien n'est spécifié, les tirs auront une texture prédéfinie
 public ShotPool(LuxGame game, World world)
     : base(game)
 {
     this.world = world;
     isAGoodShot = false;
     maxActiveShots = 0;
     invincibleTimeSec = 0.1;
     // TODO : BAISSER CE CHIFFRE
     // Créer d'autres constructeurs plus utiles
     shotNb = 400;
     maxShotNb = 400;
     shotHitBox = 8;
     damage = 10;
     bulletText = this.Content.Load<Texture2D>("bullet001-1");
     allShots = new List<Shot>(shotNb);
     activeShots = new List<Shot>(shotNb);
     nonActiveShots = new List<Shot>(shotNb);
 }
 public HomingMissile(LuxGame game, int invincibleTimeMillisec, bool isAGoodShot, float rotation, int hitbox, int damage, World world, Sprite skin = null)
     : base(game, invincibleTimeMillisec, isAGoodShot, world, hitbox, damage, null)
 {
     this.rotation = rotation;
 }
 public GenericEnemy(LuxGame game, World world, int life, int takenDamageCollision, int givenDamageCollision, Sprite skin)
     : base(game, world, life, takenDamageCollision, givenDamageCollision, skin)
 {
     speed = new Vector2(0, 0);
 }
示例#14
0
 public Enemy(LuxGame game, World world, int life, int takenDamageCollision, int givenDamageCollision,
     List<ShotPool> shotsOfType, Sprite skin)
     : base(game, world, life, takenDamageCollision, givenDamageCollision, skin)
 {
     this.shotsOfType = shotsOfType;
 }
示例#15
0
 public Scene(LuxGame game)
     : base(game)
 {
     Content = game.GlobalContentManager;
     //this.Game.Components.Add(this);
 }
 public ShootingPattern(LuxGame game, ShotPool shots, Enemy enemy)
     : base(game)
 {
     this.shots = shots;
     this.enemy = enemy;
 }
示例#17
0
 public Lazer(LuxGame game, World world, int invincibleTimeMillisec, Vector2 move, int lazerNb)
     : base(game, world, invincibleTimeMillisec)
 {
     this.move = move;
     this.lazerNb = lazerNb;
 }
 public ThreeEnemies(LuxGame game)
     : base(game)
 {
 }
示例#19
0
 public Screen(LuxGame game)
     : base(game)
 {
 }
 public ShootsHero(LuxGame game, World world, ShotPool shots, Enemy enemy)
     : base(game, shots, enemy)
 {
     elapsedSec = 0;
     this.world = world;
 }
示例#21
0
 public Window(LuxGame game, Rectangle rect)
     : base(game)
 {
     WindowRectangle = rect;
     Position = new Vector2(rect.X, rect.Y);
 }
示例#22
0
 // CLASSE NON VALIDEE!
 public HeroShot(LuxGame game, World world, int invincibleTimeMillisec, int damage, Sprite skin = null)
     : base(game, invincibleTimeMillisec, true, world, 1, damage, null)
 {
 }
示例#23
0
 // TODO : Implémenter un pseudo constructeur par recopie
 public ShotPool(LuxGame game, World world, Shot shot, int shotNb, int maxShotNb, Sprite skin = null)
     : base(game)
 {
     this.world = world;
     // A COMPLETER
 }
 public MainScene(LuxGame game)
     : base(game)
 {
     //map = new Map();
 }
 public RotatingShot(LuxGame game, World world, int invincibleTimeMillisec, bool isAGoodShot, float rotation, int hitbox, Sprite skin = null)
     : base(game, invincibleTimeMillisec, isAGoodShot, world, hitbox, 2, null)
 {
     this.rotation = rotation;
 }
示例#26
0
 public World(LuxGame game)
     : base(game)
 {
     deadEnemyNumber = 0;
     shootsHeros = new List<ShootsHero>();
 }
 public TechnicalHero(LuxGame game, World world, int life, int takenDamageCollision, int givenDamageCollision, int speed1, int speed2, Sprite skin = null)
     : base(game, world, life, takenDamageCollision, givenDamageCollision, speed1, speed2, null)
 {
 }
示例#28
0
 public Bar(LuxGame game, Vector2 Size)
     : base(game)
 {
     this.Size = Size;
 }