public void LoadContent() { ContentManager Content = gameplay.SceneManager.Game.Content; Texture2D texture; Texture2D textureActive; Texture2D textureInactive; font = Content.Load<SpriteFont>(@"fonts\gameplay\hud_font"); texture = Content.Load<Texture2D>(@"images\gameplay\buttons\life_label"); LifeLabel = new Label(texture, new Vector2(800,50)); texture = Content.Load<Texture2D>(@"images\gameplay\buttons\money_label"); MoneyLabel = new Label(texture, new Vector2(20,35)); textureActive = Content.Load<Texture2D>(@"images\gameplay\buttons\pause_enable_but"); textureInactive = Content.Load<Texture2D>(@"images\gameplay\buttons\play_enable_but"); playButton = new ToggleButton(textureActive, null, null, textureInactive, new Vector2(75,675)); playButton.Clicked += PlayButton_Clicked; playButton.Active = true; textureActive = Content.Load<Texture2D>(@"images\gameplay\buttons\fast_enable_but"); textureInactive = Content.Load<Texture2D>(@"images\gameplay\buttons\fast_disable_but"); fastButton = new ToggleButton(textureActive, null, null, textureInactive, new Vector2(135,675)); fastButton.Clicked += FastButton_Clicked; fastButton.Active = false; textureActive = Content.Load<Texture2D>(@"images\gameplay\buttons\setting_enable_but"); textureInactive = Content.Load<Texture2D>(@"images\gameplay\buttons\setting_disable_but"); settingButton = new Button(textureInactive,null, textureActive, new Vector2(203,675)); settingButton.Clicked += SettingButton_Clicked; }
public override void LoadContent() { ContentManager content = SceneManager.Game.Content; backgroundTexture = content.Load<Texture2D>(@"images\scene\HelpScene\help"); backgroundPosition = new Vector2(0, 0); Texture2D texture = content.Load<Texture2D>(@"images\scene\CommonButton\b_back"); Texture2D pressTexture = content.Load<Texture2D>(@"images\scene\CommonButton\b_back_clicked"); backButton = new Button(texture, null, pressTexture, new Vector2(403, 685)); backButton.Clicked += BackButtonClicked; Texture2D disableButton = content.Load<Texture2D>(@"images\scene\CommonButton\b_backward_disable"); texture = content.Load<Texture2D>(@"images\scene\CommonButton\b_backward"); pressTexture = content.Load<Texture2D>(@"images\scene\CommonButton\b_backward_clicked"); backwardButton = new ToggleButton(texture, null, pressTexture, disableButton, new Vector2(50, 510)); backwardButton.Clicked += BackwardButtonClicked; disableButton = content.Load<Texture2D>(@"images\scene\CommonButton\b_forward_disable"); texture = content.Load<Texture2D>(@"images\scene\CommonButton\b_forward"); pressTexture = content.Load<Texture2D>(@"images\scene\CommonButton\b_forward_clicked"); forwardButton = new ToggleButton(texture, null, pressTexture, disableButton, new Vector2(900, 510)); forwardButton.Clicked += ForwardButtonClicked; itemCard[0] = content.Load<Texture2D>(@"images\scene\HelpScene\oak_card"); itemCard[1] = content.Load<Texture2D>(@"images\scene\HelpScene\cactus_card"); itemCard[2] = content.Load<Texture2D>(@"images\scene\HelpScene\pineapple_card"); towerInGameTexture[0] = content.Load<Texture2D>(@"images\scene\HelpScene\oak_in_game"); towerInGameTexture[1] = content.Load<Texture2D>(@"images\scene\HelpScene\cactus_in_game"); towerInGameTexture[2] = content.Load<Texture2D>(@"images\scene\HelpScene\pineapple_in_game"); TowerLoadManager.LoadContent(content); hightlightSelectTexture = content.Load<Texture2D>(@"images\scene\CommonButton\highlight_select_card"); lockTexture = content.Load<Texture2D>(@"images\scene\CommonButton\lock_card"); helpFont = content.Load<SpriteFont>(@"fonts\HelpScene\helpScene"); towerLevelTexture[0] = OakTower.TEXTURE_LV1; towerLevelTexture[1] = OakTower.TEXTURE_LV2; towerLevelTexture[2] = OakTower.TEXTURE_LV3; }
public override void LoadContent() { ContentManager content = SceneManager.Game.Content; MapLoadManager.LoadAllMap(content, UserData.MAX_MAP_NUMBER); backgroundTexture = content.Load<Texture2D>(@"images\scene\SelectLevelScene\selectmaps"); backgroundPosition = new Vector2(0, 0); Texture2D texture = content.Load<Texture2D>(@"images\scene\CommonButton\b_back"); Texture2D pressTexture = content.Load<Texture2D>(@"images\scene\CommonButton\b_back_clicked"); backButton = new Button(texture, null, pressTexture, new Vector2(627, 685)); backButton.Clicked += BackButtonClicked; texture = content.Load<Texture2D>(@"images\scene\SelectLevelScene\b_start_game"); pressTexture = content.Load<Texture2D>(@"images\scene\SelectLevelScene\b_start_game_clicked"); startButton = new Button(texture, null, pressTexture, new Vector2(180, 685)); startButton.Clicked += StartButtonClicked; Texture2D disableButton = content.Load<Texture2D>(@"images\scene\CommonButton\b_backward_disable"); texture = content.Load<Texture2D>(@"images\scene\CommonButton\b_backward"); pressTexture = content.Load<Texture2D>(@"images\scene\CommonButton\b_backward_clicked"); backwardButton = new ToggleButton(texture, null, pressTexture, disableButton, new Vector2(50, 510)); backwardButton.Clicked += BackwardButtonClicked; disableButton = content.Load<Texture2D>(@"images\scene\CommonButton\b_forward_disable"); texture = content.Load<Texture2D>(@"images\scene\CommonButton\b_forward"); pressTexture = content.Load<Texture2D>(@"images\scene\CommonButton\b_forward_clicked"); forwardButton = new ToggleButton(texture, null, pressTexture, disableButton, new Vector2(900, 510)); forwardButton.Clicked += ForwardButtonClicked; PreviewScale = Math.Min(368/(float) MapLoadManager.getMap(0).BackgroundTexture.Width, 276/(float)MapLoadManager.getMap(0).BackgroundTexture.Height); lockTexture = content.Load<Texture2D>(@"images\scene\CommonButton\lock_card"); hightlightSelectTexture = content.Load<Texture2D>(@"images\scene\CommonButton\highlight_select_card"); selectLevelFont = content.Load<SpriteFont>(@"fonts\SelectLevelScene\select_level"); selectModeTexture = content.Load<Texture2D>(@"images\scene\SelectLevelScene\b_select_level"); UserData.currentMapMode = (int)Mode.Standard; }