Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 16, 2008, 6:01:13 PM (16 years ago)
Author:
landauf
Message:

Merged objecthierarchy2 into presentation branch

Couln't merge 2 lines in Gamestate.cc and a whole block of code in GSDedicated.cc (it seems like oli implemented in both branches something like a network-tick-limiter but with different approaches)

Not yet tested in network mode and with bots
The SpaceShips movement is also not yet fully adopted to the new physics (see Engine class)

Location:
code/branches/presentation
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/branches/presentation

  • code/branches/presentation/src/orxonox/objects/worldentities/pawns/Pawn.h

    r2098 r2485  
    3333
    3434#include "objects/worldentities/ControllableEntity.h"
     35#include "objects/RadarViewable.h"
    3536
    3637namespace orxonox
    3738{
    38     class _OrxonoxExport Pawn : public ControllableEntity
     39    class _OrxonoxExport Pawn : public ControllableEntity, public RadarViewable
    3940    {
    4041        public:
     
    5455            inline void removeHealth(float health)
    5556                { this->setHealth(this->health_ - health); }
    56             inline float getHealht() const
     57            inline float getHealth() const
    5758                { return this->health_; }
    5859
     
    7879            virtual void postSpawn();
    7980
     81            inline const WorldEntity* getWorldEntity() const
     82                { return (WorldEntity*)this; }
     83
     84            inline void setSpawnParticleSource(const std::string& source)
     85                { this->spawnparticlesource_ = source; }
     86            inline const std::string& getSpawnParticleSource() const
     87                { return this->spawnparticlesource_; }
     88
     89            inline void setSpawnParticleDuration(float duration)
     90                { this->spawnparticleduration_ = duration; }
     91            inline float getSpawnParticleDuration() const
     92                { return this->spawnparticleduration_; }
     93
     94            inline void setExplosionChunks(unsigned int chunks)
     95                { this->numexplosionchunks_ = chunks; }
     96            inline unsigned int getExplosionChunks() const
     97                { return this->numexplosionchunks_; }
     98
    8099        protected:
    81             virtual void spawn();
    82100            virtual void death();
     101            virtual void deatheffect();
     102            virtual void spawneffect();
    83103
    84104            bool bAlive_;
     
    91111
    92112            WeaponSystem* weaponSystem_;
     113
     114            std::string spawnparticlesource_;
     115            float spawnparticleduration_;
     116            unsigned int numexplosionchunks_;
     117    };
     118
     119    class _OrxonoxExport PawnListener : public OrxonoxClass
     120    {
     121        friend class Pawn;
     122
     123        public:
     124            PawnListener();
     125            virtual ~PawnListener() {}
     126
     127        protected:
     128            virtual void destroyedPawn(Pawn* pawn) = 0;
    93129    };
    94130}
Note: See TracChangeset for help on using the changeset viewer.