Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jul 21, 2012, 3:34:45 PM (12 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/PickupCollection.cc

    r9318 r9319  
    3838
    3939#include "CollectiblePickup.h"
    40 #include "DroppedPickup.h"
     40#include "PickupSpawner.h"
    4141
    4242#include "PickupCollection.h"
     
    348348    @brief
    349349        Facilitates the creation of a PickupSpawner upon dropping of the Pickupable.
    350         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.:
    351         DroppedPickup(BaseObject* creator, Pickupable* pickup, const Vector3& position);
    352350    @return
    353351        Returns true if a spawner was created, false if not.
     
    355353    bool PickupCollection::createSpawner(void)
    356354    {
    357         new DroppedPickup(this, this, this->getCarrier());
     355        PickupSpawner::createDroppedPickup(this, this, this->getCarrier());
    358356        return true;
    359357    }
Note: See TracChangeset for help on using the changeset viewer.