//todo internal static void DrawTopMenuBarAttributes() { float textScale = .25f; var heroAttribute = new DebugLib.TextBoxString(); List<TextBoxString> heroAttributeList = new List<TextBoxString>(); string emptyString = " "; heroAttribute.mStringPosition = new Vector2(TopMenuBar.WindowFrameRectangle.X + mSpriteFont.MeasureString(" ").X + 500, TopMenuBar.WindowFrameRectangle.Y + 5); emptyString = "Wave Number: " + WaveController.WaveNumber + " Castle Damodred: " + mCastle.CastleAttribute.CurrentHealthPoints + "/" + mCastle.CastleAttribute.MaxHealthPoints + " Exp: " + mHero.HeroAttribute.Experience + "/" + mHero.HeroAttribute.CalculateAmountOfExperienceToLevel() + " Gold: " + mHero.HeroAttribute.Gold; WriteLine(ref heroAttribute, textScale, emptyString, heroAttributeList); emptyString = " "; foreach (var textBoxString in heroAttributeList) { spriteBatch.DrawString(mSpriteFont, textBoxString.mStringValue, textBoxString.mStringPosition, Color.White, 0.0f, Vector2.Zero, textScale, SpriteEffects.None, 0.0f); } }
internal static void DrawUpgradeUnitAttributes() { float textScale = .25f; var upgradeUnitAttribute = new DebugLib.TextBoxString(); List<TextBoxString> gameObjectAttributeList = new List<TextBoxString>(); string emptyString; upgradeUnitAttribute.mStringPosition = new Vector2(StatusWindow.WindowFrameRectangle.X + mSpriteFont.MeasureString(" ").X, StatusWindow.WindowFrameRectangle.Y + 15); emptyString = " "; PrintUpgradeUnitAttributes(ref textScale, ref upgradeUnitAttribute, ref gameObjectAttributeList, ref emptyString); foreach (var textBoxString in gameObjectAttributeList) { spriteBatch.DrawString(mSpriteFont, textBoxString.mStringValue, textBoxString.mStringPosition, Color.White, 0.0f, Vector2.Zero, textScale, SpriteEffects.None, 0.0f); } }
internal static void DrawSelectedUnit() { float textScale = .25f; var gameObjectAttribute = new DebugLib.TextBoxString(); List<TextBoxString> gameObjectAttributeList = new List<TextBoxString>(); string gameObjectAttributeString = " "; gameObjectAttribute.mStringPosition = new Vector2(StatusWindow.WindowFrameRectangle.X + mSpriteFont.MeasureString(" ").X, StatusWindow.WindowFrameRectangle.Y + 15); gameObjectAttributeString = " "; switch (tempObject.Hostility) { case Hostility.ENEMY: Enemy tempCastEnemy = (Enemy)tempObject; PrintEnemyAttributes(ref textScale, ref gameObjectAttribute, ref gameObjectAttributeList, ref gameObjectAttributeString, tempCastEnemy); break; case Hostility.FRIENDLY: if (tempObject is Friendly) { Friendly tempCastFriendly = (Friendly)tempObject; PrintFriendlyAttributes(ref textScale, ref gameObjectAttribute, ref gameObjectAttributeList, ref gameObjectAttributeString, tempCastFriendly); // Print Color gameObjectAttributeString = "Color: " + tempCastFriendly.Color.ToString(); WriteLine(ref gameObjectAttribute, textScale, gameObjectAttributeString, gameObjectAttributeList); } else if (tempObject is Hero) { Hero tempHero = (Hero)tempObject; PrintHeroAttributes(ref textScale, ref gameObjectAttribute, ref gameObjectAttributeList, ref gameObjectAttributeString, tempHero); } break; case Hostility.CASTLE: Castle tempCastle = (Castle)tempObject; PrintCastleAttributes(ref textScale, ref gameObjectAttribute, ref gameObjectAttributeList, ref gameObjectAttributeString, tempCastle); break; case Hostility.STRUCTURE: Structure tempStructure = (Structure)tempObject; PrintStructureAttributes(ref textScale, ref gameObjectAttribute, ref gameObjectAttributeList, ref gameObjectAttributeString, tempStructure); break; default: break; } foreach (var textBoxString in gameObjectAttributeList) { spriteBatch.DrawString(mSpriteFont, textBoxString.mStringValue, textBoxString.mStringPosition, Color.White, 0.0f, Vector2.Zero, textScale, SpriteEffects.None, 0.0f); } }