mirror of
https://github.com/UberGames/EF2GameSource.git
synced 2025-02-21 11:01:40 +00:00
reformat
This commit is contained in:
parent
5477f6b6b8
commit
aeb607dfb8
1 changed files with 140 additions and 145 deletions
|
@ -38,14 +38,12 @@ class UseAlarm;
|
|||
//
|
||||
// Method of Use: Statemachine or another behavior
|
||||
//--------------------------------------------------------------
|
||||
class UseAlarm : public Behavior
|
||||
{
|
||||
class UseAlarm : public Behavior {
|
||||
public:
|
||||
//------------------------------------
|
||||
// States
|
||||
//------------------------------------
|
||||
public:
|
||||
typedef enum
|
||||
{
|
||||
typedef enum {
|
||||
USE_ALARM_FIND_NODE,
|
||||
USE_ALARM_MOVE_TO_NODE,
|
||||
USE_ALARM_AT_NODE,
|
||||
|
@ -55,17 +53,27 @@ class UseAlarm : public Behavior
|
|||
USE_ALARM_FAILED
|
||||
} useAlarmStates_t;
|
||||
|
||||
//------------------------------------
|
||||
// Parameters
|
||||
//------------------------------------
|
||||
private: // Parameters
|
||||
str _movementAnimName ; // anim to play to move to work node, default is "walk"
|
||||
float _maxDistance; // maximum distance to look for node
|
||||
//-------------------------------------
|
||||
// Public Interface
|
||||
//-------------------------------------
|
||||
CLASS_PROTOTYPE(UseAlarm);
|
||||
UseAlarm();
|
||||
~UseAlarm();
|
||||
|
||||
void SetArgs(Event* ev);
|
||||
void AnimDone(Event* ev);
|
||||
void HandleNodeCommand(Event* ev);
|
||||
|
||||
void Begin(Actor& self);
|
||||
BehaviorReturnCode_t Evaluate(Actor& self);
|
||||
void End(Actor& self);
|
||||
|
||||
virtual void Archive(Archiver& arc);
|
||||
|
||||
protected:
|
||||
//-------------------------------------
|
||||
// Internal Functionality
|
||||
//-------------------------------------
|
||||
protected:
|
||||
void transitionToState(useAlarmStates_t state);
|
||||
void setInternalState(useAlarmStates_t state, const str& stateName);
|
||||
void init(Actor &self);
|
||||
|
@ -92,38 +100,25 @@ class UseAlarm : public Behavior
|
|||
void failureStateRotateToEnemy(const str& failureReason);
|
||||
|
||||
|
||||
//-------------------------------------
|
||||
// Public Interface
|
||||
//-------------------------------------
|
||||
public:
|
||||
CLASS_PROTOTYPE( UseAlarm );
|
||||
UseAlarm();
|
||||
~UseAlarm();
|
||||
private:
|
||||
//------------------------------------
|
||||
// Parameters
|
||||
//------------------------------------
|
||||
str _movementAnimName; // anim to play to move to work node, default is "walk"
|
||||
float _maxDistance; // maximum distance to look for node
|
||||
|
||||
void SetArgs ( Event *ev );
|
||||
void AnimDone ( Event *ev );
|
||||
void HandleNodeCommand ( Event *ev );
|
||||
|
||||
void Begin ( Actor &self );
|
||||
BehaviorReturnCode_t Evaluate ( Actor &self );
|
||||
void End ( Actor &self );
|
||||
|
||||
virtual void Archive ( Archiver &arc );
|
||||
|
||||
private: // Component Behaviors
|
||||
// Component Behaviors
|
||||
GotoHelperNode _gotoHelperNode;
|
||||
RotateToEntity _rotateToEntity;
|
||||
|
||||
private: // Member Variables
|
||||
// Member Variables
|
||||
HelperNodePtr _node;
|
||||
unsigned int _state;
|
||||
bool _animDone;
|
||||
Actor* _self;
|
||||
|
||||
};
|
||||
|
||||
inline void UseAlarm::Archive( Archiver &arc )
|
||||
{
|
||||
inline void UseAlarm::Archive(Archiver& arc) {
|
||||
Behavior::Archive(arc);
|
||||
|
||||
// Archive Parameters
|
||||
|
|
Loading…
Reference in a new issue