Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 7, 2015, 8:42:03 PM (8 years ago)
Author:
gania
Message:

converted hack to a legal class

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/campaignHS15/src/orxonox/controllers/FightingController.h

    r10934 r10953  
    5555                { return this->target_; }
    5656            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
    5862        protected:
    5963            void setTarget(ControllableEntity* target); //set a target to shoot at
     
    6569            void lookAtTarget(float dt);    //<! rotate yourself towards target
    6670
    67             void maneuver(); //<! sets this->targetPosition_, which is a Vector3 of where this ship flies. Decision is made based on
    68                              //<! the distance to enemy, if being attacked, dodge() is called, otherwise ship just flies towards this->target_.
    6971            void dodge(const Vector3& thisPosition, float diffLength,  Vector3& diffUnit); //<! choose a random Vector3 perpendicular to the difference vector between
    7072                                                                        //<! this and target_ plus or minus some amount in difference vector direction,
    7173                                                                        //<! depending on whether it is better to close up or survive.
    7274            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_
    7475            void doFire();  //<! choose weapon, set aim at target_ and fire
    7576            WeakPtr<ControllableEntity> target_;
     
    8485            bool bDodge_;
    8586            int attackRange_;
    86             bool bShooting_;
    8787            bool bLookAtTarget_;
    8888            float deltaHp;
Note: See TracChangeset for help on using the changeset viewer.