Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Aug 22, 2011, 3:05:26 PM (14 years ago)
Author:
dafrick
Message:

Cleaning up game immersion. Roughly documenting weapons module.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/src/modules/weapons/RocketController.h

    r7163 r8855  
    2121 *
    2222 *   Author:
    23  *      Gabriel Nadler, Originalfile: Oli Scheuss
     23 *      Gabriel Nadler
    2424 *   Co-authors:
    2525 *      ...
    2626 *
    2727 */
     28
     29/**
     30    @file RocketController.h
     31    @brief Definition of the RocketController class.
     32*/
    2833
    2934#ifndef _RocketController_H__
     
    3237#include "weapons/WeaponsPrereqs.h"
    3338
     39#include "tools/interfaces/Tickable.h"
    3440#include "controllers/Controller.h"
    35 #include "tools/interfaces/Tickable.h"
    36 #include "weapons/projectiles/SimpleRocket.h"
    37 #include "weapons/weaponmodes/SimpleRocketFire.h"
    3841
    3942namespace orxonox
     
    4144    /**
    4245    @brief
    43         Controller for the Rocket (targetseeking)
     46        Controller for the SimpleRocket (target seeking)
    4447    @author
    45         Gabriel Nadler, Originalfile: Oli Scheuss
     48        Gabriel Nadler
     49    @ingroup Weapons
    4650    */
    4751    class _WeaponsExport RocketController : public Controller, public Tickable
     
    5256
    5357            virtual void tick(float dt);
     58            /**
     59            @brief Get the rocket that is controlled by this controller.
     60            @return Returns a pointer to the rocket.
     61            */
    5462            SimpleRocket* getRocket() const
    55              {  return this->rocket_;  };
    56             void setTarget(WorldEntity* target);
     63                { return this->rocket_; };
     64
     65            /**
     66            @brief Set the target of the rocket.
     67            @param target A pointer to the target.
     68            */
     69            void setTarget(WorldEntity* target)
     70                { this->target_ = target; }
     71
    5772        protected:
     73            void updateTargetPosition();
    5874            void moveToPosition(const Vector3& target);
    59             void setTargetPosition();
    60             void moveToTargetPosition();
    6175
    6276        private:
    63             SimpleRocket* rocket_; //!<The Rocket it controlls
    64             Vector3 targetPosition_;
    65             WeakPtr<PlayerInfo> player_;
     77            SimpleRocket* rocket_; //!< The Rocket it controls.
     78            Vector3 targetPosition_; //!< The position of the target.
     79            WeakPtr<PlayerInfo> player_; //!< The player the rocket belongs to.
    6680
    67             WeakPtr<WorldEntity> target_;
    68 
    69 
     81            WeakPtr<WorldEntity> target_; //!< The target.
    7082    };
    7183}
Note: See TracChangeset for help on using the changeset viewer.