reformatting

This commit is contained in:
Walter Julius Hennecke 2014-03-09 19:13:47 +01:00
parent 85075efa95
commit b855763ada

View file

@ -37,28 +37,38 @@ class GotoHelperNode;
//
// Method of Use: Called From State Machine
//--------------------------------------------------------------
class GotoHelperNode : public Behavior
{
class GotoHelperNode : public Behavior {
public:
//------------------------------------
// States
//------------------------------------
public:
typedef enum
{
typedef enum {
GOTO_HNODE_FIND_NODE,
GOTO_HNODE_MOVE_TO_NODE,
GOTO_HNODE_SUCCESS,
GOTO_HNODE_FAILED
} GotoHelperNodeStates_t;
//------------------------------------
// Parameters
//------------------------------------
private:
str _nodeType;
str _movementAnim;
HelperNodePtr _node;
float _maxDistance;
//-------------------------------------
// Public Interface
//-------------------------------------
CLASS_PROTOTYPE(GotoHelperNode);
GotoHelperNode();
~GotoHelperNode();
void SetArgs(Event* ev);
void AnimDone(Event* ev);
void Begin(Actor& self);
BehaviorReturnCode_t Evaluate(Actor& self);
void End(Actor& self);
// Accessors
void SetNode(HelperNode* node);
void SetMovementAnim(const str& anim);
virtual void Archive(Archiver& arc);
//-------------------------------------
// Internal Functionality
@ -78,61 +88,41 @@ class GotoHelperNode : public Behavior
BehaviorReturnCode_t evaluateStateFindNode();
void failureStateMoveToNode(const str& failureReason);
//-------------------------------------
// Public Interface
//-------------------------------------
public:
CLASS_PROTOTYPE( GotoHelperNode );
GotoHelperNode();
~GotoHelperNode();
void SetArgs ( Event *ev );
void AnimDone ( Event *ev );
void Begin ( Actor &self );
BehaviorReturnCode_t Evaluate ( Actor &self );
void End ( Actor &self );
// Accessors
void SetNode ( HelperNode *node );
void SetMovementAnim ( const str &anim );
virtual void Archive ( Archiver &arc );
private:
//------------------------------------
// Parameters
//------------------------------------
str _nodeType;
str _movementAnim;
HelperNodePtr _node;
float _maxDistance;
//-------------------------------------
// Components
//-------------------------------------
private:
GotoPoint _gotoPoint;
//-------------------------------------
// Member Variables
//-------------------------------------
private:
GotoHelperNodeStates_t _state;
Actor* _self;
static const float NODE_RADIUS;
};
inline void GotoHelperNode::SetNode ( HelperNode *node )
{
inline void GotoHelperNode::SetNode(HelperNode* node) {
assert(node);
_node = node;
}
inline void GotoHelperNode::SetMovementAnim ( const str &anim )
{
inline void GotoHelperNode::SetMovementAnim(const str& anim) {
_movementAnim = anim;
}
inline void GotoHelperNode::Archive( Archiver &arc )
{
inline void GotoHelperNode::Archive(Archiver& arc) {
Behavior::Archive(arc);
//