Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Feb 11, 2018, 10:31:46 PM (6 years ago)
Author:
landauf
Message:

[AsteroidMining_HS17] some cleanup - Field and Belt should not depend on Pawn, should not be synchronized either (server-side logic). also removed additional constructors and replaced with regular setters.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/Presentation_HS17_merge/src/modules/asteroidmining/AsteroidMinable.h

    r11732 r11736  
    7676#include "AsteroidMiningPrereqs.h"
    7777
    78 #include <string>
    79 #include <vector>
    80 #include "interfaces/PickupCarrier.h"
    81 #include "interfaces/RadarViewable.h"
    82 #include "worldentities/ControllableEntity.h"
    83 #include "worldentities/ExplosionPart.h"
    84 
    85 #include "../../orxonox/worldentities/pawns/Pawn.h"
     78#include "worldentities/pawns/Pawn.h"
    8679
    8780namespace orxonox{
    8881
    8982
    90     class _AsteroidMiningExport AsteroidMinable : public Pawn{
     83    class _AsteroidMiningExport AsteroidMinable : public Pawn
     84    {
     85        public:
     86            AsteroidMinable(Context* context);
     87            virtual ~AsteroidMinable();
    9188
    92         public:
    93             // @brief This constructor is for XML access only!
    94             AsteroidMinable(Context* context);
    95             // @brief Call this Constructor from other C-files.
    96             AsteroidMinable(Context* c, float size, Vector3 position, bool dS);
    97 
    98             virtual ~AsteroidMinable();
    9989            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
    100             virtual void XMLEventPort(Element& xmlelement, XMLPort::Mode mode) override;
    10190            virtual void tick(float dt) override;
    10291
     
    10594            virtual void hit(Pawn* originator, btManifoldPoint& contactpoint, const btCollisionShape* cs, float damage, float healthdamage = 0.0f, float shielddamage = 0.0f);
    10695
    107             inline void setSize(int s){this->size = s;}
     96            void setSize(int s);
    10897            inline int getSize(){return this->size;}
    10998
    110             inline void toggleShattering(bool b){this->generateSmaller = b;}
     99            inline void setShattering(bool b){this->generateSmaller = b;}
    111100            inline bool doesShatter(){return this->generateSmaller;}
    112101
    113             inline void toggleDropStuff(bool b){this->dropStuff = b;}
     102            inline void setDropStuff(bool b){this->dropStuff = b;}
    114103            inline bool doesDropStuff(){return this->dropStuff;}
    115104
    116105        protected:
    117 
    118             Context* context;
    119106
    120107            int size; //!< Implies health and type of dropped pickups
Note: See TracChangeset for help on using the changeset viewer.