public override void LoadContent() { base.LoadContent(); this.mBlankTexture = this.ContentManager.Load<Texture2D>("Sprites/Blank"); this.mButtonMenuComponent = new ButtonMenuComponent(this.ScreenSize); this.mButtonMenuComponent.LoadContent(this.ContentManager); this.mButtonMenuComponent.MenuButtons.Add(this.mMenuButtonTravel); var lShopSectionInfos = this.ContentManager.Load<ShopSectionInfo[]>("GraphicsData/Shop/ShopSectionInfos"); // // mQueenSectionComponent // this.mQueenSectionComponent = new ShopSectionComponent(lShopSectionInfos[sQueenSectionId]); this.mQueenSectionComponent.Tag = new Func<IGameScreen>(() => new ShopQueenSectionScreen()); this.mQueenSectionComponent.LoadContent(this.ContentManager); this.mQueenSectionComponent.Click += this.ShopSectionComponent_Click; // // mSuperSectionComponent // this.mSuperSectionComponent = new ShopSectionComponent(lShopSectionInfos[sSuperSectionId]); this.mSuperSectionComponent.Tag = new Func<IGameScreen>(() => new ShopSuperSectionScreen()); this.mSuperSectionComponent.LoadContent(this.ContentManager); this.mSuperSectionComponent.Click += this.ShopSectionComponent_Click; // // mFieldSectionComponent // this.mFieldSectionComponent = new ShopSectionComponent(lShopSectionInfos[sFieldSectionId]); this.mFieldSectionComponent.Tag = new Func<IGameScreen>(() => new ShopFieldSectionScreen()); this.mFieldSectionComponent.LoadContent(this.ContentManager); this.mFieldSectionComponent.Click += this.ShopSectionComponent_Click; // // mExtractionSectionComponent // this.mExtractionSectionComponent = new ShopSectionComponent(lShopSectionInfos[sExtractionSectionId]); this.mExtractionSectionComponent.Tag = new Func<IGameScreen>(() => new ShopExtractionSectionScreen()); this.mExtractionSectionComponent.LoadContent(this.ContentManager); this.mExtractionSectionComponent.Click += this.ShopSectionComponent_Click; // // mMarketSectionComponent // this.mMarketSectionComponent = new ShopSectionComponent(lShopSectionInfos[sMarketSectionId]); this.mMarketSectionComponent.Tag = new Func<IGameScreen>(() => new ShopMarketSectionScreen()); this.mMarketSectionComponent.LoadContent(this.ContentManager); this.mMarketSectionComponent.Click += this.ShopSectionComponent_Click; // // mBottlesSectionComponent // this.mBottlesSectionComponent = new ShopSectionComponent(lShopSectionInfos[sBottlesSectionId]); this.mBottlesSectionComponent.Tag = new Func<IGameScreen>(() => new ShopBottlesSectionScreen()); this.mBottlesSectionComponent.LoadContent(this.ContentManager); this.mBottlesSectionComponent.Click += this.ShopSectionComponent_Click; // // mHudComponent // this.mHudComponent = new ShopScreenHudComponent(this.ScreenManager.BeeWorldManager, this.ScreenSize); this.mHudComponent.LoadContent(this.ContentManager); }
public override void LoadContent() { base.LoadContent(); this.mPlayerManager = this.ScreenManager.BeeWorldManager.PlayerManager; this.mPlayer = this.mPlayerManager.Player; this.mBlankTexture = this.ContentManager.Load<Texture2D>("Sprites/Blank"); this.mQueenBeeRepository = new QueenBeeRepository(this.ContentManager); this.mHudComponent = new ShopScreenHudComponent(this.ScreenManager.BeeWorldManager, this.ScreenSize); this.mHudComponent.LoadContent(this.ContentManager); this.mConfirmationDialogComponent = new ConfirmationDialogComponent(this.ScreenSize); this.mConfirmationDialogComponent.LoadContent(this.ContentManager); this.mConfirmationDialogComponent.CancelText = "No"; this.mConfirmationDialogComponent.ConfirmText = "Yes"; this.mConfirmationDialogComponent.Cancel += this.ConfirmationDialogComponent_Cancel; this.mConfirmationDialogComponent.Confirm += this.ConfirmationDialogComponent_Confirm; this.mButtonMenuComponent = new ButtonMenuComponent(this.ScreenSize); this.mButtonMenuComponent.LoadContent(this.ContentManager); this.mButtonMenuComponent.MenuButtons.Add(this.mMenuButtonBuy); this.mButtonMenuComponent.MenuButtons.Add(this.mMenuButtonBack); this.mMiddleItemComponent.LoadContent(this.ContentManager); this.mMiddleItemComponent.IconTexture = this.mBlankTexture; this.mMiddleItemComponent.Size = this.mItemSize; this.mMiddleItemComponent.Position = new Vector2( (this.ScreenSize.X - this.mItemSize.X) / 2f, (this.ScreenSize.Y - this.mItemSize.Y - this.mHudComponent.Size.Y) / 2f); this.mMiddleItemComponent.Price = 2; this.mMiddleItemComponent.Click += this.SelectItemComponent; this.mTopItemComponent.LoadContent(this.ContentManager); this.mTopItemComponent.IconTexture = this.mBlankTexture; this.mTopItemComponent.Size = this.mItemSize; this.mTopItemComponent.Position = new Vector2( this.mMiddleItemComponent.Position.X, this.mMiddleItemComponent.Position.Y - sItemPadding - this.mItemSize.Y); this.mTopItemComponent.Price = 1; this.mTopItemComponent.Click += this.SelectItemComponent; this.mBottomItemComponent.LoadContent(this.ContentManager); this.mBottomItemComponent.IconTexture = this.mBlankTexture; this.mBottomItemComponent.Size = this.mItemSize; this.mBottomItemComponent.Position = this.mBottomItemComponent.Position = new Vector2( this.mMiddleItemComponent.Position.X, this.mMiddleItemComponent.Position.Y + this.mItemSize.Y + sItemPadding); this.mBottomItemComponent.Price = 3; this.mBottomItemComponent.Click += this.SelectItemComponent; }
public override void LoadContent() { base.LoadContent(); this.mPlayerManager = this.ScreenManager.BeeWorldManager.PlayerManager; this.mPlayer = this.mPlayerManager.Player; this.mSuperPaintRepository = new SuperPaintRepository(this.ContentManager); this.mSuperRepository = new SuperRepository(this.ContentManager); this.mBlankTexture = this.ContentManager.Load<Texture2D>("Sprites/Blank"); this.mConfirmationDialogComponent = new ConfirmationDialogComponent(this.ScreenSize); this.mConfirmationDialogComponent.LoadContent(this.ContentManager); this.mConfirmationDialogComponent.CancelText = "No"; this.mConfirmationDialogComponent.ConfirmText = "Yes"; this.mConfirmationDialogComponent.Confirm += this.ConfirmationDialogComponent_Confirm; this.mConfirmationDialogComponent.Cancel += this.ConfirmationDialogComponent_Cancel; this.mButtonMenuComponent = new ButtonMenuComponent(this.ScreenSize); this.mButtonMenuComponent.LoadContent(this.ContentManager); this.mButtonMenuComponent.MenuButtons.Add(this.mMenuButtonBuy); this.mButtonMenuComponent.MenuButtons.Add(this.mMenuButtonBack); // // mHudComponent // this.mHudComponent = new ShopScreenHudComponent(this.ScreenManager.BeeWorldManager, this.ScreenSize); this.mHudComponent.LoadContent(this.ContentManager); // // mMiddleSuperItemComponent // this.mMiddleSuperItemComponent.LoadContent(this.ContentManager); this.mMiddleSuperItemComponent.IconTexture = this.mBlankTexture; this.mMiddleSuperItemComponent.Size = this.mSuperItemSize; this.mMiddleSuperItemComponent.Position = new Vector2( ((this.ScreenSize.X - this.mSuperItemSize.X - this.mSuperPaintItemSize.X)/2f), ((this.ScreenSize.Y - this.mSuperItemSize.Y - this.mHudComponent.Size.Y)/2f)); this.mMiddleSuperItemComponent.NameText = "Middle"; this.mMiddleSuperItemComponent.DescriptionText = "This is the middle item."; this.mMiddleSuperItemComponent.Price = 2; this.mMiddleSuperItemComponent.Click += this.SelectItemComponent; this.PopulateItemComponent( this.mMiddleSuperItemComponent, this.mSuperRepository.GetMetaObject(1)); this.mTopSuperItemComponent.LoadContent(this.ContentManager); this.mTopSuperItemComponent.IconTexture = this.mBlankTexture; this.mTopSuperItemComponent.Size = this.mSuperItemSize; this.mTopSuperItemComponent.Position = new Vector2( this.mMiddleSuperItemComponent.Position.X, this.mMiddleSuperItemComponent.Position.Y - sItemPadding - this.mSuperItemSize.Y); this.mTopSuperItemComponent.NameText = "Top"; this.mTopSuperItemComponent.DescriptionText = "This is the top item."; this.mTopSuperItemComponent.Price = 1; this.mTopSuperItemComponent.Click += this.SelectItemComponent; this.PopulateItemComponent( this.mTopSuperItemComponent, this.mSuperRepository.GetMetaObject(0)); this.mBottomSuperItemComponent.LoadContent(this.ContentManager); this.mBottomSuperItemComponent.IconTexture = this.mBlankTexture; this.mBottomSuperItemComponent.Size = this.mSuperItemSize; this.mBottomSuperItemComponent.Position = this.mBottomSuperItemComponent.Position = new Vector2( this.mMiddleSuperItemComponent.Position.X, this.mMiddleSuperItemComponent.Position.Y + this.mSuperItemSize.Y + sItemPadding); this.mBottomSuperItemComponent.NameText = "Right"; this.mBottomSuperItemComponent.DescriptionText = "This is the bottom item."; this.mBottomSuperItemComponent.Price = 3; this.mBottomSuperItemComponent.Click += this.SelectItemComponent; this.PopulateItemComponent( this.mBottomSuperItemComponent, this.mSuperRepository.GetMetaObject(2)); this.mTopSuperPaintItemComponent.LoadContent(this.ContentManager); this.mTopSuperPaintItemComponent.IconTexture = this.mBlankTexture; this.mTopSuperPaintItemComponent.Size = this.mSuperPaintItemSize; this.mTopSuperPaintItemComponent.Position = new Vector2( this.mTopSuperItemComponent.Position.X + this.mSuperItemSize.X + sItemPadding, this.mTopSuperItemComponent.Position.Y); this.mTopSuperPaintItemComponent.NameText = "Top"; this.mTopSuperPaintItemComponent.DescriptionText = "This is the top item."; this.mTopSuperPaintItemComponent.Price = 4; this.mTopSuperPaintItemComponent.Click += this.SelectItemComponent; this.mMiddleTopSuperPaintItemComponent.LoadContent(this.ContentManager); this.mMiddleTopSuperPaintItemComponent.IconTexture = this.mBlankTexture; this.mMiddleTopSuperPaintItemComponent.Size = this.mSuperPaintItemSize; this.mMiddleTopSuperPaintItemComponent.Position = new Vector2( this.mTopSuperPaintItemComponent.Position.X, this.mTopSuperPaintItemComponent.Position.Y + this.mSuperPaintItemSize.Y + sItemPadding); this.mMiddleTopSuperPaintItemComponent.NameText = "Middle Top"; this.mMiddleTopSuperPaintItemComponent.DescriptionText = "This is the middle-top item."; this.mMiddleTopSuperPaintItemComponent.Price = 5; this.mMiddleTopSuperPaintItemComponent.Click += this.SelectItemComponent; this.mMiddleBottomSuperPaintItemComponent.LoadContent(this.ContentManager); this.mMiddleBottomSuperPaintItemComponent.IconTexture = this.mBlankTexture; this.mMiddleBottomSuperPaintItemComponent.Size = this.mSuperPaintItemSize; this.mMiddleBottomSuperPaintItemComponent.Position = new Vector2( this.mTopSuperPaintItemComponent.Position.X, this.mMiddleTopSuperPaintItemComponent.Position.Y + this.mSuperPaintItemSize.Y + sItemPadding); this.mMiddleBottomSuperPaintItemComponent.NameText = "Middle Bottom"; this.mMiddleBottomSuperPaintItemComponent.DescriptionText = "This is the middle-bottom item."; this.mMiddleBottomSuperPaintItemComponent.Price = 6; this.mMiddleBottomSuperPaintItemComponent.Click += this.SelectItemComponent; this.mBottomSuperPaintItemComponent.LoadContent(this.ContentManager); this.mBottomSuperPaintItemComponent.IconTexture = this.mBlankTexture; this.mBottomSuperPaintItemComponent.Size = this.mSuperPaintItemSize; this.mBottomSuperPaintItemComponent.Position = new Vector2( this.mTopSuperPaintItemComponent.Position.X, this.mMiddleBottomSuperPaintItemComponent.Position.Y + this.mSuperPaintItemSize.Y + sItemPadding); this.mBottomSuperPaintItemComponent.NameText = "Bottom"; this.mBottomSuperPaintItemComponent.DescriptionText = "This is the bottom item."; this.mBottomSuperPaintItemComponent.Price = 7; this.mBottomSuperPaintItemComponent.Click += this.SelectItemComponent; }