public void Initialize() { aaDisplay.aaCamera = new DisplayCamera(this); aaGFXHandler = new GraphicsEffectHandler(this); if ((aaDisplay.aaGame.mShipMenu as State_Menu_Ship).shipCount == 0) { Player = new Ship(this, "Player_Agility", Constants.PLAYER_TEAM, 640, 360, new ShipKit_Player_Agility(), false, 0, 0, 0); } else if ((aaDisplay.aaGame.mShipMenu as State_Menu_Ship).shipCount == 2) { Player = new Ship(this, "Player_Commando", Constants.PLAYER_TEAM, 640, 360, new ShipKit_Player_Commando(), false, 0, 0, 0); } else if ((aaDisplay.aaGame.mShipMenu as State_Menu_Ship).shipCount == 1) { Player = new Ship(this, "Player_Tank", Constants.PLAYER_TEAM, 640, 360, new ShipKit_Player_Tank(), false, 0, 0, 0); } mEntityList.Add(Player); mAiDirector = new Director(this); mBackground = new DisplayObject(aaDisplay, "Back_Black_01", 0, 0, 0, 0, 1.0f, 0, 0, Constants.REGION_PLAYABLE_WIDTH, Constants.REGION_PLAYABLE_HEIGHT, 0, false); State_Menu_Ship smShip = (aaDisplay.aaGame.mShipMenu as State_Menu_Ship); mAbility1Indicator = new UIElement_AbilityIndicator(aaDisplay, this, ((Ship)Player).Ability1, smShip.ability1, 0, 658, 0); mAbility2Indicator = new UIElement_AbilityIndicator(aaDisplay, this, ((Ship)Player).Ability2, smShip.ability2, 60, 658, 0); mAbility3Indicator = new UIElement_AbilityIndicator(aaDisplay, this, ((Ship)Player).Ability3, smShip.ability3, 120, 658, 0); mAbility4Indicator = new UIElement_AbilityIndicator(aaDisplay, this, ((Ship)Player).Ability4, smShip.ability4, 180, 658, 0); Crosshair = new UIElement_ShipCrosshair(aaDisplay, this, KitManager.CrosshairUIAssetKit.ASSET_NAME, (int)Player.mXPos, (int)Player.mYPos, (int)mKit_Crosshair.ORIGIN.X, (int)mKit_Crosshair.ORIGIN.Y, Constants.LAYER_ENTITY_DEPTH, mKit_Crosshair.SRC_RECTX, mKit_Crosshair.SRC_RECTY, mKit_Crosshair.SRC_RECTWIDTH, mKit_Crosshair.SRC_RECTHEIGHT, 0.0f); Aimer = new UIElement_ShipAimer(aaDisplay, this, Player, mKit_Aimer.ASSET_NAME, (int)Player.mXPos, (int)Player.mYPos, (int)mKit_Aimer.ORIGIN.X, (int)mKit_Aimer.ORIGIN.Y, Constants.LAYER_ENTITY_DEPTH, mKit_Aimer.SRC_RECTX, mKit_Aimer.SRC_RECTY, mKit_Aimer.SRC_RECTWIDTH, mKit_Aimer.SRC_RECTHEIGHT, 0.0f); HealthBarBorder = new UIElement_HealthBar_Border(aaDisplay, this, mKit_HealthBorder.ASSET_NAME, 992, 0, 0, 0, Constants.LAYER_UI_FRONT, mKit_HealthBorder.SRC_RECTX, mKit_HealthBorder.SRC_RECTY, mKit_HealthBorder.SRC_RECTWIDTH, mKit_HealthBorder.SRC_RECTHEIGHT, 0); HealthBar = new UIElement_HealthBar_Bar(aaDisplay, this, mKit_HealthBar.ASSET_NAME, 1030, 6, 0, 0, Constants.LAYER_UI_FRONT, Player, mKit_HealthBar.SRC_RECTX, mKit_HealthBar.SRC_RECTY, mKit_HealthBar.SRC_RECTWIDTH, mKit_HealthBar.SRC_RECTHEIGHT, 0); HealthWhite = new UIElement_HealthBar_BarWhite(aaDisplay, this, mKit_HealthWhite.ASSET_NAME, 1030, 6, 0, 0, Constants.LAYER_UI_BACK, Player, mKit_HealthWhite.SRC_RECTX, mKit_HealthWhite.SRC_RECTY, mKit_HealthWhite.SRC_RECTWIDTH, mKit_HealthWhite.SRC_RECTHEIGHT, 0); GameOverPlaque = new UIElement_StaticMenuElement(aaDisplay, this, mKit_GameOver.ASSET_NAME, 320, 184, (int)mKit_GameOver.ORIGIN.X, (int)mKit_GameOver.ORIGIN.Y, Constants.LAYER_UI_BACK, mKit_GameOver.SRC_RECTX, mKit_GameOver.SRC_RECTY, mKit_GameOver.SRC_RECTWIDTH, mKit_GameOver.SRC_RECTHEIGHT, 0.0f); score = new UIElement_PlayerScore(aaDisplay, this, aaDisplay.aaGame.mScoreFont, 0, 0, Color.White); waveIndicator = new UIElement_WaveDisplay(aaDisplay, this, aaDisplay.aaGame.mScoreFont, 0, 100, Color.White); aaDisplay.AddMenuUIElement(mAbility1Indicator); aaDisplay.AddMenuUIElement(mAbility2Indicator); aaDisplay.AddMenuUIElement(mAbility3Indicator); aaDisplay.AddMenuUIElement(mAbility4Indicator); aaDisplay.AddUIElement(Crosshair); aaDisplay.AddUIElement(Aimer); aaDisplay.AddUIElement(HealthBarBorder); aaDisplay.AddUIElement(HealthBar); aaDisplay.AddUIElement(HealthWhite); aaDisplay.AddUIElement(score); aaDisplay.AddUIElement(waveIndicator); mPoints = 0; }