|
| | DeformableSprite (ContentXElement element, int? subdivisionsX=null, int? subdivisionsY=null, string filePath="", bool lazyLoad=false, bool invert=false) |
| |
| void | EnsureLazyLoaded () |
| |
| void | Deform (Func< Vector2, Vector2 > deformFunction) |
| | Deform the vertices of the sprite using an arbitrary function. The in-parameter of the function is the normalized position of the vertex (i.e. 0,0 = top-left corner of the sprite, 1,1 = bottom-right) and the output is the amount of deformation. More...
|
| |
| void | Deform (Vector2[,] deform) |
| |
| void | Reset () |
| |
| Matrix | GetTransform (Vector3 pos, Vector2 origin, float rotate, Vector2 scale) |
| |
| void | Draw (Camera cam, Vector3 pos, Vector2 origin, float rotate, Vector2 scale, Color color, bool mirror=false, bool invert=false) |
| |
| void | Remove () |
| |
| GUIComponent | CreateEditor (GUIComponent parent, List< SpriteDeformation > deformations, string parentDebugName) |
| |
◆ DeformableSprite()
| Barotrauma.DeformableSprite.DeformableSprite |
( |
ContentXElement |
element, |
|
|
int? |
subdivisionsX = null, |
|
|
int? |
subdivisionsY = null, |
|
|
string |
filePath = "", |
|
|
bool |
lazyLoad = false, |
|
|
bool |
invert = false |
|
) |
| |
◆ CreateEditor()
◆ Deform() [1/2]
| void Barotrauma.DeformableSprite.Deform |
( |
Func< Vector2, Vector2 > |
deformFunction | ) |
|
Deform the vertices of the sprite using an arbitrary function. The in-parameter of the function is the normalized position of the vertex (i.e. 0,0 = top-left corner of the sprite, 1,1 = bottom-right) and the output is the amount of deformation.
Definition at line 221 of file BarotraumaClient/ClientSource/Sprite/DeformableSprite.cs.
◆ Deform() [2/2]
| void Barotrauma.DeformableSprite.Deform |
( |
Vector2 |
deform[,] | ) |
|
◆ Draw()
| void Barotrauma.DeformableSprite.Draw |
( |
Camera |
cam, |
|
|
Vector3 |
pos, |
|
|
Vector2 |
origin, |
|
|
float |
rotate, |
|
|
Vector2 |
scale, |
|
|
Color |
color, |
|
|
bool |
mirror = false, |
|
|
bool |
invert = false |
|
) |
| |
◆ EnsureLazyLoaded()
| void Barotrauma.DeformableSprite.EnsureLazyLoaded |
( |
| ) |
|
◆ GetTransform()
| Matrix Barotrauma.DeformableSprite.GetTransform |
( |
Vector3 |
pos, |
|
|
Vector2 |
origin, |
|
|
float |
rotate, |
|
|
Vector2 |
scale |
|
) |
| |
◆ Remove()
| void Barotrauma.DeformableSprite.Remove |
( |
| ) |
|
◆ Reset()
| void Barotrauma.DeformableSprite.Reset |
( |
| ) |
|
◆ Effect
| Effect Barotrauma.DeformableSprite.Effect |
|
staticget |
◆ Invert
| bool Barotrauma.DeformableSprite.Invert |
|
getset |
◆ Origin
| Vector2 Barotrauma.DeformableSprite.Origin |
|
getset |
◆ Size
| Vector2 Barotrauma.DeformableSprite.Size |
|
get |
◆ Sprite
| Sprite Barotrauma.DeformableSprite.Sprite |
|
get |