public Director(GameWorld pGameWorld) { aaGameWorld = pGameWorld; mGruntKit = new ShipKit_Grunt(); mTankKit = new ShipKit_Tank(); mBombKit = new ShipKit_Bomb(); mStealthKit = new ShipKit_Stealth(); mLaserKit = new ShipKit_Laser(); mGruntBossKit = new ShipKit_Grunt_Boss(); mTankBossKit = new ShipKit_Tank_Boss(); mBombBossKit = new ShipKit_Bomb_Boss(); }
public Ship(GameWorld pGameWorld, string pType, uint pTeam, float pXPos, float pYPos, ShipKit pKit, bool pBoss = false, float pRotation = 0, float pXVel = 0, float pYVel = 0, float pMass = 0.001f) : base(pGameWorld, pType, pXPos, pYPos, pRotation, pXVel, pYVel) { mType = pType; mMass = pMass; mXForce = 0; mYForce = 0; mTeam = pTeam; aTurnPower = 5; mKit = pKit; aThrustPower = mKit.THRUST_POWER; aMaxThrust = mKit.THRUST_MAX; aTurnPower = mKit.TURN_POWER; aHull = mKit.HULL; mDead = false; mBoss = pBoss; BulletSpam = new Ability_BulletSpam(this); Cloak = new Ability_Cloak(this); FireBullet = new Ability_FireBullet(this); FireMultipleBullets = new Ability_FireMultipleBullets(this); BulletStar = new Ability_BulletStar(this); FireMine = new Ability_FireMine(this); FireMissile = new Ability_FireMissile(this); FireMultipleMissles = new Ability_FireMultipleMissles(this); ImmediateAboutFace = new Ability_ImmediateAboutFace(this); ImproveHandling = new Ability_ImproveHandling(this); MissileFlurry = new Ability_MissileFlurry(this); PathLaser = new Ability_PathLaser(this); SlowShip = new Ability_SlowShip(this); SuicideBomb = new Ability_SuicideBomb(this); ThrustShip = new Ability_ThrustShip(this); TurnLeft = new Ability_TurnLeft(this); TurnRight = new Ability_TurnRight(this); ChargeLaser = new Ability_ChargeLaser(this); Shield = new Ability_SuperShield(this); DeployBombGrunts = new Ability_DeployBombGrunts(this); SpawnSatellite = new Ability_SpawnSatellite(this); QuickFix = new Ability_QuickFix(this); OverchargeEngines = new Ability_OverchargeEngines(this); TankShield = new Ability_TankShield(this); DualWield = new Ability_DualWield(this); WaveBlast = new Ability_WaveBlast(this); WarpDrive = new Ability_WarpDrive(this); FullShield = new Ability_FullShield(this); RearGuns = new Ability_RearGuns(this); AntiBullets = new Ability_ShootAntiBullets(this); RapidFire = new Ability_RapidFire(this); if (pType == "Player_Agility") { Ability1 = GetAbility((aaGameWorld.aaDisplay.aaGame.mShipMenu as State_Menu_Ship).Abilitydata.mAbility1[0]); Ability2 = GetAbility((aaGameWorld.aaDisplay.aaGame.mShipMenu as State_Menu_Ship).Abilitydata.mAbility2[0]); Ability3 = GetAbility((aaGameWorld.aaDisplay.aaGame.mShipMenu as State_Menu_Ship).Abilitydata.mAbility3[0]); Ability4 = GetAbility((aaGameWorld.aaDisplay.aaGame.mShipMenu as State_Menu_Ship).Abilitydata.mAbility4[0]); } else if (pType == "Player_Tank") { Ability1 = GetAbility((aaGameWorld.aaDisplay.aaGame.mShipMenu as State_Menu_Ship).Abilitydata.mAbility1[1]); Ability2 = GetAbility((aaGameWorld.aaDisplay.aaGame.mShipMenu as State_Menu_Ship).Abilitydata.mAbility2[1]); Ability3 = GetAbility((aaGameWorld.aaDisplay.aaGame.mShipMenu as State_Menu_Ship).Abilitydata.mAbility3[1]); Ability4 = GetAbility((aaGameWorld.aaDisplay.aaGame.mShipMenu as State_Menu_Ship).Abilitydata.mAbility4[1]); } else if (pType == "Player_Commando") { Ability1 = GetAbility((aaGameWorld.aaDisplay.aaGame.mShipMenu as State_Menu_Ship).Abilitydata.mAbility1[2]); Ability2 = GetAbility((aaGameWorld.aaDisplay.aaGame.mShipMenu as State_Menu_Ship).Abilitydata.mAbility2[2]); Ability3 = GetAbility((aaGameWorld.aaDisplay.aaGame.mShipMenu as State_Menu_Ship).Abilitydata.mAbility3[2]); Ability4 = GetAbility((aaGameWorld.aaDisplay.aaGame.mShipMenu as State_Menu_Ship).Abilitydata.mAbility4[2]); } mAllAbilities = new List <Ability>(); mAllAbilities.Add(BulletSpam); mAllAbilities.Add(Cloak); mAllAbilities.Add(FireBullet); mAllAbilities.Add(FireMultipleBullets); mAllAbilities.Add(BulletStar); mAllAbilities.Add(FireMine); mAllAbilities.Add(FireMissile); mAllAbilities.Add(FireMultipleMissles); mAllAbilities.Add(ImmediateAboutFace); mAllAbilities.Add(ImproveHandling); mAllAbilities.Add(MissileFlurry); mAllAbilities.Add(PathLaser); mAllAbilities.Add(SlowShip); mAllAbilities.Add(SuicideBomb); mAllAbilities.Add(ThrustShip); mAllAbilities.Add(TurnLeft); mAllAbilities.Add(TurnRight); mAllAbilities.Add(ChargeLaser); mAllAbilities.Add(Shield); mAllAbilities.Add(DeployBombGrunts); mAllAbilities.Add(SpawnSatellite); mAllAbilities.Add(QuickFix); mAllAbilities.Add(DualWield); mAllAbilities.Add(OverchargeEngines); mAllAbilities.Add(TankShield); mAllAbilities.Add(WaveBlast); mAllAbilities.Add(WarpDrive); mAllAbilities.Add(FullShield); mAllAbilities.Add(RearGuns); mAllAbilities.Add(AntiBullets); mAllAbilities.Add(RapidFire); mActiveBehaviors = new List <Behavior>(); mActiveBuffs = new List <Buff>(); mBehaviorsToRemove = new List <Behavior>(); mBuffsToRemove = new List <Buff>(); mBuffsToTrigger = new List <Buff>(); mCircleCollision = new CircleCollision(mXPos, mYPos, mKit.COLLISION_SIZE, null, this); aaGameWorld.CollisionShapes_Circle.Add(mCircleCollision); }