mirror of
https://github.com/UberGames/EF2GameSource.git
synced 2024-11-12 23:44:08 +00:00
reformat
This commit is contained in:
parent
ffbdff4dc6
commit
fc2c939d0d
1 changed files with 117 additions and 125 deletions
|
@ -43,14 +43,12 @@ class AnimatedTeleportToPlayer;
|
|||
//
|
||||
// Method of Use: State Machine or another behavior
|
||||
//--------------------------------------------------------------
|
||||
class AnimatedTeleportToPlayer : public Behavior
|
||||
{
|
||||
class AnimatedTeleportToPlayer : public Behavior {
|
||||
public:
|
||||
//------------------------------------
|
||||
// States
|
||||
//------------------------------------
|
||||
public:
|
||||
typedef enum
|
||||
{
|
||||
typedef enum {
|
||||
ANIM_TELEPORT_BEGIN,
|
||||
ANIM_TELEPORT_START_ANIM,
|
||||
ANIM_TELEPORT_START_ANIMATING,
|
||||
|
@ -59,8 +57,7 @@ class AnimatedTeleportToPlayer : public Behavior
|
|||
ANIM_TELEPORT_END_ANIMATING,
|
||||
} animTeleportStates_t;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
typedef enum {
|
||||
TELEPORT_BEHIND,
|
||||
TELEPORT_TOLEFT,
|
||||
TELEPORT_TORIGHT,
|
||||
|
@ -68,58 +65,53 @@ class AnimatedTeleportToPlayer : public Behavior
|
|||
TELEPORT_NUMBER_OF_POSITIONS
|
||||
} animTeleportPositionModes_t;
|
||||
|
||||
//-------------------------------------
|
||||
// Public Interface
|
||||
//-------------------------------------
|
||||
CLASS_PROTOTYPE(AnimatedTeleportToPlayer);
|
||||
|
||||
void SetArgs(Event* ev);
|
||||
void Begin(Actor& self);
|
||||
|
||||
BehaviorReturnCode_t Evaluate(Actor& self);
|
||||
void End(Actor& self);
|
||||
virtual void Archive(Archiver& arc);
|
||||
|
||||
protected:
|
||||
//-------------------------------------
|
||||
// Internal Functionality
|
||||
//-------------------------------------
|
||||
bool testPosition(Actor& self, int test_pos, Vector& good_position, Entity* player, bool use_player_dir);
|
||||
|
||||
private:
|
||||
//------------------------------------
|
||||
// Parameters
|
||||
//------------------------------------
|
||||
private:
|
||||
str _startAnim;
|
||||
str _endAnim;
|
||||
|
||||
//-------------------------------------
|
||||
// Internal Functionality
|
||||
//-------------------------------------
|
||||
protected:
|
||||
bool testPosition ( Actor &self, int test_pos, Vector &good_position, Entity* player, bool use_player_dir );
|
||||
|
||||
|
||||
//-------------------------------------
|
||||
// Public Interface
|
||||
//-------------------------------------
|
||||
public:
|
||||
CLASS_PROTOTYPE( AnimatedTeleportToPlayer );
|
||||
|
||||
void SetArgs ( Event *ev );
|
||||
void Begin ( Actor &self );
|
||||
|
||||
BehaviorReturnCode_t Evaluate ( Actor &self );
|
||||
void End ( Actor &self );
|
||||
virtual void Archive ( Archiver &arc );
|
||||
|
||||
//-------------------------------------
|
||||
// Member Variables
|
||||
//-------------------------------------
|
||||
private:
|
||||
Vector _teleportPosition;
|
||||
animTeleportStates_t _state;
|
||||
};
|
||||
};
|
||||
|
||||
inline void AnimatedTeleportToPlayer::Archive( Archiver &arc )
|
||||
{
|
||||
Behavior::Archive ( arc );
|
||||
inline void AnimatedTeleportToPlayer::Archive(Archiver& arc) {
|
||||
Behavior::Archive(arc);
|
||||
|
||||
//-------------------------------------
|
||||
// Archive Parameters
|
||||
//-------------------------------------
|
||||
arc.ArchiveString ( &_startAnim );
|
||||
arc.ArchiveString ( &_endAnim );
|
||||
arc.ArchiveString(&_startAnim);
|
||||
arc.ArchiveString(&_endAnim);
|
||||
|
||||
//-------------------------------------
|
||||
// Archive Member Variables
|
||||
//-------------------------------------
|
||||
arc.ArchiveVector ( &_teleportPosition );
|
||||
ArchiveEnum ( _state, animTeleportStates_t );
|
||||
arc.ArchiveVector(&_teleportPosition);
|
||||
ArchiveEnum(_state, animTeleportStates_t);
|
||||
}
|
||||
|
||||
|
||||
|
||||
#endif /* __TELEPORT_TO_ENTITY_H__ */
|
||||
|
||||
|
|
Loading…
Reference in a new issue