1 using Microsoft.Xna.Framework;
2 using Microsoft.Xna.Framework.Graphics;
5 namespace Loot.Api.Graphics.Shader.Style
28 this.offsetStyle = offsetStyle;
40 return new Vector2(0, Properties.DrawDistance).RotatedBy((
float)i / Properties.NumSegments * MathHelper.TwoPi);
44 var halfDist = Properties.DrawDistance / 2;
45 var offY = halfDist + halfDist * i % halfDist;
46 return new Vector2(0, offY).RotatedBy((
float)i / Properties.NumSegments * MathHelper.TwoPi);
53 var centerPos = entity.
DrawData.position;
54 for (
int i = 0; i < Properties.NumSegments; i++)
56 entity.
DrawData.position = centerPos + GetDrawOffset(i);
57 base.DrawShader(spriteBatch, entity);
Vector2 GetDrawOffset(int i)
Gets the draw offset for the shader Different styles can be programmed to achieve different looks ...
AroundShaderDrawStyle(OffsetStyle offsetStyle=OffsetStyle.NORMAL, ShaderDrawStyleProperties properties=null)
override void DrawShader(SpriteBatch spriteBatch, ShaderEntity entity)
Defines a normal shader draw style
Defines a Shader entity, part of GraphicsEntity<T> The entity defines a particular 'shader' "of" the ...
Defines a drawing style that will draw a shader around the subject