Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 26, 2010, 4:28:14 PM (14 years ago)
Author:
gnadler
Message:

now rocket slows and then finally stops after a given number of ticks (aka fuel).
rocket speeds up if distance is greater than x (right now 1000 but can be changed).
collisionShape not yet fixed.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/rocket2/src/modules/weapons/projectiles/SimpleRocket.h

    r6951 r6966  
    3434#include "tools/Timer.h"
    3535#include "worldentities/ControllableEntity.h"
     36#include "graphics/ParticleSpawner.h"
    3637
    3738namespace orxonox
     
    5657            virtual bool collidesAgainst(WorldEntity* otherObject, btManifoldPoint& contactPoint);
    5758            void destroyObject();
     59
     60            void disableFire();
    5861
    5962            virtual void moveFrontBack(const Vector2& value){}
     
    9699            */
    97100            inline void rotatePitch(float value)
    98             {   COUT(0)<<"rotated rocket yaw";
     101            {   
    99102                                this->rotatePitch(Vector2(value, 0)); }
    100103            /**
     
    104107            inline void rotateRoll(float value)
    105108            {
    106                                 COUT(0)<<"rotated rocket roll";
    107109                                this->rotateRoll(Vector2(value, 0)); }
    108110
     
    110112            inline Pawn* getOwner() const
    111113                { return this->owner_; }
     114            inline bool hasFuel()
     115            { return this->fuel_;}
     116
     117            inline void fuelRefill()
     118            {this->fuel_=true;}
    112119
    113120            inline void setDamage(float damage)
     
    123130            float damage_;
    124131            bool bDestroy_;
     132            bool fuel_;
     133            bool slowing_;
     134            int counter_;
    125135
    126136
     
    128138            Timer destroyTimer_;
    129139            float lifetime_;
     140            ParticleEmitter* fire_;
     141
    130142
    131143    };
Note: See TracChangeset for help on using the changeset viewer.