Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jul 21, 2012, 3:34:45 PM (13 years ago)
Author:
landauf
Message:

refactored PickupSpawner - it doesn't clone a sample-pickup anymore, it creates new pickups from a template.
removed DroppedPickup because it is not needed anymore, PickupSpawner has now the same functionality.
the representation of the pickup spawner is now destroyed if the pickup is taken and re-created if it spawns again (instead of changing the visibility). makes it easier to change the pickup in a spawner during the game.
adjusted all level files accordingly

File:
1 edited

Legend:

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

    r9318 r9319  
    3737#include "util/StringUtils.h"
    3838
    39 #include "DroppedPickup.h"
     39#include "PickupSpawner.h"
    4040
    4141namespace orxonox
     
    201201    @brief
    202202        Facilitates the creation of a PickupSpawner upon dropping of the Pickupable.
    203         This method must be implemented by any class directly inheriting from Pickupable. It is most easily done by just creating a new DroppedPickup, e.g.:
    204         DroppedPickup(BaseObject* creator, Pickupable* pickup, const Vector3& position);
    205203    @return
    206204        Returns true if a spawner was created, false if not.
     
    208206    bool Pickup::createSpawner(void)
    209207    {
    210         new DroppedPickup(this, this, this->getCarrier());
     208        PickupSpawner::createDroppedPickup(this, this, this->getCarrier());
    211209        return true;
    212210    }
Note: See TracChangeset for help on using the changeset viewer.