public override void Draw(CustomSpriteBatch g) { AnimationSprite.Draw(g); }
public override void Draw(CustomSpriteBatch g) { g.Draw(sprRect, new Rectangle(0, 0, Constants.Width, Constants.Height), Color.FromNonPremultiplied(255, 255, 255, (int)((FadeIn / 150) * 255))); g.Draw(sprActiveBackground, Vector2.Zero, Color.FromNonPremultiplied(255, 255, 255, (int)((FadeInMessage / 150) * 255))); }
public override void BeginDraw(CustomSpriteBatch g) { }
public override void Draw(CustomSpriteBatch g) { g.GraphicsDevice.Clear(Color.Black); DrawRectangle(g, Vector2.Zero, new Vector2(Constants.Width, Constants.Height), Color.Black); DrawText(g, "Loading", new Vector2(10, 10), Color.White); }
public abstract void EndDraw(CustomSpriteBatch g);
public override void Draw(CustomSpriteBatch g) { Map.UnitDeploymentScreen.Draw(g); }
public override void Draw(CustomSpriteBatch g) { BattlePreview.DrawDisplayUnit(g); }
public void EndDraw(CustomSpriteBatch g) { }
public override void Draw(CustomSpriteBatch g) { g.Draw(sprMapMenuBackground, new Vector2(0, 0), Color.White); Unit ActiveUnit; int LineSpacing = 40; GameScreen.DrawBox(g, new Vector2(10, 5), 300, 40, Color.Black); g.DrawString(fntFinlanderFont, "Unit List", new Vector2(120, 10), Color.White); g.DrawString(fntFinlanderFont, MapUnitListCurrentPage + "/" + MapUnitListCurrentPageMax, new Vector2(420, 10), Color.White); GameScreen.DrawBox(g, new Vector2(10, 45), 620, 300, Color.White); g.DrawString(fntFinlanderFont, "Unit Name", new Vector2(70, 50), Color.Yellow); g.DrawString(fntFinlanderFont, "HP", new Vector2(400, 50), Color.Yellow); g.DrawString(fntFinlanderFont, "EN", new Vector2(510, 50), Color.Yellow); int UnitIndex = (MapUnitListCurrentPage - 1) * UnitListMaxPerPage; for (int U = 0; U + UnitIndex < ListMapMenuUnitPosition.Count && U < UnitListMaxPerPage; U++) { ActiveUnit = ListMapMenuUnitPosition[U + UnitIndex].Item1; g.Draw(ActiveUnit.SpriteMap, new Vector2(70, 90 + U * LineSpacing), Color.White); g.DrawString(fntFinlanderFont, ActiveUnit.FullName, new Vector2(110, 85 + U * LineSpacing), Color.White); GameScreen.DrawBar(g, sprBarLargeBackground, sprBarLargeHP, new Vector2(380, 100 + U * LineSpacing), ActiveUnit.HP, ActiveUnit.MaxHP); GameScreen.DrawTextRightAligned(g, ActiveUnit.HP + "/" + ActiveUnit.MaxHP, new Vector2(485, 95 + U * LineSpacing), Color.White); GameScreen.DrawBar(g, sprBarLargeBackground, sprBarLargeEN, new Vector2(505, 100 + U * LineSpacing), ActiveUnit.EN, ActiveUnit.MaxEN); GameScreen.DrawTextRightAligned(g, ActiveUnit.EN + "/" + ActiveUnit.MaxEN, new Vector2(610, 95 + U * LineSpacing), Color.White); } g.Draw(GameScreen.sprPixel, new Rectangle(30, 75 + MapUnitListChoice * LineSpacing, 590, 45), Color.FromNonPremultiplied(255, 255, 255, 127)); GameScreen.DrawBox(g, new Vector2(10, 395), 620, 80, Color.White); ActiveUnit = ListMapMenuUnitPosition[MapUnitListChoice].Item1; g.Draw(ActiveUnit.SpriteMap, new Vector2(20, 405), Color.White); g.DrawString(fntFinlanderFont, ActiveUnit.FullName, new Vector2(60, 400), Color.White); g.DrawString(fntFinlanderFont, ActiveUnit.PilotName, new Vector2(305, 400), Color.White); g.DrawString(fntFinlanderFont, "Pilot", new Vector2(250, 400), Color.Yellow); g.DrawString(fntFinlanderFont, "Lvl", new Vector2(445, 400), Color.Yellow); g.DrawString(fntFinlanderFont, ActiveUnit.PilotLevel.ToString(), new Vector2(490, 400), Color.White); g.DrawString(fntFinlanderFont, "Will", new Vector2(530, 400), Color.Yellow); g.DrawString(fntFinlanderFont, ActiveUnit.PilotMorale.ToString(), new Vector2(580, 400), Color.White); g.DrawString(fntFinlanderFont, "HP", new Vector2(15, 430), Color.Yellow); GameScreen.DrawBar(g, sprBarLargeBackground, sprBarLargeHP, new Vector2(80, 440), ActiveUnit.HP, ActiveUnit.MaxHP); GameScreen.DrawTextRightAligned(g, ActiveUnit.HP + "/" + ActiveUnit.MaxHP, new Vector2(185, 435), Color.White); g.DrawString(fntFinlanderFont, "EN", new Vector2(200, 430), Color.Yellow); GameScreen.DrawBar(g, sprBarLargeBackground, sprBarLargeEN, new Vector2(255, 440), ActiveUnit.EN, ActiveUnit.MaxEN); GameScreen.DrawTextRightAligned(g, ActiveUnit.EN + "/" + ActiveUnit.MaxEN, new Vector2(360, 435), Color.White); g.DrawString(fntFinlanderFont, "MV", new Vector2(375, 430), Color.Yellow); g.DrawString(fntFinlanderFont, ActiveUnit.MaxMovement.ToString(), new Vector2(420, 430), Color.White); int CurrentX = 445; if (ActiveUnit.ListTerrainChoices.Contains("Air")) { g.Draw(sprSky, new Vector2(CurrentX, 435), Color.White); CurrentX += 50; } if (ActiveUnit.ListTerrainChoices.Contains("Land")) { g.Draw(sprLand, new Vector2(CurrentX, 435), Color.White); CurrentX += 50; } if (ActiveUnit.ListTerrainChoices.Contains("Sea")) { g.Draw(sprSea, new Vector2(CurrentX, 435), Color.White); CurrentX += 50; } if (ActiveUnit.ListTerrainChoices.Contains("Space")) { g.Draw(sprSpace, new Vector2(CurrentX, 435), Color.White); CurrentX += 50; } }
public abstract void Draw(CustomSpriteBatch g, Matrix View, Matrix Projection, int ScreenWidth, int ScreenHeight);
public void BeginDraw(CustomSpriteBatch g) { }
public override void Draw(CustomSpriteBatch g) { //Draw the weapon selection menu. Map.DrawAttackPanel(g, Map.fntFinlanderFont, ActiveSquad.CurrentLeader, ListAttack, ActiveSquad.CurrentLeader.AttackIndex); }
public override void Draw(CustomSpriteBatch g) { DrawNextChoice(g); }
public override void Draw(CustomSpriteBatch g) { //Draw remaining movement count in the upper left corner GameScreen.DrawBox(g, new Vector2(30, 30), 50, 50, Color.Black); g.DrawString(Map.fntArial12, Movement.ToString(), new Vector2(37, 35), Color.White); }
public override void DrawRegular(CustomSpriteBatch g) { GameScreen.DrawLine(g, Collision.ListCollisionPolygon[0].ArrayVertex[0], Collision.ListCollisionPolygon[0].ArrayVertex[2], Color.Black, 3); }
public void Draw(CustomSpriteBatch g, Matrix View) { ArrowX.Draw(g, View); ArrowY.Draw(g, View); ArrowZ.Draw(g, View); }
public override void Draw(CustomSpriteBatch g) { g.Draw(Map.sprWaypoint, new Vector2((Map.CursorPosition.X - Map.CameraPosition.X) * Map.TileSize.X, (Map.CursorPosition.Y - Map.CameraPosition.Y) * Map.TileSize.Y), Color.White); }
public override void Draw(CustomSpriteBatch g) { DrawBox(g, new Vector2(LeftPanelX, PanelY), PanelWidth, PanelHeight, Color.White); DrawBox(g, new Vector2(LeftPanelX, PanelY), PanelWidth, 30, Color.White); DrawBox(g, new Vector2(LeftPanelX + PanelWidth - 132, PanelY + 3), 127, 24, Color.White); g.DrawStringRightAligned(fntText, "Available Mutators", new Vector2(LeftPanelX + PanelWidth - 15, PanelY + 6), Color.White); float DrawY = PanelY + 32; for (int M = AvailableMutatorsValue; M < ListAvailableMutators.Count; M++) { Mutator ActiveMutator = ListAvailableMutators[M]; g.DrawString(fntText, ActiveMutator.Name, new Vector2(LeftPanelX + 5, DrawY), Color.White); if (MouseHelper.MouseStateCurrent.X >= LeftPanelX && MouseHelper.MouseStateCurrent.X < LeftPanelX + PanelWidth - 20 && MouseHelper.MouseStateCurrent.Y >= DrawY && MouseHelper.MouseStateCurrent.Y < DrawY + 20) { g.Draw(sprPixel, new Rectangle(LeftPanelX + 5, (int)DrawY, PanelWidth - 30, 20), Color.FromNonPremultiplied(255, 255, 255, 127)); } if (M == SelectedAvailableMutatorsIndex) { g.Draw(sprPixel, new Rectangle(LeftPanelX + 5, (int)DrawY, PanelWidth - 30, 20), Color.FromNonPremultiplied(255, 255, 255, 127)); } DrawY += 20; if (DrawY >= PanelY + PanelHeight) { break; } } DrawBox(g, new Vector2(RightPanelX, PanelY), PanelWidth, PanelHeight, Color.White); DrawBox(g, new Vector2(RightPanelX, PanelY), PanelWidth, 30, Color.White); DrawBox(g, new Vector2(RightPanelX + PanelWidth - 115, PanelY + 3), 110, 24, Color.White); g.DrawStringRightAligned(fntText, "Active Mutators", new Vector2(RightPanelX + PanelWidth - 15, PanelY + 6), Color.White); DrawY = PanelY + 32; for (int M = AvailableMutatorsValue; M < ListActiveMutators.Count; M++) { Mutator ActiveMutator = ListActiveMutators[M]; g.DrawString(fntText, ActiveMutator.Name, new Vector2(RightPanelX + 5, DrawY), Color.White); if (MouseHelper.MouseStateCurrent.X >= RightPanelX && MouseHelper.MouseStateCurrent.X < RightPanelX + PanelWidth - 20 && MouseHelper.MouseStateCurrent.Y >= DrawY && MouseHelper.MouseStateCurrent.Y < DrawY + 20) { g.Draw(sprPixel, new Rectangle(RightPanelX + 5, (int)DrawY, PanelWidth - 30, 20), Color.FromNonPremultiplied(255, 255, 255, 127)); } if (M == SelectedActiveMutatorsIndex) { g.Draw(sprPixel, new Rectangle(RightPanelX + 5, (int)DrawY, PanelWidth - 30, 20), Color.FromNonPremultiplied(255, 255, 255, 127)); } DrawY += 20; if (DrawY >= PanelY + PanelHeight) { break; } } int DescriptionBoxY = PanelY + PanelHeight + 20; int DescriptionWidth = (int)(Constants.Width * 0.94); int DescriptionHeight = (int)(Constants.Height * 0.2); DrawBox(g, new Vector2(LeftPanelX, DescriptionBoxY), DescriptionWidth, DescriptionHeight, Color.White); DrawBox(g, new Vector2(LeftPanelX, DescriptionBoxY), DescriptionWidth, 30, Color.White); DrawBox(g, new Vector2(LeftPanelX + DescriptionWidth - 115, DescriptionBoxY + 3), 110, 24, Color.White); g.DrawStringRightAligned(fntText, "Mutator Details", new Vector2(LeftPanelX + DescriptionWidth - 15, DescriptionBoxY + 6), Color.White); if (ActiveMutator != null) { TextHelper.DrawTextMultiline(g, fntText, TextHelper.FitToWidth(fntText, ActiveMutator.Description, DescriptionWidth - 15), TextHelper.TextAligns.Left, LeftPanelX + DescriptionWidth / 2, DescriptionBoxY + 30, DescriptionWidth - 15); } foreach (IUIElement ActiveButton in ArrayMenuButton) { ActiveButton.Draw(g); } }
public void Draw(CustomSpriteBatch g) { ActiveSprite.Draw(g, 0, Position, 0, Color.White); }
public override void DrawExtraOnMap(CustomSpriteBatch g, Vector3 PositionY, Color UnitColor) { throw new System.NotImplementedException(); }
protected override void Initialize() { // Hook the idle event to constantly redraw our animation. Application.Idle += delegate { Invalidate(); }; this.SizeChanged += new System.EventHandler(this.BattleMapViewerControl_SizeChanged); Timer = new System.Diagnostics.Stopwatch(); Mouse.WindowHandle = this.Handle; BrushPlayer = Color.FromNonPremultiplied(30, 144, 255, 180); BrushEnemy = Color.FromNonPremultiplied(255, 0, 0, 180); BrushNeutral = Color.FromNonPremultiplied(255, 255, 0, 180); BrushAlly = Color.FromNonPremultiplied(191, 255, 0, 180); BrushMapSwitchEventPoint = Color.FromNonPremultiplied(191, 255, 0, 180); content = new ContentManager(Services, "Content"); g = new CustomSpriteBatch(new SpriteBatch(GraphicsDevice)); Helper = new MapScriptGUIHelper(); Helper.Load(content, g, GraphicsDevice); sprPixel = content.Load <Texture2D>("Pixel"); fntSpawnText = content.Load <SpriteFont>("Fonts/Calibri8"); this.sclMapWidth = new HScrollBar(); this.sclMapHeight = new VScrollBar(); // // sclMapWidth // this.sclMapWidth.Location = new System.Drawing.Point(0, 506); this.sclMapWidth.Name = "sclMapWidth"; this.sclMapWidth.Size = new System.Drawing.Size(650, 17); this.sclMapWidth.TabIndex = 3; this.sclMapWidth.Scroll += new ScrollEventHandler(this.sclMapWidth_Scroll); // // sclMapHeight // this.sclMapHeight.Location = new System.Drawing.Point(650, 0); this.sclMapHeight.Name = "sclMapHeight"; this.sclMapHeight.Size = new System.Drawing.Size(17, 506); this.sclMapHeight.TabIndex = 4; this.sclMapHeight.Scroll += new ScrollEventHandler(this.sclMapHeight_Scroll); Controls.Add(this.sclMapWidth); Controls.Add(this.sclMapHeight); this.cmsScriptMenu = new ContextMenuStrip(); this.tsmDeleteScript = new ToolStripMenuItem(); // // cmsScriptMenu // this.cmsScriptMenu.Items.AddRange(new ToolStripItem[] { this.tsmDeleteScript }); this.cmsScriptMenu.Name = "cmsScriptMenu"; this.cmsScriptMenu.Size = new System.Drawing.Size(141, 26); // // tsmDeleteScript // this.tsmDeleteScript.Name = "tsmDeleteScript"; this.tsmDeleteScript.Size = new System.Drawing.Size(140, 22); this.tsmDeleteScript.Text = "Delete Script"; this.tsmDeleteScript.Click += tsmDeleteScript_Click; }
public override void DrawTimeOfDayOverlayOnMap(CustomSpriteBatch g, Vector3 Position, int TimeOfDay) { throw new System.NotImplementedException(); }
public abstract void BeginDraw(CustomSpriteBatch g);
public override void Draw(CustomSpriteBatch g) { UnitSpawner.Draw(g); }
public override void EndDraw(CustomSpriteBatch g) { }
public override void Draw(CustomSpriteBatch g) { //Play coins animation }
public override void Draw(CustomSpriteBatch g) { throw new NotImplementedException(); }
public virtual void Draw(CustomSpriteBatch g) { }
public override void Draw(CustomSpriteBatch g, bool IsInEditMode) { }
private void DrawUpgradeMenu(CustomSpriteBatch g) { g.Draw(sprMapMenuBackground, new Vector2(0, 0), Color.White); g.DrawString(fntFinlanderFont, "UNIT UPGRADE", new Vector2(10, 10), Color.White); g.Draw(SelectedUnit.SpriteMap, new Vector2(20, 50), Color.White); g.DrawString(fntFinlanderFont, SelectedUnit.RelativePath, new Vector2(60, 50), Color.White); g.Draw(sprPixel, new Rectangle(60, 75, (int)fntFinlanderFont.MeasureString(SelectedUnit.RelativePath).X, 1), Color.FromNonPremultiplied(173, 216, 230, 190)); g.Draw(SelectedUnit.SpriteUnit, new Vector2(250 - SelectedUnit.SpriteUnit.Width, 280 - SelectedUnit.SpriteUnit.Height), Color.White); int Y = 350; DrawBox(g, new Vector2(5, Y), 450, 120, Color.Black); DrawBox(g, new Vector2(455, Y), 180, 120, Color.Black); g.DrawString(fntFinlanderFont, "HP", new Vector2(15, Y += 5), Color.White); g.DrawString(fntFinlanderFont, SelectedUnit.MaxHP.ToString(), new Vector2(150, Y), Color.White); SelectedUnit.UnitStat.HPUpgrades.Value += HPUpgradeCount; g.DrawString(fntFinlanderFont, SelectedUnit.MaxHP.ToString(), new Vector2(240, Y), Color.White); SelectedUnit.UnitStat.HPUpgrades.Value -= HPUpgradeCount; DrawUpgradeBar(g, Y, SelectedUnit.UnitStat.HPUpgrades.Value, HPUpgradeCount); g.DrawString(fntFinlanderFont, "EN", new Vector2(15, Y += fntFinlanderFont.LineSpacing), Color.White); g.DrawString(fntFinlanderFont, SelectedUnit.MaxEN.ToString(), new Vector2(150, Y), Color.White); SelectedUnit.UnitStat.ENUpgrades.Value += ENUpgradeCount; g.DrawString(fntFinlanderFont, SelectedUnit.MaxEN.ToString(), new Vector2(240, Y), Color.White); SelectedUnit.UnitStat.ENUpgrades.Value -= ENUpgradeCount; DrawUpgradeBar(g, Y, SelectedUnit.UnitStat.ENUpgrades.Value, ENUpgradeCount); g.DrawString(fntFinlanderFont, "Armor", new Vector2(15, Y += fntFinlanderFont.LineSpacing), Color.White); g.DrawString(fntFinlanderFont, SelectedUnit.Armor.ToString(), new Vector2(150, Y), Color.White); SelectedUnit.UnitStat.ArmorUpgrades.Value += ArmorUpgradeCount; g.DrawString(fntFinlanderFont, SelectedUnit.Armor.ToString(), new Vector2(240, Y), Color.White); SelectedUnit.UnitStat.ArmorUpgrades.Value -= ArmorUpgradeCount; DrawUpgradeBar(g, Y, SelectedUnit.UnitStat.ArmorUpgrades.Value, ArmorUpgradeCount); g.DrawString(fntFinlanderFont, "Mobility", new Vector2(15, Y += fntFinlanderFont.LineSpacing), Color.White); g.DrawString(fntFinlanderFont, SelectedUnit.Mobility.ToString(), new Vector2(150, Y), Color.White); SelectedUnit.UnitStat.MobilityUpgrades.Value += MobilityUpgradeCount; g.DrawString(fntFinlanderFont, SelectedUnit.Mobility.ToString(), new Vector2(240, Y), Color.White); SelectedUnit.UnitStat.MobilityUpgrades.Value -= MobilityUpgradeCount; DrawUpgradeBar(g, Y, SelectedUnit.UnitStat.MobilityUpgrades.Value, MobilityUpgradeCount); g.DrawString(fntFinlanderFont, "Attacks", new Vector2(15, Y += fntFinlanderFont.LineSpacing), Color.White); DrawUpgradeBar(g, Y, SelectedUnit.UnitStat.AttackUpgrades.Value, AttackUpgradeCount); if (UpgradeChoice == UpgradeChoices.Attacks) { AttackPicker.DrawTopAttackPanel(g, fntFinlanderFont, SelectedUnit, ListAttack, 0, false); int YStart = 115; int YStep = 25; g.DrawString(fntFinlanderFont, "Power", new Vector2(350, YStart - 25), Color.Yellow); for (int i = 0; i < ListAttack.Count && i <= 8; i++) { int CurrentPower = ListAttack[i].GetPower(SelectedUnit, ActiveParser); SelectedUnit.UnitStat.AttackUpgrades.Value += AttackUpgradeCount; int NextPower = ListAttack[i].GetPower(SelectedUnit, ActiveParser); SelectedUnit.UnitStat.AttackUpgrades.Value -= AttackUpgradeCount; g.DrawStringRightAligned(fntFinlanderFont, CurrentPower.ToString(), new Vector2(400, YStart + i * YStep), Color.White); g.DrawString(fntFinlanderFont, "-> " + NextPower.ToString(), new Vector2(410, YStart + i * YStep), Color.White); g.DrawStringRightAligned(fntFinlanderFont, "(+" + (NextPower - CurrentPower).ToString() + ")", new Vector2(620, YStart + i * YStep), Color.White); } } Y = 360 + (int)UpgradeChoice * fntFinlanderFont.LineSpacing; DrawRectangle(g, new Vector2(15, Y), new Vector2(452, Y + fntFinlanderFont.LineSpacing), Color.Yellow); Y = 350; g.DrawString(fntFinlanderFont, "Money", new Vector2(460, Y += 5), Color.White); g.DrawStringRightAligned(fntFinlanderFont, Constants.Money.ToString(), new Vector2(625, Y), Color.White); g.DrawString(fntFinlanderFont, "Cost", new Vector2(460, Y += 40), Color.White); g.DrawStringRightAligned(fntFinlanderFont, UpgradeTotalCost.ToString(), new Vector2(625, Y), Color.White); g.DrawString(fntFinlanderFont, "Result", new Vector2(460, Y += 40), Color.White); g.DrawStringRightAligned(fntFinlanderFont, (Constants.Money - UpgradeTotalCost).ToString(), new Vector2(625, Y), Color.White); }