mirror of
https://github.com/UberGames/EF2GameSource.git
synced 2025-02-21 19:10:55 +00:00
reformat
This commit is contained in:
parent
b212dbff25
commit
e03763d963
1 changed files with 184 additions and 199 deletions
|
@ -40,14 +40,12 @@ class StationaryFireCombatEX;
|
|||
//
|
||||
// Method of Use: Called From State Machine
|
||||
//--------------------------------------------------------------
|
||||
class StationaryFireCombatEX : public Behavior
|
||||
{
|
||||
class StationaryFireCombatEX : public Behavior {
|
||||
public:
|
||||
//------------------------------------
|
||||
// States
|
||||
//------------------------------------
|
||||
public:
|
||||
typedef enum
|
||||
{
|
||||
typedef enum {
|
||||
STATIONARY_FIRE_AIM,
|
||||
STATIONARY_FIRE_PRE_FIRE,
|
||||
STATIONARY_FIRE_ATTACK,
|
||||
|
@ -56,52 +54,9 @@ class StationaryFireCombatEX : public Behavior
|
|||
STATIONARY_FIRE_FAILED
|
||||
} StationaryFireStates_t;
|
||||
|
||||
//------------------------------------
|
||||
// Parameters
|
||||
//------------------------------------
|
||||
private:
|
||||
str _stance;
|
||||
float _aimTimeMin;
|
||||
float _aimTimeMax;
|
||||
float _fireTimeMin;
|
||||
float _fireTimeMax;
|
||||
bool _forceAttack;
|
||||
|
||||
|
||||
//-------------------------------------
|
||||
// Internal Functionality
|
||||
//-------------------------------------
|
||||
protected:
|
||||
void transitionToState ( StationaryFireStates_t state );
|
||||
void setInternalState ( StationaryFireStates_t state , const str &stateName );
|
||||
void init ( Actor &self );
|
||||
void think ();
|
||||
void updateEnemy ();
|
||||
void faceEnemy ();
|
||||
|
||||
void setupStateAim ();
|
||||
BehaviorReturnCode_t evaluateStateAim ();
|
||||
void failureStateAim ( const str& failureReason );
|
||||
|
||||
void setupStatePreFire ();
|
||||
BehaviorReturnCode_t evaluateStatePreFire ();
|
||||
void failureStatePreFire ( const str& failureReason );
|
||||
|
||||
void setupStateAttack ();
|
||||
BehaviorReturnCode_t evaluateStateAttack ();
|
||||
void failureStateAttack ( const str& failureReason );
|
||||
|
||||
void setupStatePostFire ();
|
||||
BehaviorReturnCode_t evaluateStatePostFire ();
|
||||
void failureStatePostFire ( const str& failureReason );
|
||||
|
||||
|
||||
|
||||
|
||||
//-------------------------------------
|
||||
// Public Interface
|
||||
//-------------------------------------
|
||||
public:
|
||||
CLASS_PROTOTYPE(StationaryFireCombatEX);
|
||||
|
||||
StationaryFireCombatEX();
|
||||
|
@ -125,22 +80,55 @@ class StationaryFireCombatEX : public Behavior
|
|||
void SetFireTimeMin(float minTime) { _fireTimeMin = minTime; }
|
||||
void SetFireTimeMax(float maxTime) { _fireTimeMax = maxTime; }
|
||||
|
||||
|
||||
|
||||
virtual void Archive(Archiver& arc);
|
||||
|
||||
protected:
|
||||
//-------------------------------------
|
||||
// Internal Functionality
|
||||
//-------------------------------------
|
||||
void transitionToState(StationaryFireStates_t state);
|
||||
void setInternalState(StationaryFireStates_t state, const str& stateName);
|
||||
void init(Actor& self);
|
||||
void think();
|
||||
void updateEnemy();
|
||||
void faceEnemy();
|
||||
|
||||
void setupStateAim();
|
||||
BehaviorReturnCode_t evaluateStateAim();
|
||||
void failureStateAim(const str& failureReason);
|
||||
|
||||
void setupStatePreFire();
|
||||
BehaviorReturnCode_t evaluateStatePreFire();
|
||||
void failureStatePreFire(const str& failureReason);
|
||||
|
||||
void setupStateAttack();
|
||||
BehaviorReturnCode_t evaluateStateAttack();
|
||||
void failureStateAttack(const str& failureReason);
|
||||
|
||||
void setupStatePostFire();
|
||||
BehaviorReturnCode_t evaluateStatePostFire();
|
||||
void failureStatePostFire(const str& failureReason);
|
||||
|
||||
private:
|
||||
//------------------------------------
|
||||
// Parameters
|
||||
//------------------------------------
|
||||
str _stance;
|
||||
float _aimTimeMin;
|
||||
float _aimTimeMax;
|
||||
float _fireTimeMin;
|
||||
float _fireTimeMax;
|
||||
bool _forceAttack;
|
||||
|
||||
//-------------------------------------
|
||||
// Components
|
||||
//-------------------------------------
|
||||
private:
|
||||
FireWeapon _fireWeapon;
|
||||
RotateToEntity _rotateToEntity;
|
||||
|
||||
|
||||
//-------------------------------------
|
||||
// Member Variables
|
||||
//-------------------------------------
|
||||
private:
|
||||
StationaryFireStates_t _state;
|
||||
float _endFireTime;
|
||||
float _endAimTime;
|
||||
|
@ -153,12 +141,9 @@ class StationaryFireCombatEX : public Behavior
|
|||
str _postFireAnim;
|
||||
|
||||
Actor* _self;
|
||||
|
||||
|
||||
};
|
||||
|
||||
inline void StationaryFireCombatEX::Archive( Archiver &arc )
|
||||
{
|
||||
inline void StationaryFireCombatEX::Archive(Archiver& arc) {
|
||||
Behavior::Archive(arc);
|
||||
|
||||
//
|
||||
|
|
Loading…
Reference in a new issue