Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ DrawMapIcon()

bool Terraria.GameContent.CoinLossRevengeSystem.RevengeMarker.DrawMapIcon ( SpriteBatch spriteBatch,
Vector2 mapTopLeft,
Vector2 mapX2Y2AndOff,
Rectangle? mapRect,
float mapScale,
float drawScale,
int gameTime )
inline

Definition at line 253 of file CoinLossRevengeSystem.cs.

254 {
256 vector *= mapScale;
258 if (mapRect.HasValue && !mapRect.Value.Contains(vector.ToPoint()))
259 {
260 return false;
261 }
262 Texture2D value = TextureAssets.MapDeath.Value;
263 value = ((_coinsValue < 100) ? TextureAssets.Coin[0].Value : ((_coinsValue < 10000) ? TextureAssets.Coin[1].Value : ((_coinsValue >= 1000000) ? TextureAssets.Coin[3].Value : TextureAssets.Coin[2].Value)));
264 Rectangle rectangle = value.Frame(1, 8);
265 spriteBatch.Draw(value, vector, rectangle, Color.White, 0f, rectangle.Size() / 2f, drawScale, SpriteEffects.None, 0f);
266 return Utils.CenteredRectangle(vector, rectangle.Size() * drawScale).Contains(Main.MouseScreen.ToPoint());
267 }
void Draw(Texture2D texture, Vector2 position, Color color)
bool ICollection< KeyValuePair< TKey, TValue > >. Contains(KeyValuePair< TKey, TValue > keyValuePair)

References Terraria.GameContent.CoinLossRevengeSystem.RevengeMarker._coinsValue, Terraria.GameContent.CoinLossRevengeSystem.RevengeMarker._location, Terraria.Utils.CenteredRectangle(), Terraria.GameContent.TextureAssets.Coin, Microsoft.Xna.Framework.Contains, System.Collections.Generic.Dictionary< TKey, TValue >.Contains(), Microsoft.Xna.Framework.Graphics.SpriteBatch.Draw(), Terraria.GameContent.TextureAssets.MapDeath, Terraria.Main.MouseScreen, System.value, and Microsoft.Xna.Framework.Color.White.