Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changes between Version 14 and Version 15 of code/doc/Pickups


Ignore:
Timestamp:
Aug 24, 2010, 3:54:14 PM (14 years ago)
Author:
dafrick
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • code/doc/Pickups

    v14 v15  
    194194
    195195Please be aware, that these three methods are methods registered with Super, meaning, that whenever overloading them, don't forget to call SUPER(MyClass, myMethod);
    196 [[BR]]Also when implementing the above methods you should think of what should happen in unexpected situations, e.g. when your pickup is unused and set to used again. 
     196[[BR]]Also when implementing the above methods you should think of what should happen in unexpected situations, e.g. when your pickup is unused and set to used again.
     197[[BR]]Additionally you should use the destroy() method of Pickupable instead of the method rovided by Orxonox Class, meaning Pickupable::destroy() instead of plain destroy().
    197198
    198199 * clone() The clone() method creates a new pickup of the same type as the pickup it is cloned from. So the cloned pickup is not exactly the same, as it doesn't necessarily completely reflect the status of the pickup it is cloned from, but all the parameters and their values, that distinguish different types of this pickup class. It needs to be implemented by every pickup class. And it is best if this is done in a very specific way. Below is shown how: