Terraria
v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
SpawnConditionBestiaryInfoElement.cs
Go to the documentation of this file.
1
using
Microsoft.Xna.Framework
;
2
using
Microsoft.Xna.Framework.Graphics
;
3
using
ReLogic.Content
;
4
5
namespace
Terraria.GameContent.Bestiary
;
6
7
public
class
SpawnConditionBestiaryInfoElement
:
FilterProviderInfoElement
,
IBestiaryBackgroundImagePathAndColorProvider
,
IBestiaryPrioritizedElement
8
{
9
private
string
_backgroundImagePath
;
10
11
private
Color
?
_backgroundColor
;
12
13
public
float
OrderPriority
{
get
;
set
; }
14
15
public
SpawnConditionBestiaryInfoElement
(
string
nameLanguageKey,
int
filterIconFrame,
string
backgroundImagePath =
null
,
Color
? backgroundColor =
null
)
16
: base(nameLanguageKey, filterIconFrame)
17
{
18
_backgroundImagePath
= backgroundImagePath;
19
_backgroundColor
= backgroundColor;
20
}
21
22
public
Asset<Texture2D>
GetBackgroundImage
()
23
{
24
if
(
_backgroundImagePath
==
null
)
25
{
26
return
null
;
27
}
28
return
Main
.
Assets
.Request<
Texture2D
>(
_backgroundImagePath
, (
AssetRequestMode
)1);
29
}
30
31
public
Color
?
GetBackgroundColor
()
32
{
33
return
_backgroundColor
;
34
}
35
}
Microsoft.Xna.Framework.Graphics.Texture2D
Definition
Texture2D.cs:13
ReLogic.Content.Asset
Definition
Asset.cs:8
Terraria.GameContent.Bestiary.FilterProviderInfoElement
Definition
FilterProviderInfoElement.cs:11
Terraria.GameContent.Bestiary.SpawnConditionBestiaryInfoElement._backgroundColor
Color? _backgroundColor
Definition
SpawnConditionBestiaryInfoElement.cs:11
Terraria.GameContent.Bestiary.SpawnConditionBestiaryInfoElement.GetBackgroundImage
Asset< Texture2D > GetBackgroundImage()
Definition
SpawnConditionBestiaryInfoElement.cs:22
Terraria.GameContent.Bestiary.SpawnConditionBestiaryInfoElement.GetBackgroundColor
Color? GetBackgroundColor()
Definition
SpawnConditionBestiaryInfoElement.cs:31
Terraria.GameContent.Bestiary.SpawnConditionBestiaryInfoElement.SpawnConditionBestiaryInfoElement
SpawnConditionBestiaryInfoElement(string nameLanguageKey, int filterIconFrame, string backgroundImagePath=null, Color? backgroundColor=null)
Definition
SpawnConditionBestiaryInfoElement.cs:15
Terraria.GameContent.Bestiary.SpawnConditionBestiaryInfoElement._backgroundImagePath
string _backgroundImagePath
Definition
SpawnConditionBestiaryInfoElement.cs:9
Terraria.GameContent.Bestiary.SpawnConditionBestiaryInfoElement.OrderPriority
float OrderPriority
Definition
SpawnConditionBestiaryInfoElement.cs:13
Terraria.GameContent.Bestiary.SpawnConditionBestiaryInfoElement
Definition
SpawnConditionBestiaryInfoElement.cs:8
Terraria.Main.Assets
static IAssetRepository Assets
Definition
Main.cs:209
Terraria.Main
Definition
Main.cs:79
Terraria.GameContent.Bestiary.IBestiaryBackgroundImagePathAndColorProvider
Definition
IBestiaryBackgroundImagePathAndColorProvider.cs:8
Terraria.GameContent.Bestiary.IBestiaryPrioritizedElement
Definition
IBestiaryPrioritizedElement.cs:4
Microsoft.Xna.Framework.Graphics
Definition
AlphaTestEffect.cs:1
Microsoft.Xna.Framework
Definition
AlphaTestEffect.cs:1
ReLogic.Content.AssetRequestMode
AssetRequestMode
Definition
AssetRequestMode.cs:4
ReLogic.Content
Definition
IAssetReader.cs:5
Terraria.GameContent.Bestiary
Definition
BestiaryDatabase.cs:5
Microsoft.Xna.Framework.Color
Definition
Color.cs:12
source
Terraria.GameContent.Bestiary
SpawnConditionBestiaryInfoElement.cs
Generated by
1.10.0