Isle
Loading...
Searching...
No Matches
AnimState Class Reference

[AI] Persistent serializable animation state for resuming animations and restoring global animation progress. More...

#include <legoanimationmanager.h>

Inheritance diagram for AnimState:
Collaboration diagram for AnimState:

Public Member Functions

 AnimState ()
 Constructor. [AI]. More...
 
 ~AnimState () override
 Destructor, releases animation tracking arrays. [AI]. More...
 
const char * ClassName () const override
 [AI] Gets the class name ("AnimState"). More...
 
MxBool IsA (const char *p_name) const override
 [AI] Checks if this or a parent is the given class. More...
 
MxBool Reset () override
 [AI] Resets all tracked animation usage to default. More...
 
MxResult Serialize (LegoStorage *p_storage) override
 [AI] Serialize state to or from disk for save/load. More...
 
void CopyToAnims (MxU32, AnimInfo *p_anims, MxU32 &p_outExtraCharacterId)
 [AI] Writes tracked usage data to animations. More...
 
void InitFromAnims (MxU32 p_animsLength, AnimInfo *p_anims, MxU32 p_extraCharacterId)
 [AI] Reads usage state from animations and stores it in this AnimState. More...
 
- Public Member Functions inherited from LegoState
 ~LegoState () override
 [AI] Virtual destructor to allow subclass cleanup. More...
 
virtual MxBool IsSerializable ()
 [AI] Returns if this state can be serialized (for game saving/loading support). More...
 
virtual MxBool Reset ()
 [AI] Hook for returning object to default (empty) state; not implemented in this base. More...
 
virtual MxResult Serialize (LegoStorage *p_storage)
 [AI] Serialize state to a storage (for save/load). More...
 
const char * ClassName () const override
 [AI] Gets this class's name for RTTI/IsA functionality. More...
 
MxBool IsA (const char *p_name) const override
 [AI] Tests if this object is of a given class name, directly or through inheritance. More...
 
- Public Member Functions inherited from MxCore
 MxCore ()
 [AI] Constructs a new MxCore object and assigns it a unique id. More...
 
virtual ~MxCore ()
 [AI] Virtual destructor. Required for correct polymorphic cleanup in derived classes. More...
 
virtual MxLong Notify (MxParam &p_param)
 [AI] Virtual callback notification mechanism. More...
 
virtual MxResult Tickle ()
 [AI] Called by tickle managers to allow the object to update itself. More...
 
virtual const char * ClassName () const
 [AI] Returns the runtime class name of this object. More...
 
virtual MxBool IsA (const char *p_name) const
 [AI] Checks whether this object's class type or parents match the given name. More...
 
MxU32 GetId ()
 [AI] Gets the unique (per-process) id assigned to this object instance. More...
 

Additional Inherited Members

- Public Types inherited from LegoState
enum  ScoreColor { e_grey = 0 , e_yellow , e_blue , e_red }
 [AI] Score coloring values for in-game display feedback or logic. More...
 

Detailed Description

[AI] Persistent serializable animation state for resuming animations and restoring global animation progress.

[AI] AnimState holds state info such as used animation counts and world/character state required for saving and resetting. It is derived from LegoState to be managed by the game's global state system.

Definition at line 61 of file legoanimationmanager.h.

Constructor & Destructor Documentation

◆ AnimState()

AnimState::AnimState ( )

Constructor. [AI].

Definition at line 2878 of file legoanimationmanager.cpp.

◆ ~AnimState()

AnimState::~AnimState ( )
override

Destructor, releases animation tracking arrays. [AI].

Definition at line 2887 of file legoanimationmanager.cpp.

Member Function Documentation

◆ ClassName()

const char * AnimState::ClassName ( ) const
overridevirtual

[AI] Gets the class name ("AnimState").

Reimplemented from MxCore.

◆ CopyToAnims()

void AnimState::CopyToAnims ( MxU32  ,
AnimInfo p_anims,
MxU32 p_outExtraCharacterId 
)

[AI] Writes tracked usage data to animations.

[AI]

Parameters
p_animsAnimation array to copy to. [AI]
p_outExtraCharacterId(output) Last used extra character. [AI]

Definition at line 2894 of file legoanimationmanager.cpp.

◆ InitFromAnims()

void AnimState::InitFromAnims ( MxU32  p_animsLength,
AnimInfo p_anims,
MxU32  p_extraCharacterId 
)

[AI] Reads usage state from animations and stores it in this AnimState.

Parameters
p_animsLengthNumber of animation entries. [AI]
p_animsAnimation array to read from. [AI]
p_extraCharacterIdLast extra character ID. [AI]

Definition at line 2913 of file legoanimationmanager.cpp.

◆ IsA()

MxBool AnimState::IsA ( const char *  p_name) const
overridevirtual

[AI] Checks if this or a parent is the given class.

Reimplemented from MxCore.

◆ Reset()

MxBool AnimState::Reset ( )
overridevirtual

[AI] Resets all tracked animation usage to default.

Reimplemented from LegoState.

Definition at line 3013 of file legoanimationmanager.cpp.

◆ Serialize()

MxResult AnimState::Serialize ( LegoStorage p_storage)
overridevirtual

[AI] Serialize state to or from disk for save/load.

[AI]

Parameters
p_storageStorage to read from or write to. [AI]

Reimplemented from LegoState.

Definition at line 2939 of file legoanimationmanager.cpp.


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