private void DrawStoppedTroop(SpriteBatch spriteBatch, Point viewportSize, Troop troop) { Rectangle? nullable; Color white = Color.White; if ((this.screen.DrawingSelector && (troop.Status == TroopStatus.一般)) && this.screen.Scenario.IsCurrentPlayer(troop.BelongedFaction) && !troop.Operated) { Point positionByPoint = this.screen.GetPositionByPoint(this.screen.SelectorStartPosition); Point point2 = this.screen.GetPositionByPoint(this.screen.MousePosition); Rectangle r = new Rectangle( Math.Min(point2.X, positionByPoint.X), Math.Min(point2.Y, positionByPoint.Y), Math.Abs(point2.X - positionByPoint.X), Math.Abs(point2.Y - positionByPoint.Y)); if (r.Contains(troop.Position)) { white = Color.Blue; } } if (troop.CurrentOutburstKind == OutburstKind.愤怒) { white = Color.Red; } else if (troop.CurrentOutburstKind == OutburstKind.沉静) { white = Color.Green; } spriteBatch.Draw(troop.TroopTexture, this.mainMapLayer.Tiles[troop.Position.X, troop.Position.Y].Destination, new Rectangle?(troop.GetCurrentStopDisplayRectangle(troop.TroopTexture.Width / troop.CurrentAnimation.FrameCount)), white, 0f, Vector2.Zero, SpriteEffects.None, 0.7f); if (this.screen.SelectorTroops.HasGameObject(troop.ID)) { nullable = null; spriteBatch.Draw(this.screen.Textures.TileFrameTextures[4], this.mainMapLayer.Tiles[troop.Position.X, troop.Position.Y].Destination, nullable, Color.White, 0f, Vector2.Zero, SpriteEffects.None, 0.699f); } if (troop.Surrounding) { nullable = null; spriteBatch.Draw(this.screen.Textures.TileFrameTextures[4], this.mainMapLayer.Tiles[troop.Position.X, troop.Position.Y].Destination, nullable, Color.White, 0f, Vector2.Zero, SpriteEffects.None, 0.699f); } if (troop.Status != TroopStatus.一般) { spriteBatch.Draw(troop.StatusTileAnimation.Texture, this.mainMapLayer.Tiles[troop.Position.X, troop.Position.Y].Destination, new Rectangle?(troop.GetStatusTroopTileAnimationRectangle(troop.StatusTileAnimation.Texture.Width / troop.StatusTileAnimation.FrameCount)), Color.White, 0f, Vector2.Zero, SpriteEffects.None, 0.6998f); } if (troop.CurrentStunt != null) { spriteBatch.Draw(troop.StuntTileAnimation.Texture, this.mainMapLayer.Tiles[troop.Position.X, troop.Position.Y].Destination, new Rectangle?(troop.GetStuntTroopTileAnimationRectangle(troop.StuntTileAnimation.Texture.Width / troop.StuntTileAnimation.FrameCount)), Color.White, 0f, Vector2.Zero, SpriteEffects.None, 0.6998f); } if ((this.screen.CurrentTroop == troop) && (this.screen.UndoneWorks.Peek().Kind == UndoneWorkKind.ContextMenu)) { foreach (Point point3 in troop.OffenceArea.Area) { if (this.mainMapLayer.TileInScreen(point3)) { nullable = null; spriteBatch.Draw(this.screen.Textures.TileFrameTextures[2], this.mainMapLayer.Tiles[point3.X, point3.Y].Destination, nullable, Color.White, 0f, Vector2.Zero, SpriteEffects.None, 0.7f); } } } }