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

◆ HandleUseReqest()

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

Definition at line 19 of file PlayerTitaniumStormBuffTextureContent.cs.

20 {
21 Main.instance.LoadProjectile(908);
22 Asset<Texture2D> val = TextureAssets.Projectile[908];
23 UpdateSettingsForRendering(0.6f, 0f, Main.GlobalTimeWrappedHourly, 0.3f);
24 PrepareARenderTarget_AndListenToEvents(ref _target, device, val.Width(), val.Height(), RenderTargetUsage.PreserveContents);
26 device.Clear(Color.Transparent);
28 spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.AlphaBlend);
29 _shaderData.Apply(value);
30 value.Draw(spriteBatch);
31 spriteBatch.End();
32 device.SetRenderTarget(null);
33 _wasPrepared = true;
34 }
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)
void UpdateSettingsForRendering(float gradientContributionFromOriginalTexture, float gradientScrollingSpeed, float flatGradientOffset, float gradientColorDominance)
virtual void Apply(DrawData? drawData=null)
static Color Transparent
Definition Color.cs:76

References Terraria.GameContent.PlayerTitaniumStormBuffTextureContent._shaderData, Terraria.GameContent.ARenderTargetContentByRequest._target, Terraria.GameContent.ARenderTargetContentByRequest._wasPrepared, Microsoft.Xna.Framework.Graphics.BlendState.AlphaBlend, Terraria.Graphics.Shaders.MiscShaderData.Apply(), Microsoft.Xna.Framework.Graphics.SpriteBatch.Begin(), Microsoft.Xna.Framework.Graphics.GraphicsDevice.Clear(), Microsoft.Xna.Framework.Graphics.SpriteBatch.End(), Terraria.Main.GlobalTimeWrappedHourly, Terraria.Main.instance, Terraria.GameContent.ARenderTargetContentByRequest.PrepareARenderTarget_AndListenToEvents(), Terraria.GameContent.TextureAssets.Projectile, Microsoft.Xna.Framework.Graphics.GraphicsDevice.SetRenderTarget(), Microsoft.Xna.Framework.Color.Transparent, Terraria.GameContent.PlayerTitaniumStormBuffTextureContent.UpdateSettingsForRendering(), ReLogic.Content.Asset< T >.Value, Microsoft.Xna.Framework.Color.White, and Microsoft.Xna.Framework.Vector2.Zero.