Terraria
v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
NPCHeadDrawRenderTargetContent.cs
Go to the documentation of this file.
1
using
Microsoft.Xna.Framework
;
2
using
Microsoft.Xna.Framework.Graphics
;
3
4
namespace
Terraria.GameContent
;
5
6
public
class
NPCHeadDrawRenderTargetContent
:
AnOutlinedDrawRenderTargetContent
7
{
8
private
Texture2D
_theTexture
;
9
10
public
void
SetTexture
(
Texture2D
texture)
11
{
12
if
(
_theTexture
!= texture)
13
{
14
_theTexture
= texture;
15
_wasPrepared
=
false
;
16
width
= texture.Width + 8;
17
height
= texture.Height + 8;
18
}
19
}
20
21
internal
override
void
DrawTheContent
(
SpriteBatch
spriteBatch)
22
{
23
spriteBatch.
Draw
(
_theTexture
,
new
Vector2
(4f, 4f),
null
,
Color
.
White
, 0f,
Vector2
.
Zero
, 1f,
SpriteEffects
.None, 0f);
24
}
25
}
Microsoft.Xna.Framework.Graphics.SpriteBatch.Draw
void Draw(Texture2D texture, Vector2 position, Color color)
Definition
SpriteBatch.cs:397
Microsoft.Xna.Framework.Graphics.SpriteBatch
Definition
SpriteBatch.cs:8
Microsoft.Xna.Framework.Graphics.Texture2D
Definition
Texture2D.cs:13
Terraria.GameContent.ARenderTargetContentByRequest._wasPrepared
bool _wasPrepared
Definition
ARenderTargetContentByRequest.cs:10
Terraria.GameContent.AnOutlinedDrawRenderTargetContent.height
int height
Definition
AnOutlinedDrawRenderTargetContent.cs:11
Terraria.GameContent.AnOutlinedDrawRenderTargetContent.width
int width
Definition
AnOutlinedDrawRenderTargetContent.cs:9
Terraria.GameContent.AnOutlinedDrawRenderTargetContent
Definition
AnOutlinedDrawRenderTargetContent.cs:8
Terraria.GameContent.NPCHeadDrawRenderTargetContent._theTexture
Texture2D _theTexture
Definition
NPCHeadDrawRenderTargetContent.cs:8
Terraria.GameContent.NPCHeadDrawRenderTargetContent.SetTexture
void SetTexture(Texture2D texture)
Definition
NPCHeadDrawRenderTargetContent.cs:10
Terraria.GameContent.NPCHeadDrawRenderTargetContent.DrawTheContent
override void DrawTheContent(SpriteBatch spriteBatch)
Definition
NPCHeadDrawRenderTargetContent.cs:21
Terraria.GameContent.NPCHeadDrawRenderTargetContent
Definition
NPCHeadDrawRenderTargetContent.cs:7
Microsoft.Xna.Framework.Graphics.SurfaceFormat.Vector2
@ Vector2
Microsoft.Xna.Framework.Graphics.SpriteEffects
SpriteEffects
Definition
SpriteEffects.cs:7
Microsoft.Xna.Framework.Graphics
Definition
AlphaTestEffect.cs:1
Microsoft.Xna.Framework
Definition
AlphaTestEffect.cs:1
Terraria.GameContent
Definition
AchievementsHelper.cs:1
Microsoft.Xna.Framework.Color.White
static Color White
Definition
Color.cs:350
Microsoft.Xna.Framework.Color
Definition
Color.cs:12
Microsoft.Xna.Framework.Vector2.Zero
static Vector2 Zero
Definition
Vector2.cs:27
Microsoft.Xna.Framework.Vector2
Definition
Vector2.cs:12
source
Terraria.GameContent
NPCHeadDrawRenderTargetContent.cs
Generated by
1.10.0