|
| override string | ToString () |
| |
| | Sprite (ContentXElement element, string path="", string file="", bool lazyLoad=false) |
| |
| | Sprite (string newFile, Vector2 newOrigin) |
| |
| | Sprite (string newFile, Rectangle? sourceRectangle, Vector2? origin=null, float rotation=0) |
| |
| void | Remove () |
| |
| void | ReloadXML () |
| | Works only if there is a name attribute defined for the sprite. For items and structures, the entity id or name is used if the sprite's name attribute is not defined. More...
|
| |
| bool | ParseTexturePath (string path="", string file="") |
| |
|
| static Identifier | GetIdentifier (XElement sourceElement) |
| | Creates a supposedly unique identifier from the parent element. If the parent element is not found, uses the sprite element. TODO: If there are multiple elements with exactly the same data, the ids will fail. -> Is there a better way to identify the sprites? ALSO TODO: delete :) More...
|
| |
Definition at line 13 of file Sprite.cs.
◆ Sprite() [1/3]
| Barotrauma.Sprite.Sprite |
( |
ContentXElement |
element, |
|
|
string |
path = "", |
|
|
string |
file = "", |
|
|
bool |
lazyLoad = false |
|
) |
| |
◆ Sprite() [2/3]
| Barotrauma.Sprite.Sprite |
( |
string |
newFile, |
|
|
Vector2 |
newOrigin |
|
) |
| |
◆ Sprite() [3/3]
| Barotrauma.Sprite.Sprite |
( |
string |
newFile, |
|
|
Rectangle? |
sourceRectangle, |
|
|
Vector2? |
origin = null, |
|
|
float |
rotation = 0 |
|
) |
| |
◆ GetIdentifier()
| static Identifier Barotrauma.Sprite.GetIdentifier |
( |
XElement |
sourceElement | ) |
|
|
static |
Creates a supposedly unique identifier from the parent element. If the parent element is not found, uses the sprite element. TODO: If there are multiple elements with exactly the same data, the ids will fail. -> Is there a better way to identify the sprites? ALSO TODO: delete :)
Definition at line 206 of file Sprite.cs.
◆ ParseTexturePath()
| bool Barotrauma.Sprite.ParseTexturePath |
( |
string |
path = "", |
|
|
string |
file = "" |
|
) |
| |
◆ ReloadXML()
| void Barotrauma.Sprite.ReloadXML |
( |
| ) |
|
Works only if there is a name attribute defined for the sprite. For items and structures, the entity id or name is used if the sprite's name attribute is not defined.
Definition at line 231 of file Sprite.cs.
◆ Remove()
| void Barotrauma.Sprite.Remove |
( |
| ) |
|
◆ ToString()
| override string Barotrauma.Sprite.ToString |
( |
| ) |
|
◆ depth
| float Barotrauma.Sprite.depth |
|
protected |
◆ offset
| Vector2 Barotrauma.Sprite.offset |
|
protected |
◆ origin
| Vector2 Barotrauma.Sprite.origin |
|
protected |
◆ rotation
| float Barotrauma.Sprite.rotation |
◆ size
| Vector2 Barotrauma.Sprite.size = Vector2.One |
◆ Compress
| bool Barotrauma.Sprite.Compress |
|
get |
◆ Depth
| float Barotrauma.Sprite.Depth |
|
getset |
◆ EntityIdentifier
◆ FilePath
◆ FullPath
| string Barotrauma.Sprite.FullPath |
|
get |
◆ LazyLoad
| bool Barotrauma.Sprite.LazyLoad |
|
get |
◆ Name
| string Barotrauma.Sprite.Name |
|
getset |
◆ Origin
| Vector2 Barotrauma.Sprite.Origin |
|
getset |
◆ RelativeOrigin
| Vector2 Barotrauma.Sprite.RelativeOrigin |
|
getset |
◆ RelativeSize
| Vector2 Barotrauma.Sprite.RelativeSize |
|
get |
◆ SourceElement
Reference to the xml element from where the sprite was created. Can be null if the sprite was not defined in xml!
Definition at line 18 of file Sprite.cs.
◆ SourceRect
| Rectangle Barotrauma.Sprite.SourceRect |
|
getset |