1#include "Game/LiveActor/Spine.hpp"
2#include "Game/LiveActor/ActorStateKeeper.hpp"
4Spine::Spine(
void *pExecutor,
const Nerve *pNerve) {
19void Spine::setNerve(
const Nerve *pNerve) {
28const Nerve* Spine::getCurrentNerve()
const{
35void Spine::changeNerve() {
36 if (mNextNerve ==
nullptr) {
40 if (mStateKeeper != 0) {
41 mStateKeeper->endState(mCurNerve);
42 mStateKeeper->startState(mNextNerve);
45 const Nerve* pNextState = mNextNerve;
47 mCurNerve = pNextState;
51void Spine::initStateKeeper(
int a2) {
Used for executing states of a LiveActor.
virtual void execute(Spine *pSpine) const =0
Executes a state based on the host actor.
virtual void executeOnEnd(Spine *pSpine) const
Executes after the last iteration of a state before it executes another state.