Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Aug 9, 2013, 9:26:46 PM (11 years ago)
Author:
landauf
Message:

BaseObject now requires a Context instead of a creator (BaseObject*) in its constructor.
Namespace, Level, and Scene inherit from Context

Location:
code/branches/core6/src/modules/pickup
Files:
24 edited

Legend:

Unmodified
Added
Removed
  • code/branches/core6/src/modules/pickup/Pickup.cc

    r9348 r9629  
    5656        The objects creator.
    5757    */
    58     Pickup::Pickup(BaseObject* creator) : BaseObject(creator)
     58    Pickup::Pickup(Context* context) : BaseObject(context)
    5959    {
    6060        RegisterObject(Pickup);
     
    187187    bool Pickup::createSpawner(void)
    188188    {
    189         PickupSpawner::createDroppedPickup(this, this, this->getCarrier());
     189        PickupSpawner::createDroppedPickup(this->getContext(), this, this->getCarrier());
    190190        return true;
    191191    }
  • code/branches/core6/src/modules/pickup/Pickup.h

    r9348 r9629  
    100100
    101101        public:
    102             Pickup(BaseObject* creator); //!< Constructor.
     102            Pickup(Context* context); //!< Constructor.
    103103            virtual ~Pickup(); //!< Destructor.
    104104
  • code/branches/core6/src/modules/pickup/PickupCollection.cc

    r9348 r9629  
    5353        The creator of the object.
    5454    */
    55     PickupCollection::PickupCollection(BaseObject* creator) : BaseObject(creator)
     55    PickupCollection::PickupCollection(Context* context) : BaseObject(context)
    5656    {
    5757        RegisterObject(PickupCollection);
     
    328328    bool PickupCollection::createSpawner(void)
    329329    {
    330         PickupSpawner::createDroppedPickup(this, this, this->getCarrier());
     330        PickupSpawner::createDroppedPickup(this->getContext(), this, this->getCarrier());
    331331        return true;
    332332    }
  • code/branches/core6/src/modules/pickup/PickupCollection.h

    r9348 r9629  
    7070
    7171        public:
    72             PickupCollection(BaseObject* creator); //!< Default Constructor.
     72            PickupCollection(Context* context); //!< Default Constructor.
    7373            virtual ~PickupCollection(); //!< Destructor.
    7474
  • code/branches/core6/src/modules/pickup/PickupRepresentation.cc

    r9348 r9629  
    6464        Default Constructor. Registers the object and initializes its member variables.
    6565    */
    66     PickupRepresentation::PickupRepresentation(BaseObject* creator) : BaseObject(creator), Synchronisable(creator), spawnerRepresentation_(NULL)
     66    PickupRepresentation::PickupRepresentation(Context* context) : BaseObject(context), Synchronisable(context), spawnerRepresentation_(NULL)
    6767    {
    6868        RegisterObject(PickupRepresentation);
     
    180180    StaticEntity* PickupRepresentation::getDefaultSpawnerRepresentation(PickupSpawner* spawner)
    181181    {
    182         StaticEntity* representation = new StaticEntity(spawner);
    183         Billboard* sphere = new Billboard(spawner);
     182        StaticEntity* representation = new StaticEntity(spawner->getContext());
     183        Billboard* sphere = new Billboard(spawner->getContext());
    184184        sphere->setColour(ColourValue(0.95f, 0.85f, 0.27f));
    185185        sphere->setMaterial("Sphere2");
    186186        sphere->setScale(0.1f);
    187         Billboard* icon = new Billboard(spawner);
     187        Billboard* icon = new Billboard(spawner->getContext());
    188188        icon->setColour(ColourValue(0.89f, 0.79f, 0.08f));
    189189        icon->setMaterial("asterisk");
  • code/branches/core6/src/modules/pickup/PickupRepresentation.h

    r9348 r9629  
    9595        public:
    9696            PickupRepresentation(); //!< Constructor
    97             PickupRepresentation(BaseObject* creator); //!< Default constructor.
     97            PickupRepresentation(Context* context); //!< Default constructor.
    9898            virtual ~PickupRepresentation(); //!< Destructor.
    9999
  • code/branches/core6/src/modules/pickup/PickupSpawner.cc

    r9348 r9629  
    5555        Pointer to the object which created this item.
    5656    */
    57     PickupSpawner::PickupSpawner(BaseObject* creator) : StaticEntity(creator), pickup_(NULL), representation_(NULL), pickupTemplate_(NULL)
     57    PickupSpawner::PickupSpawner(Context* context) : StaticEntity(context), pickup_(NULL), representation_(NULL), pickupTemplate_(NULL)
    5858    {
    5959        RegisterObject(PickupSpawner);
     
    9999        The distance at which the PickupSpawner will trigger.
    100100    */
    101     /*static*/ PickupSpawner* PickupSpawner::createDroppedPickup(BaseObject* creator, Pickupable* pickup, PickupCarrier* carrier, float triggerDistance)
    102     {
    103         PickupSpawner* spawner = new PickupSpawner(creator);
     101    /*static*/ PickupSpawner* PickupSpawner::createDroppedPickup(Context* context, Pickupable* pickup, PickupCarrier* carrier, float triggerDistance)
     102    {
     103        PickupSpawner* spawner = new PickupSpawner(context);
    104104
    105105        spawner->setPickupable(pickup);
     
    289289            if (identifier != NULL)
    290290            {
    291                 Pickupable* pickup = orxonox_cast<Pickupable*>(identifier->fabricate(this));
     291                Pickupable* pickup = orxonox_cast<Pickupable*>(identifier->fabricate(this->getContext()));
    292292                orxonox_cast<BaseObject*>(pickup)->addTemplate(this->pickupTemplate_);
    293293                return pickup;
  • code/branches/core6/src/modules/pickup/PickupSpawner.h

    r9348 r9629  
    7777    {
    7878        public:
    79             PickupSpawner(BaseObject* creator); //!< Default Constructor.
     79            PickupSpawner(Context* context); //!< Default Constructor.
    8080            virtual ~PickupSpawner(); //!< Destructor.
    8181
    82             static PickupSpawner* createDroppedPickup(BaseObject* creator, Pickupable* pickup, PickupCarrier* carrier, float triggerDistance = 10.0);
     82            static PickupSpawner* createDroppedPickup(Context* context, Pickupable* pickup, PickupCarrier* carrier, float triggerDistance = 10.0);
    8383
    8484            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);  //!< Method for creating a PickupSpawner through XML.
  • code/branches/core6/src/modules/pickup/items/DamageBoostPickup.cc

    r9348 r9629  
    4848        Constructor. Registers the object and initializes the member variables.
    4949    */
    50     DamageBoostPickup::DamageBoostPickup(BaseObject* creator) : Pickup(creator)
     50    DamageBoostPickup::DamageBoostPickup(Context* context) : Pickup(context)
    5151    {
    5252        RegisterObject(DamageBoostPickup);
  • code/branches/core6/src/modules/pickup/items/DamageBoostPickup.h

    r9348 r9629  
    4949        public:
    5050
    51             DamageBoostPickup(BaseObject* creator); //!< Constructor.
     51            DamageBoostPickup(Context* context); //!< Constructor.
    5252            virtual ~DamageBoostPickup(); //!< Destructor.
    5353
  • code/branches/core6/src/modules/pickup/items/DronePickup.cc

    r9348 r9629  
    5151        Constructor. Registers the object and initializes the member variables.
    5252    */
    53     DronePickup::DronePickup(BaseObject* creator) : Pickup(creator)
     53    DronePickup::DronePickup(Context* context) : Pickup(context)
    5454    {
    5555        RegisterObject(DronePickup);
     
    126126
    127127                //Attach to pawn
    128                 Drone* drone = new Drone(pawn->getCreator()); // this is neccessary because the projectiles fired need a valid creator for the particlespawner (when colliding against something)
     128                Drone* drone = new Drone(pawn->getContext()); // this is neccessary because the projectiles fired need a valid creator for the particlespawner (when colliding against something)
    129129                drone->addTemplate(this->getDroneTemplate());
    130130
  • code/branches/core6/src/modules/pickup/items/DronePickup.h

    r9348 r9629  
    6464        public:
    6565
    66             DronePickup(BaseObject* creator); //!< Constructor.
     66            DronePickup(Context* context); //!< Constructor.
    6767            virtual ~DronePickup(); //!< Destructor.
    6868
  • code/branches/core6/src/modules/pickup/items/HealthPickup.cc

    r9348 r9629  
    5353        Constructor. Registers the object and initializes the member variables.
    5454    */
    55     HealthPickup::HealthPickup(BaseObject* creator) : Pickup(creator)
     55    HealthPickup::HealthPickup(Context* context) : Pickup(context)
    5656    {
    5757        RegisterObject(HealthPickup);
  • code/branches/core6/src/modules/pickup/items/HealthPickup.h

    r9348 r9629  
    9090        public:
    9191
    92             HealthPickup(BaseObject* creator); //!< Constructor.
     92            HealthPickup(Context* context); //!< Constructor.
    9393            virtual ~HealthPickup(); //!< Destructor.
    9494
  • code/branches/core6/src/modules/pickup/items/InvisiblePickup.cc

    r9348 r9629  
    5151        Constructor. Registers the object and initializes the member variables.
    5252    */
    53     InvisiblePickup::InvisiblePickup(BaseObject* creator) : Pickup(creator)
     53    InvisiblePickup::InvisiblePickup(Context* context) : Pickup(context)
    5454    {
    5555        RegisterObject(InvisiblePickup);
  • code/branches/core6/src/modules/pickup/items/InvisiblePickup.h

    r9348 r9629  
    7070        public:
    7171
    72             InvisiblePickup(BaseObject* creator); //!< Constructor.
     72            InvisiblePickup(Context* context); //!< Constructor.
    7373            virtual ~InvisiblePickup(); //!< Destructor.
    7474
  • code/branches/core6/src/modules/pickup/items/MetaPickup.cc

    r9348 r9629  
    5555        Constructor. Registers and initializes the object.
    5656    */
    57     MetaPickup::MetaPickup(BaseObject* creator) : Pickup(creator)
     57    MetaPickup::MetaPickup(Context* context) : Pickup(context)
    5858    {
    5959        RegisterObject(MetaPickup);
  • code/branches/core6/src/modules/pickup/items/MetaPickup.h

    r9348 r9629  
    8989
    9090        public:
    91             MetaPickup(BaseObject* creator); //!< Constructor. Registers and initializes the object.
     91            MetaPickup(Context* context); //!< Constructor. Registers and initializes the object.
    9292            virtual ~MetaPickup(); //!< Destructor.
    9393
  • code/branches/core6/src/modules/pickup/items/ShieldPickup.cc

    r9348 r9629  
    4848        Constructor. Registers the object and initializes the member variables.
    4949    */
    50     ShieldPickup::ShieldPickup(BaseObject* creator) : Pickup(creator)
     50    ShieldPickup::ShieldPickup(Context* context) : Pickup(context)
    5151    {
    5252        RegisterObject(ShieldPickup);
  • code/branches/core6/src/modules/pickup/items/ShieldPickup.h

    r9348 r9629  
    7676        public:
    7777
    78             ShieldPickup(BaseObject* creator); //!< Constructor.
     78            ShieldPickup(Context* context); //!< Constructor.
    7979            virtual ~ShieldPickup(); //!< Destructor.
    8080
  • code/branches/core6/src/modules/pickup/items/ShrinkPickup.cc

    r9348 r9629  
    5252        Constructor: Initializes the Pickup.
    5353    */
    54     ShrinkPickup::ShrinkPickup(BaseObject* creator) : Pickup(creator)
     54    ShrinkPickup::ShrinkPickup(Context* context) : Pickup(context)
    5555    {
    5656        RegisterObject(ShrinkPickup);
  • code/branches/core6/src/modules/pickup/items/ShrinkPickup.h

    r9348 r9629  
    7272    {
    7373        public:
    74             ShrinkPickup(BaseObject* creator); // Constructor.
     74            ShrinkPickup(Context* context); // Constructor.
    7575            virtual ~ShrinkPickup(); // Destructor.
    7676
  • code/branches/core6/src/modules/pickup/items/SpeedPickup.cc

    r9348 r9629  
    4848        Constructor. Registers the object and initializes the member variables.
    4949    */
    50     SpeedPickup::SpeedPickup(BaseObject* creator) : Pickup(creator)
     50    SpeedPickup::SpeedPickup(Context* context) : Pickup(context)
    5151    {
    5252        RegisterObject(SpeedPickup);
  • code/branches/core6/src/modules/pickup/items/SpeedPickup.h

    r9348 r9629  
    7575        public:
    7676
    77             SpeedPickup(BaseObject* creator); //!< Constructor.
     77            SpeedPickup(Context* context); //!< Constructor.
    7878            virtual ~SpeedPickup(); //!< Destructor.
    7979
Note: See TracChangeset for help on using the changeset viewer.