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/SpicedAsteroidField.h

    r11731 r11736  
    4343#include "AsteroidMiningPrereqs.h"
    4444
    45 #include <string>
    46 #include <vector>
    47 
    48 #include "worldentities/ControllableEntity.h"
    49 #include "../../orxonox/worldentities/pawns/Pawn.h"
     45#include "core/BaseObject.h"
     46#include "tools/interfaces/Tickable.h"
    5047
    5148namespace orxonox // tolua_export
     
    5350
    5451    // tolua_export
    55     class _AsteroidMiningExport SpicedAsteroidField : public Pawn // need pawn to get tick for clean argument passing
     52    class _AsteroidMiningExport SpicedAsteroidField : public BaseObject, public Tickable
    5653    { // tolua_export
    5754
    5855        public:
    59             SpicedAsteroidField(Context* context);// This constructor is for XML access only!
    60             SpicedAsteroidField(Context* c, Vector3 p, int minS, int maxS, int w, int count, bool f, float mD, float fD);
     56            SpicedAsteroidField(Context* context);
     57            virtual ~SpicedAsteroidField();
    6158
    62             virtual ~SpicedAsteroidField();
    6359            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
    64             virtual void XMLEventPort(Element& xmlelement, XMLPort::Mode mode) override;
    6560            virtual void tick(float dt) override;
    66 
    6761
    6862            inline void setCount(float s){this->count = s;}
     
    9286        protected:
    9387
    94             Context* context;
    95 
    9688            float count; //!< Number of asteroids generated
    9789            float mDensity; //!< Mineral density, between 0 and 1;
     
    108100
    109101        private:
    110             void registerVariables();
    111 
    112102            virtual void create();
    113103
Note: See TracChangeset for help on using the changeset viewer.