Barotrauma Server
Loading...
Searching...
No Matches
Barotrauma.AnimationParams Class Referenceabstract
Inheritance diagram for Barotrauma.AnimationParams:
Barotrauma.EditableParams Barotrauma.IMemorizable< AnimationParams > Barotrauma.ISerializableEntity Barotrauma.GroundedMovementParams Barotrauma.SwimParams Barotrauma.FishGroundedParams Barotrauma.HumanGroundedParams Barotrauma.FishSwimParams Barotrauma.HumanSwimParams Barotrauma.FishRunParams Barotrauma.FishWalkParams Barotrauma.HumanCrouchParams Barotrauma.HumanRunParams Barotrauma.HumanWalkParams Barotrauma.FishSwimFastParams Barotrauma.FishSwimSlowParams Barotrauma.HumanSwimFastParams Barotrauma.HumanSwimSlowParams

Public Member Functions

bool Serialize ()
 
bool Deserialize ()
 
void StoreSnapshot ()
 
void Undo ()
 
void Redo ()
 
void ClearHistory ()
 
- Public Member Functions inherited from Barotrauma.EditableParams
virtual bool Save (string fileNameWithoutExtension=null, System.Xml.XmlWriterSettings settings=null)
 
virtual bool Reset (bool forceReload=false)
 
- Public Member Functions inherited from Barotrauma.IMemorizable< AnimationParams >
void StoreSnapshot ()
 
void Undo ()
 
void Redo ()
 
void ClearHistory ()
 

Static Public Member Functions

static string GetDefaultFileName (Identifier speciesName, AnimationType animType)
 
static string GetDefaultFile (Identifier speciesName, AnimationType animType)
 
static string GetFolder (Identifier speciesName)
 
static IEnumerable< string > FilterAndSortFiles (IEnumerable< string > filePaths, AnimationType type)
 Selects all file paths that match the specified animation type and filters them alphabetically.
 
static void ClearCache ()
 
static AnimationParams Create (string fullPath, Identifier speciesName, AnimationType animationType, Type animationParamsType)
 
static T Create< T > (string fullPath, Identifier speciesName, AnimationType animationType)
 Note: Overrides old animations, if found!
 
static Type GetParamTypeFromAnimType (AnimationType type, bool isHumanoid)
 

Protected Member Functions

bool Load (ContentPath file, Identifier speciesName)
 
override void UpdatePath (ContentPath newPath)
 
void StoreSnapshot< T > ()
 
- Protected Member Functions inherited from Barotrauma.EditableParams
ContentXElement CreateElement (string name, params object[] attrs)
 
virtual string GetName ()
 
virtual bool Deserialize (XElement element=null)
 
virtual bool Serialize (XElement element=null)
 
virtual bool Load (ContentPath file)
 

Static Protected Member Functions

static T GetDefaultAnimParams< T > (Character character, AnimationType animType)
 
static T GetAnimParams< T > (Character character, AnimationType animType, Either< string, ContentPath > file, bool throwErrors=true)
 
static string ParseFootAngles (Dictionary< int, float > footAngles)
 
static void SetFootAngles (Dictionary< int, float > footAngles, string value)
 

Properties

Identifier SpeciesName [get]
 
bool IsGroundedAnimation [get]
 
bool IsSwimAnimation [get]
 
virtual AnimationType AnimationType [get, protected set]
 
float MovementSpeed [get, set]
 
float CycleSpeed [get, set]
 
float HeadAngle [get, set]
 In degrees.
 
float HeadAngleInRadians = float.NaN [get]
 
float TorsoAngle [get, set]
 In degrees.
 
float TorsoAngleInRadians = float.NaN [get]
 
float HeadTorque [get, set]
 
float TorsoTorque [get, set]
 
float FootTorque [get, set]
 
float ArmIKStrength [get, set]
 
float HandIKStrength [get, set]
 
Memento< AnimationParamsMemento = new Memento<AnimationParams>() [get, protected set]
 
- Properties inherited from Barotrauma.EditableParams
bool IsLoaded [get, protected set]
 
string Name [get]
 
string FileName [get]
 
string FileNameWithoutExtension [get]
 
string Folder [get]
 
ContentPath Path = ContentPath.Empty [get, protected set]
 
Dictionary< Identifier, SerializablePropertySerializableProperties [get, protected set]
 
virtual ContentXElement MainElement [get]
 
ContentXElement OriginalElement [get, protected set]
 
- Properties inherited from Barotrauma.ISerializableEntity
- Properties inherited from Barotrauma.IMemorizable< AnimationParams >
Memento< T > Memento [get]
 

Additional Inherited Members

- Protected Attributes inherited from Barotrauma.EditableParams
ContentXElement rootElement
 
XDocument doc
 

Member Function Documentation

◆ ClearCache()

static void Barotrauma.AnimationParams.ClearCache ( )
static

◆ ClearHistory()

void Barotrauma.AnimationParams.ClearHistory ( )

◆ Create()

static AnimationParams Barotrauma.AnimationParams.Create ( string fullPath,
Identifier speciesName,
AnimationType animationType,
Type animationParamsType )
static

◆ Create< T >()

static T Barotrauma.AnimationParams.Create< T > ( string fullPath,
Identifier speciesName,
AnimationType animationType )
static

Note: Overrides old animations, if found!

Type Constraints
T :AnimationParams 
T :new() 

◆ Deserialize()

bool Barotrauma.AnimationParams.Deserialize ( )

◆ FilterAndSortFiles()

static IEnumerable< string > Barotrauma.AnimationParams.FilterAndSortFiles ( IEnumerable< string > filePaths,
AnimationType type )
static

Selects all file paths that match the specified animation type and filters them alphabetically.

◆ GetAnimParams< T >()

static T Barotrauma.AnimationParams.GetAnimParams< T > ( Character character,
AnimationType animType,
Either< string, ContentPath > file,
bool throwErrors = true )
staticprotected
Type Constraints
T :AnimationParams 
T :new() 

◆ GetDefaultAnimParams< T >()

static T Barotrauma.AnimationParams.GetDefaultAnimParams< T > ( Character character,
AnimationType animType )
staticprotected
Type Constraints
T :AnimationParams 
T :new() 

◆ GetDefaultFile()

static string Barotrauma.AnimationParams.GetDefaultFile ( Identifier speciesName,
AnimationType animType )
static

◆ GetDefaultFileName()

static string Barotrauma.AnimationParams.GetDefaultFileName ( Identifier speciesName,
AnimationType animType )
static

◆ GetFolder()

static string Barotrauma.AnimationParams.GetFolder ( Identifier speciesName)
static

◆ GetParamTypeFromAnimType()

static Type Barotrauma.AnimationParams.GetParamTypeFromAnimType ( AnimationType type,
bool isHumanoid )
static

◆ Load()

bool Barotrauma.AnimationParams.Load ( ContentPath file,
Identifier speciesName )
protected

◆ ParseFootAngles()

static string Barotrauma.AnimationParams.ParseFootAngles ( Dictionary< int, float > footAngles)
staticprotected

◆ Redo()

void Barotrauma.AnimationParams.Redo ( )

◆ Serialize()

bool Barotrauma.AnimationParams.Serialize ( )

◆ SetFootAngles()

static void Barotrauma.AnimationParams.SetFootAngles ( Dictionary< int, float > footAngles,
string value )
staticprotected

◆ StoreSnapshot()

void Barotrauma.AnimationParams.StoreSnapshot ( )
abstract

◆ StoreSnapshot< T >()

Type Constraints
T :AnimationParams 
T :new() 

◆ Undo()

void Barotrauma.AnimationParams.Undo ( )

◆ UpdatePath()

override void Barotrauma.AnimationParams.UpdatePath ( ContentPath newPath)
protectedvirtual

Reimplemented from Barotrauma.EditableParams.

Property Documentation

◆ AnimationType

virtual AnimationType Barotrauma.AnimationParams.AnimationType
getprotected set

◆ ArmIKStrength

float Barotrauma.AnimationParams.ArmIKStrength
getset

◆ CycleSpeed

float Barotrauma.AnimationParams.CycleSpeed
getset

◆ FootTorque

float Barotrauma.AnimationParams.FootTorque
getset

◆ HandIKStrength

float Barotrauma.AnimationParams.HandIKStrength
getset

◆ HeadAngle

float Barotrauma.AnimationParams.HeadAngle
getset

In degrees.

◆ HeadAngleInRadians

float Barotrauma.AnimationParams.HeadAngleInRadians = float.NaN
get

◆ HeadTorque

float Barotrauma.AnimationParams.HeadTorque
getset

◆ IsGroundedAnimation

bool Barotrauma.AnimationParams.IsGroundedAnimation
get

◆ IsSwimAnimation

bool Barotrauma.AnimationParams.IsSwimAnimation
get

◆ Memento

Memento<AnimationParams> Barotrauma.AnimationParams.Memento = new Memento<AnimationParams>()
getprotected set

◆ MovementSpeed

float Barotrauma.AnimationParams.MovementSpeed
getset

◆ SpeciesName

Identifier Barotrauma.AnimationParams.SpeciesName
get

◆ TorsoAngle

float Barotrauma.AnimationParams.TorsoAngle
getset

In degrees.

◆ TorsoAngleInRadians

float Barotrauma.AnimationParams.TorsoAngleInRadians = float.NaN
get

◆ TorsoTorque

float Barotrauma.AnimationParams.TorsoTorque
getset

The documentation for this class was generated from the following file: