Barotrauma Client Doc
Barotrauma.DecorativeSprite Class Reference
Inheritance diagram for Barotrauma.DecorativeSprite:
Barotrauma.ISerializableEntity

Classes

class  State
 

Public Types

enum class  AnimationType { None , Sine , Noise }
 

Public Member Functions

 DecorativeSprite (ContentXElement element, string path="", string file="", bool lazyLoad=false)
 
Vector2 GetOffset (ref float offsetState, Vector2 randomOffsetMultiplier, float rotation=0.0f)
 
float GetRotation (ref float rotationState, float randomRotationFactor)
 
float GetScale (float randomScaleModifier)
 
void Remove ()
 

Static Public Member Functions

static void UpdateSpriteStates (ImmutableDictionary< int, ImmutableArray< DecorativeSprite >> spriteGroups, Dictionary< DecorativeSprite, State > animStates, int entityID, float deltaTime, Func< PropertyConditional, bool > checkConditional)
 

Properties

string Name [get]
 
Dictionary< Identifier, SerializablePropertySerializableProperties [get, set]
 
Sprite Sprite [get]
 
Vector2 Offset [get]
 
Vector2 RandomOffset [get]
 
AnimationType OffsetAnim [get]
 
float OffsetAnimSpeed [get]
 
float RotationSpeed [get]
 
float Rotation [get]
 
Vector2 RandomRotation [get]
 
float Scale [get]
 
Vector2 RandomScale [get]
 
AnimationType RotationAnim [get]
 
int RandomGroupID [get]
 If > 0, only one sprite of the same group is used (chosen randomly) More...
 
Color Color [get, set]
 
- Properties inherited from Barotrauma.ISerializableEntity
string Name [get]
 
Dictionary< Identifier, SerializablePropertySerializableProperties [get]
 

Detailed Description

Definition at line 9 of file DecorativeSprite.cs.

Member Enumeration Documentation

◆ AnimationType

Enumerator
None 
Sine 
Noise 

Definition at line 26 of file DecorativeSprite.cs.

Constructor & Destructor Documentation

◆ DecorativeSprite()

Barotrauma.DecorativeSprite.DecorativeSprite ( ContentXElement  element,
string  path = "",
string  file = "",
bool  lazyLoad = false 
)

Definition at line 126 of file DecorativeSprite.cs.

Member Function Documentation

◆ GetOffset()

Vector2 Barotrauma.DecorativeSprite.GetOffset ( ref float  offsetState,
Vector2  randomOffsetMultiplier,
float  rotation = 0.0f 
)

Definition at line 151 of file DecorativeSprite.cs.

◆ GetRotation()

float Barotrauma.DecorativeSprite.GetRotation ( ref float  rotationState,
float  randomRotationFactor 
)

Definition at line 183 of file DecorativeSprite.cs.

◆ GetScale()

float Barotrauma.DecorativeSprite.GetScale ( float  randomScaleModifier)

Definition at line 205 of file DecorativeSprite.cs.

◆ Remove()

void Barotrauma.DecorativeSprite.Remove ( )

Definition at line 259 of file DecorativeSprite.cs.

◆ UpdateSpriteStates()

static void Barotrauma.DecorativeSprite.UpdateSpriteStates ( ImmutableDictionary< int, ImmutableArray< DecorativeSprite >>  spriteGroups,
Dictionary< DecorativeSprite, State animStates,
int  entityID,
float  deltaTime,
Func< PropertyConditional, bool >  checkConditional 
)
static

Definition at line 214 of file DecorativeSprite.cs.

Property Documentation

◆ Color

Color Barotrauma.DecorativeSprite.Color
getset

Definition at line 115 of file DecorativeSprite.cs.

◆ Name

string Barotrauma.DecorativeSprite.Name
get

Definition at line 21 of file DecorativeSprite.cs.

◆ Offset

Vector2 Barotrauma.DecorativeSprite.Offset
get

Definition at line 34 of file DecorativeSprite.cs.

◆ OffsetAnim

AnimationType Barotrauma.DecorativeSprite.OffsetAnim
get

Definition at line 40 of file DecorativeSprite.cs.

◆ OffsetAnimSpeed

float Barotrauma.DecorativeSprite.OffsetAnimSpeed
get

Definition at line 43 of file DecorativeSprite.cs.

◆ RandomGroupID

int Barotrauma.DecorativeSprite.RandomGroupID
get

If > 0, only one sprite of the same group is used (chosen randomly)

Definition at line 112 of file DecorativeSprite.cs.

◆ RandomOffset

Vector2 Barotrauma.DecorativeSprite.RandomOffset
get

Definition at line 37 of file DecorativeSprite.cs.

◆ RandomRotation

Vector2 Barotrauma.DecorativeSprite.RandomRotation
get

Definition at line 78 of file DecorativeSprite.cs.

◆ RandomScale

Vector2 Barotrauma.DecorativeSprite.RandomScale
get

Definition at line 99 of file DecorativeSprite.cs.

◆ Rotation

float Barotrauma.DecorativeSprite.Rotation
get

Definition at line 64 of file DecorativeSprite.cs.

◆ RotationAnim

AnimationType Barotrauma.DecorativeSprite.RotationAnim
get

Definition at line 106 of file DecorativeSprite.cs.

◆ RotationSpeed

float Barotrauma.DecorativeSprite.RotationSpeed
get

Definition at line 49 of file DecorativeSprite.cs.

◆ Scale

float Barotrauma.DecorativeSprite.Scale
get

Definition at line 92 of file DecorativeSprite.cs.

◆ SerializableProperties

Dictionary<Identifier, SerializableProperty> Barotrauma.DecorativeSprite.SerializableProperties
getset

Definition at line 22 of file DecorativeSprite.cs.

◆ Sprite

Sprite Barotrauma.DecorativeSprite.Sprite
get

Definition at line 24 of file DecorativeSprite.cs.