Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Feb 11, 2018, 10:31:46 PM (7 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/SpicedAsteroidBelt.h

    r11731 r11736  
    4949#include "AsteroidMiningPrereqs.h"
    5050
    51 #include <string>
    52 #include <vector>
    53 #include "worldentities/ControllableEntity.h"
    54 
    55 #include "../../orxonox/worldentities/pawns/Pawn.h"
     51#include "core/BaseObject.h"
     52#include "tools/interfaces/Tickable.h"
    5653
    5754namespace orxonox // tolua_export
     
    5956
    6057    // tolua_export
    61     class _AsteroidMiningExport SpicedAsteroidBelt : public Pawn // need pawn to get tick for clean argument passing
     58    class _AsteroidMiningExport SpicedAsteroidBelt : public BaseObject, public Tickable
    6259    { // tolua_export
    6360
    6461        public:
    6562            SpicedAsteroidBelt(Context* context);// This constructor is for XML access only!
     63            virtual ~SpicedAsteroidBelt();
    6664
    67             virtual ~SpicedAsteroidBelt();
    6865            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
    69             virtual void XMLEventPort(Element& xmlelement, XMLPort::Mode mode) override;
    7066            virtual void tick(float dt) override;
    71 
    7267
    7368            inline void setCount(float s){this->count = s;}
     
    109104        protected:
    110105
    111             Context* context;
    112 
    113106            float count; //!< Approximate number of asteroids
    114107            float mDensity; //!< Approximate commonness of asteroids that yield stuff, value between 0 and 1;
     
    131124
    132125        private:
    133             void registerVariables();
    134            
    135126            virtual void create();
    136127
Note: See TracChangeset for help on using the changeset viewer.