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

◆ HandleUseReqest()

override void Terraria.GameContent.PlayerQueenSlimeMountTextureContent.HandleUseReqest ( GraphicsDevice device,
SpriteBatch spriteBatch )
inlineprotected

Definition at line 11 of file PlayerQueenSlimeMountTextureContent.cs.

12 {
13 Asset<Texture2D> val = TextureAssets.Extra[204];
14 PrepareARenderTarget_AndListenToEvents(ref _target, device, val.Width(), val.Height(), RenderTargetUsage.PreserveContents);
16 device.Clear(Color.Transparent);
18 spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.AlphaBlend);
19 GameShaders.Misc["QueenSlime"].Apply(value);
20 value.Draw(spriteBatch);
21 spriteBatch.End();
22 device.SetRenderTarget(null);
23 _wasPrepared = true;
24 }
static readonly BlendState AlphaBlend
Definition BlendState.cs:36
void Clear(ClearOptions options, Vector4 color, float depth, int stencil)
unsafe void SetRenderTarget(RenderTargetCube renderTarget, CubeMapFace cubeMapFace)
void PrepareARenderTarget_AndListenToEvents(ref RenderTarget2D target, GraphicsDevice device, int neededWidth, int neededHeight, RenderTargetUsage usage)
static Dictionary< string, MiscShaderData > Misc
static Color Transparent
Definition Color.cs:76

References Terraria.GameContent.ARenderTargetContentByRequest._target, Terraria.GameContent.ARenderTargetContentByRequest._wasPrepared, Microsoft.Xna.Framework.Graphics.BlendState.AlphaBlend, Microsoft.Xna.Framework.Graphics.SpriteBatch.Begin(), Microsoft.Xna.Framework.Graphics.GraphicsDevice.Clear(), Microsoft.Xna.Framework.Graphics.SpriteBatch.End(), Terraria.GameContent.TextureAssets.Extra, Terraria.Graphics.Shaders.GameShaders.Misc, Terraria.GameContent.ARenderTargetContentByRequest.PrepareARenderTarget_AndListenToEvents(), Microsoft.Xna.Framework.Graphics.GraphicsDevice.SetRenderTarget(), Microsoft.Xna.Framework.Color.Transparent, ReLogic.Content.Asset< T >.Value, Microsoft.Xna.Framework.Color.White, and Microsoft.Xna.Framework.Vector2.Zero.