public AmmoGib(MoneyManager mon, Ship ship, Vector3 pos, Game1 game, int type) : base() { this.value = value; this.model = ModelLibrary.bombProjectile; this.pos = pos; this.ship = ship; this.game = game; this.type = type; moneyManager = mon; weps = ship.weapons; scale = new Vector3(.3f, .3f, .3f); setColor(type); glow = new MoneyGibGlow(TextureManager.square, this, game); game.modelManager.addEffect(glow); initDirection.X = (float)Utilities.random.NextDouble()*2-1; initDirection.Y = (float)Utilities.random.NextDouble()*2-1; initDirection.Z = (float)Utilities.random.NextDouble()*2-1; initDirection.Normalize(); currentDirection = initDirection; rot = currentDirection; speed = Utilities.nextFloat()*5+17; changeDirectionSpeed = Utilities.nextFloat() + 4.5f; col = new CircleCollider(pos, 0.05f); collected = false; }
public Weapon(WeaponSystem wepSys, Ship ship, Game1 game) { this.wepSys = wepSys; this.ship = ship; this.game = game; cooldown = 0; level = 1; projectiles = new List<Projectile>(); toDelete = new List<Projectile>(); }
public WeaponMissiles(WeaponSystem wepSys, Ship ship, Game1 game) : base(wepSys, ship, game) { icon = TextureManager.icoAst; name = "Asteroid sorter"; damage = 0.25f; rateOfFire = 0.9f; range = 0.9f; coolMax = 15; laserPos = 0; EXPMAX = 250; }
public WeaponWave(WeaponSystem wepSys, Ship ship, Game1 game) : base(wepSys, ship, game) { icon = TextureManager.icoWave; name = "Pulse Generator"; ammoName = "Wave"; damage = 0.7f; rateOfFire = 0.4f; range = 0.3f; coolMax = 90; ammoMax = 24; ammo = ammoMax; EXPMAX = 250; }
public QuickSelect(Hud hud, Game1 game, SpriteFont font) { this.hud = hud; this.game = game; this.font = font; wepSys = game.ship.weapons; solidWhite = new Texture2D(game.GraphicsDevice, 1, 1); solidWhite.SetData(new Color[] { Color.White }); out4 = game.Content.Load<Texture2D>(@"Hud/QuickSelect/qsOut4"); out4_1 = game.Content.Load<Texture2D>(@"Hud/QuickSelect/qsOut4-1"); out4_2 = game.Content.Load<Texture2D>(@"Hud/QuickSelect/qsOut4-2"); out4_3 = game.Content.Load<Texture2D>(@"Hud/QuickSelect/qsOut4-3"); out4_4 = game.Content.Load<Texture2D>(@"Hud/QuickSelect/qsOut4-4"); out5 = game.Content.Load<Texture2D>(@"Hud/QuickSelect/qsOut5"); out5_1 = game.Content.Load<Texture2D>(@"Hud/QuickSelect/qsOut5-1"); out5_2 = game.Content.Load<Texture2D>(@"Hud/QuickSelect/qsOut5-2"); out5_3 = game.Content.Load<Texture2D>(@"Hud/QuickSelect/qsOut5-3"); out5_4 = game.Content.Load<Texture2D>(@"Hud/QuickSelect/qsOut5-4"); out5_5 = game.Content.Load<Texture2D>(@"Hud/QuickSelect/qsOut5-5"); fill4 = game.Content.Load<Texture2D>(@"Hud/QuickSelect/qsFill4"); fill5 = game.Content.Load<Texture2D>(@"Hud/QuickSelect/qsFill5"); hi1 = game.Content.Load<Texture2D>(@"Hud/QuickSelect/qsHi1"); hi2 = game.Content.Load<Texture2D>(@"Hud/QuickSelect/qsHi2"); hi3 = game.Content.Load<Texture2D>(@"Hud/QuickSelect/qsHi3"); hi4 = game.Content.Load<Texture2D>(@"Hud/QuickSelect/qsHi4"); hi5 = game.Content.Load<Texture2D>(@"Hud/QuickSelect/qsHi5"); barMask = game.Content.Load<Texture2D>(@"Hud/Masks/qsMask"); imgW = out4.Bounds.Width; imgH = out4.Bounds.Height; currentFill = fill4; currentOut = out4; currentHi = hi1; targ1 = new RenderTarget2D(game.GraphicsDevice, 123, 15); targ2 = new RenderTarget2D(game.GraphicsDevice, 123, 15); sb = new SpriteBatch(game.GraphicsDevice); alphaMap = TextureManager.alphaMap; }
public WeaponBomb(WeaponSystem wepSys, Ship ship, Game1 game) : base(wepSys, ship, game) { icon = TextureManager.icoBomb; name = "Exobomb"; rateOfFire = 0.2f; damage = 1; range = 0.8f; coolMax = 90; softCoolmax = 60; ammoMax = 8; ammo = ammoMax; EXPMAX = 250; splos = new List<BombExplosion>(); sploToDelete = new List<BombExplosion>(); }
public WeaponLaser(WeaponSystem wepSys, Ship ship, Game1 game) : base(wepSys, ship, game) { icon = TextureManager.icoPew; name = "Laser Cutters"; ammoName = "Charge"; damage = 0.3f; rateOfFire = 0.9f; range = 0.9f; coolMax = 15; laserPos = 0; ammoMax = 200; ammo = ammoMax; EXPMAX = 250; }
public HudWeapon(Hud hud, SpriteFont font, Game1 game) : base(hud, font, game) { wepSys = game.ship.weapons; wakeThresh = 5; wepPos = new Vector2(45, 45); wepAmmoPos = new Vector2(325, 90); barTarg = new RenderTarget2D(game.GraphicsDevice, 180, 15); maskTarg = new RenderTarget2D(game.GraphicsDevice, 180, 15); sb = new SpriteBatch(game.GraphicsDevice); hudWepF = game.Content.Load<Texture2D>(@"Hud/hudWepF"); hudWepB = game.Content.Load<Texture2D>(@"Hud/hudWepB"); hudWepF2 = game.Content.Load<Texture2D>(@"Hud/hudWepO2"); hudWepB2 = game.Content.Load<Texture2D>(@"Hud/hudWepF2"); mask = game.Content.Load<Texture2D>(@"Hud/Masks/expBar"); alphaMap = TextureManager.alphaMap; }
public TurretSelect(Hud hud, Game1 game, SpriteFont font) { this.hud = hud; this.game = game; this.font = font; qs = hud.quickSelect; wepSys = game.ship.weapons; imgW = qs.out4.Bounds.Width; imgH = qs.out4.Bounds.Height; currentHi = hud.quickSelect.hi1; newTurr = true; loadImages(); rTarg = new RenderTarget2D(game.GraphicsDevice, 512, 512); sb = new SpriteBatch(game.GraphicsDevice); modelManager = new TsModelManager(game); }
public ExpSelect(Hud hud, Game1 game, SpriteFont font) { this.hud = hud; this.game = game; this.font = font; qs = hud.quickSelect; wepSys = game.ship.weapons; imgW = qs.out4.Bounds.Width; imgH = qs.out4.Bounds.Height; currentHi = hud.quickSelect.hi1; helpO = game.Content.Load<Texture2D>(@"Hud/qhelpO"); helpF = game.Content.Load<Texture2D>(@"Hud/qhelpF"); targ1 = new RenderTarget2D(game.GraphicsDevice, 123, 15); targ2 = new RenderTarget2D(game.GraphicsDevice, 123, 15); sb = new SpriteBatch(game.GraphicsDevice); alphaMap = TextureManager.alphaMap; }
public WeaponDrill(WeaponSystem wepSys, Ship ship, Game1 game) : base(wepSys, ship, game) { icon = TextureManager.icoDrill; name = "Omega Drill"; damage = 1; rateOfFire = 0; range = 0.1f; level = 3; coolMax = 90; softCoolmax = 60; ammoMax = 16; ammo = ammoMax; col = new CircleCollider(ship.pos+ship.direction, 0.5f); active = false; dome = new DrillDome(game, this); game.modelManager.addEffect(dome); finishingRange = new OOBB(ship.pos + ship.direction * 15, ship.direction, 3, 30); spins = new DrillSpinControl(game, this); }
public Ship(Game1 game) : base(game) { this.game = game; lastNodePos = Vector2.Zero; pos = new Vector3(90, 4.5f, 0); moveSpeed = 0; accel = 0.5f; maxSpeed = 0.2f; boostSpeed = 0.6f; direction = new Vector3(0, 0, -1); currentTurnSpeed = 0; maxTurnSpeed = MathHelper.PiOver4 / 30; boundingBox = new OOBB(pos, direction, 1.5f, 1.5f); // Need to be changed to be actual ship dimentions circleCol = new CircleCollider(pos, 0.75f); shipModel = new ShipModel(this, game); //shipModel = new ShipModel(game.Content.Load<Model>(@"Models/Enemies/Cubes/guncube"), this); skyboxModel = new SkyboxModel(game.Content.Load<Model>(@"Models/Misc/Skybox/skybox"), this); speedCyl = new SpeedCylModel(game.Content.Load<Model>(@"Models/Misc/speedCyl"), this, ((Game1)Game)); rbowTun = new RainbowTunnelModel(game.Content.Load<Model>(@"Models/Misc/Rbow/rbowTun"), this, ((Game1)Game)); game.modelManager.addObject(shipModel); game.modelManager.add(skyboxModel); game.modelManager.addObject(rbowTun); game.modelManager.addTransparent(speedCyl); weapons = new WeaponSystem(this, this.game); moneyManager = new MoneyManager(this.game); particles = new ShipParticleSystem(this.game, this); shipHealth = new ShipHealthSystem(this.game, this); game.Components.Add(weapons); game.Components.Add(moneyManager); game.Components.Add(particles); game.Components.Add(shipHealth); ((WeaponDrill)weapons.weapons.ElementAt(4)).dome.setShip(this); alive = true; }