- Timestamp:
- Dec 7, 2015, 8:42:03 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/campaignHS15/src/orxonox/controllers/FightingController.h
r10934 r10953 55 55 { return this->target_; } 56 56 bool bKeepFormation_; //even if action_ == FIGHT, you might still want to keep formation if far enough form the target 57 57 virtual void maneuver(); //<! sets this->targetPosition_, which is a Vector3 of where this ship flies. Decision is made based on 58 //<! the distance to enemy, if being attacked, dodge() is called, otherwise ship just flies towards this->target_. 59 bool bShooting_; 60 bool canFire(); //<! check if target_ is in radius and if this is looking at target_ 61 58 62 protected: 59 63 void setTarget(ControllableEntity* target); //set a target to shoot at … … 65 69 void lookAtTarget(float dt); //<! rotate yourself towards target 66 70 67 void maneuver(); //<! sets this->targetPosition_, which is a Vector3 of where this ship flies. Decision is made based on68 //<! the distance to enemy, if being attacked, dodge() is called, otherwise ship just flies towards this->target_.69 71 void dodge(const Vector3& thisPosition, float diffLength, Vector3& diffUnit); //<! choose a random Vector3 perpendicular to the difference vector between 70 72 //<! this and target_ plus or minus some amount in difference vector direction, 71 73 //<! depending on whether it is better to close up or survive. 72 74 void dodgeTowards (Vector3& position); //fly towards position and awoid being hit 73 bool canFire(); //<! check if target_ is in radius and if this is looking at target_74 75 void doFire(); //<! choose weapon, set aim at target_ and fire 75 76 WeakPtr<ControllableEntity> target_; … … 84 85 bool bDodge_; 85 86 int attackRange_; 86 bool bShooting_;87 87 bool bLookAtTarget_; 88 88 float deltaHp;
Note: See TracChangeset
for help on using the changeset viewer.