public PowerUI(LevelUI levelUI) { this.levelUI = levelUI; }
public LevelScene(bool grantCampaignEquipment) : base() { // Defaults this.isSinglePlayer = true; // UI State UIHandler.SetUIOptions(false, false); UIHandler.SetMenu(null, false); // Create UI this.levelUI = new LevelUI(); // Generate Each Room Class this.rooms = new RoomScene[8]; for (byte roomID = 0; roomID < Systems.handler.levelContent.data.rooms.Count; roomID++) { this.rooms[roomID] = new RoomScene(this, roomID); } // If we're on single player, Systems.localServer.ResetPlayers(); // Restart the level, generate all rooms. this.RestartLevel(true); // Update Character with World Map abilities (if applicable) if (grantCampaignEquipment) { Character character = Systems.localServer.MyCharacter; CampaignState campaign = Systems.handler.campaignState; // Update Character Equipment if (campaign is CampaignState) { if (character.suit is Suit == false || !character.suit.IsPowerSuit) { Suit.AssignToCharacter(character, campaign.suit, true); } if ((character.hat is Hat == false || !character.hat.IsPowerHat) && (character.hat == null || !character.hat.IsCosmeticHat || campaign.hat != 0)) { Hat.AssignToCharacter(character, campaign.hat, true); } if (character.shoes is Shoes == false) { Shoes.AssignShoe(character, campaign.shoes); } if (character.attackPower is PowerAttack == false) { PowerAttack.AssignPower(character, campaign.powerAtt); } if (character.mobilityPower is PowerMobility == false) { PowerMobility.AssignPower(character, campaign.powerMob); } if (character.wounds.Health < campaign.health) { character.wounds.SetHealth(campaign.health); } if (character.wounds.Armor < campaign.armor) { character.wounds.SetArmor(campaign.armor); } } } // Play or Stop Music Systems.music.Play((byte)Systems.handler.levelContent.data.music); }