Changeset 9241 for code/branches/presentation2012/src/modules/pickup
- Timestamp:
- May 24, 2012, 8:49:19 PM (13 years ago)
- Location:
- code/branches/presentation2012
- Files:
-
- 5 edited
- 2 copied
Legend:
- Unmodified
- Added
- Removed
-
code/branches/presentation2012
- Property svn:mergeinfo changed
/code/branches/newlevel2012 merged: 9236
- Property svn:mergeinfo changed
-
code/branches/presentation2012/src
-
Property
svn:mergeinfo
set to
(toggle deleted branches)
/code/branches/dockingsystem2/src merged eligible /code/branches/environment3/src merged eligible /code/branches/formation/src merged eligible /code/branches/gamecontent/src merged eligible /code/branches/hud/src merged eligible /code/branches/masterserverfix/src merged eligible /code/branches/menue/src merged eligible /code/branches/newlevel2012/src merged eligible /code/branches/output/src merged eligible /code/branches/pickup2012/src merged eligible /code/branches/presentation/src merged eligible /code/branches/presentation2011/src merged eligible /code/branches/shipSelection/src merged eligible /code/branches/sound2012/src merged eligible /code/branches/spacegate/src merged eligible /code/branches/spaceraceTwo/src merged eligible /code/branches/surfaceRace/src merged eligible /code/branches/usability/src merged eligible /code/trunk/src merged eligible /code/branches/ai/src 6592-7033 /code/branches/ai2/src 8721-8880 /code/branches/bigships/src 8137-8588 /code/branches/buildsystem/src 1874-2276,2278-2400 /code/branches/buildsystem2/src 2506-2658 /code/branches/buildsystem3/src 2662-2708 /code/branches/ceguilua/src 1802-1808 /code/branches/chat/src 6527-6797 /code/branches/chat2/src 6836-6910 /code/branches/console/src 5941-6104 /code/branches/consolecommands2/src 6451-7178 /code/branches/consolecommands3/src 7178-7283 /code/branches/core3/src 1572-1739 /code/branches/core4/src 3221-3224,3227,3234-3238,3242,3244-3250,3252-3254,3256,3259-3261,3264-3265,3268-3275,3277-3278,3280,3284-3285,3287,3289-3294,3305,3309-3310 /code/branches/core5/src 5768-5928,6009 /code/branches/data_cleanup/src 7537-7686 /code/branches/doc/src 7290-7400 /code/branches/dockingsystem/src 8101-8192 /code/branches/dynamicmatch/src 6584-7030 /code/branches/fps/src 6591-7072 /code/branches/gameimmersion/src 8102-8577 /code/branches/gamestate/src 6430-6572,6621-6661 /code/branches/gamestates2/src 6594-6745 /code/branches/gametypes/src 2826-3031 /code/branches/gcc43/src 1580 /code/branches/gui/src 1635-1723,2795-2894 /code/branches/hudelements/src 6584-6941 /code/branches/hudimprovements/src 7920-8672 /code/branches/ingamemenu/src 6000-6023 /code/branches/input/src 1629-1636 /code/branches/ipv6/src 7293-7458 /code/branches/kicklib/src 7940-8096,8098-8277 /code/branches/kicklib2/src 8282-8350 /code/branches/lastmanstanding/src 7479-7644 /code/branches/lastmanstanding3/src 7903-8175 /code/branches/libraries/src 5612-5692 /code/branches/libraries2/src 5703-5737 /code/branches/lod/src 6586-6911 /code/branches/lodfinal/src 2372-2411 /code/branches/mac_osx/src 7789-8128,8135 /code/branches/map/src 2801-3086,3089 /code/branches/masterserver/src 7502-7738 /code/branches/menu/src 5941-6146,6148,7536-7687 /code/branches/miniprojects/src 2754-2824 /code/branches/netp2/src 2835-2988 /code/branches/netp3/src 2988-3082 /code/branches/netp6/src 3214-3302 /code/branches/network/src 2356 /code/branches/network2/src 6434-6465 /code/branches/network3/src 7196-7344 /code/branches/network4/src 7497-7755 /code/branches/network5/src 7757-7781 /code/branches/network6/src 7823-8315 /code/branches/network64/src 2210-2355 /code/branches/notifications/src 7314-7401 /code/branches/objecthierarchy/src 1911-2085,2100,2110-2169 /code/branches/objecthierarchy2/src 2171-2479 /code/branches/ois_update/src 7506-7788 /code/branches/overlay/src 2117-2385 /code/branches/particles/src 2829-3085 /code/branches/particles2/src 6050-6106,6109 /code/branches/pch/src 3113-3194 /code/branches/physics/src 1912-2055,2107-2439 /code/branches/physics_merge/src 2436-2457 /code/branches/pickup/src 8145-8555 /code/branches/pickup2/src 5942-6405 /code/branches/pickup3/src 6418-6523 /code/branches/pickup4/src 6594-6710 /code/branches/pickups/src 1926-2086,2127,2827-2915 /code/branches/pickups2/src 2107-2497,2915-3071 /code/branches/png2/src 7262-7263 /code/branches/portals/src 8087-8455 /code/branches/portals2/src 8460-8602 /code/branches/ppspickups1/src 6552-6708 /code/branches/ppspickups2/src 6527-6532,6554-6709 /code/branches/ppspickups3/src 6757-6997 /code/branches/ppspickups4/src 7003-7089 /code/branches/presentation2/src 6106-6416,7787-7800 /code/branches/presentation3/src 6913-7162 /code/branches/questsystem/src 1894-2088 /code/branches/questsystem2/src 2107-2259 /code/branches/questsystem5/src 2776-2905 /code/branches/releasetodo/src 7614-7647 /code/branches/resource/src 3327-3366 /code/branches/resource2/src 3372-5694 /code/branches/rocket/src 6523-6950 /code/branches/rocket2/src 6953-6970 /code/branches/script_trigger/src 1295-1953,1955 /code/branches/skybox2/src 6559-6989 /code/branches/sound/src 2829-3010 /code/branches/sound3/src 5941-6102 /code/branches/spaceboundaries/src 8085-8457 /code/branches/spaceboundaries2/src 8460-8613 /code/branches/spacerace/src 8182-8630 /code/branches/steering/src 5949-6091,8140-8595 /code/branches/tetris/src 8100-8563 /code/branches/tutoriallevel/src 7827-8370 /code/branches/tutoriallevel2/src 8370-8452 /code/branches/tutoriallevel3/src 8453-8636 /code/branches/unity_build/src 8440-8716 /code/branches/weapon/src 1925-2094 /code/branches/weapon2/src 2107-2488 /code/branches/weapons/src 2897-3051,8143-8591 /code/branches/weaponsystem/src 2742-2890
-
Property
svn:mergeinfo
set to
(toggle deleted branches)
-
code/branches/presentation2012/src/modules
-
Property
svn:mergeinfo
set to
(toggle deleted branches)
/code/branches/dockingsystem2/src/modules merged eligible /code/branches/environment3/src/modules merged eligible /code/branches/formation/src/modules merged eligible /code/branches/gamecontent/src/modules merged eligible /code/branches/hud/src/modules merged eligible /code/branches/masterserverfix/src/modules merged eligible /code/branches/menue/src/modules merged eligible /code/branches/newlevel2012/src/modules merged eligible /code/branches/output/src/modules merged eligible /code/branches/pickup2012/src/modules merged eligible /code/branches/presentation/src/modules merged eligible /code/branches/presentation2011/src/modules merged eligible /code/branches/shipSelection/src/modules merged eligible /code/branches/sound2012/src/modules merged non-inheritable eligible /code/branches/spacegate/src/modules merged eligible /code/branches/spaceraceTwo/src/modules merged eligible /code/branches/surfaceRace/src/modules merged eligible /code/branches/usability/src/modules merged eligible /code/trunk/src/modules merged eligible /code/branches/ai/src/modules 6592-7033 /code/branches/ai2/src/modules 8721-8880 /code/branches/bigships/src/modules 8137-8588 /code/branches/buildsystem/src/modules 1874-2276,2278-2400 /code/branches/buildsystem2/src/modules 2506-2658 /code/branches/buildsystem3/src/modules 2662-2708 /code/branches/ceguilua/src/modules 1802-1808 /code/branches/chat/src/modules 6527-6797 /code/branches/chat2/src/modules 6836-6910 /code/branches/console/src/modules 5941-6104 /code/branches/consolecommands2/src/modules 6451-7178 /code/branches/consolecommands3/src/modules 7178-7283 /code/branches/core3/src/modules 1572-1739 /code/branches/core4/src/modules 3221-3224,3227,3234-3238,3242,3244-3250,3252-3254,3256,3259-3261,3264-3265,3268-3275,3277-3278,3280,3284-3285,3287,3289-3294,3305,3309-3310 /code/branches/core5/src/modules 5768-5928,6009 /code/branches/data_cleanup/src/modules 7537-7686 /code/branches/doc/src/modules 7290-7400 /code/branches/dockingsystem/src/modules 8101-8192 /code/branches/dynamicmatch/src/modules 6584-7030 /code/branches/fps/src/modules 6591-7072 /code/branches/gameimmersion/src/modules 8102-8577 /code/branches/gamestate/src/modules 6430-6572,6621-6661 /code/branches/gamestates2/src/modules 6594-6745 /code/branches/gametypes/src/modules 2826-3031 /code/branches/gcc43/src/modules 1580 /code/branches/gui/src/modules 1635-1723,2795-2894 /code/branches/hudelements/src/modules 6584-6941 /code/branches/hudimprovements/src/modules 7920-8672 /code/branches/ingamemenu/src/modules 6000-6023 /code/branches/input/src/modules 1629-1636 /code/branches/ipv6/src/modules 7293-7458 /code/branches/kicklib/src/modules 7940-8096,8098-8277 /code/branches/kicklib2/src/modules 8282-8350 /code/branches/lastmanstanding/src/modules 7479-7644 /code/branches/lastmanstanding3/src/modules 7903-8175 /code/branches/libraries/src/modules 5612-5692 /code/branches/libraries2/src/modules 5703-5737 /code/branches/lod/src/modules 6586-6911 /code/branches/lodfinal/src/modules 2372-2411 /code/branches/mac_osx/src/modules 7789-8128,8135 /code/branches/map/src/modules 2801-3086,3089 /code/branches/masterserver/src/modules 7502-7738 /code/branches/menu/src/modules 5941-6146,6148,7536-7687 /code/branches/miniprojects/src/modules 2754-2824 /code/branches/netp2/src/modules 2835-2988 /code/branches/netp3/src/modules 2988-3082 /code/branches/netp6/src/modules 3214-3302 /code/branches/network/src/modules 2356 /code/branches/network2/src/modules 6434-6465 /code/branches/network3/src/modules 7196-7344 /code/branches/network4/src/modules 7497-7755 /code/branches/network5/src/modules 7757-7781 /code/branches/network6/src/modules 7823-8315 /code/branches/network64/src/modules 2210-2355 /code/branches/notifications/src/modules 7314-7401 /code/branches/objecthierarchy/src/modules 1911-2085,2100,2110-2169 /code/branches/objecthierarchy2/src/modules 2171-2479 /code/branches/ois_update/src/modules 7506-7788 /code/branches/overlay/src/modules 2117-2385 /code/branches/particles/src/modules 2829-3085 /code/branches/particles2/src/modules 6050-6106,6109 /code/branches/pch/src/modules 3113-3194 /code/branches/physics/src/modules 1912-2055,2107-2439 /code/branches/physics_merge/src/modules 2436-2457 /code/branches/pickup/src/modules 8145-8555 /code/branches/pickup2/src/modules 5942-6405 /code/branches/pickup3/src/modules 6418-6523 /code/branches/pickup4/src/modules 6594-6710 /code/branches/pickups/src/modules 1926-2086,2127,2827-2915 /code/branches/pickups2/src/modules 2107-2497,2915-3071 /code/branches/png2/src/modules 7262-7263 /code/branches/portals/src/modules 8087-8455 /code/branches/portals2/src/modules 8460-8602 /code/branches/ppspickups1/src/modules 6552-6708 /code/branches/ppspickups2/src/modules 6527-6532,6554-6709 /code/branches/ppspickups3/src/modules 6757-6997 /code/branches/ppspickups4/src/modules 7003-7089 /code/branches/presentation2/src/modules 6106-6416,7787-7800 /code/branches/presentation3/src/modules 6913-7162 /code/branches/questsystem/src/modules 1894-2088 /code/branches/questsystem2/src/modules 2107-2259 /code/branches/questsystem5/src/modules 2776-2905 /code/branches/releasetodo/src/modules 7614-7647 /code/branches/resource/src/modules 3327-3366 /code/branches/resource2/src/modules 3372-5694 /code/branches/rocket/src/modules 6523-6950 /code/branches/rocket2/src/modules 6953-6970 /code/branches/script_trigger/src/modules 1295-1953,1955 /code/branches/skybox2/src/modules 6559-6989 /code/branches/sound/src/modules 2829-3010 /code/branches/sound3/src/modules 5941-6102 /code/branches/spaceboundaries/src/modules 8085-8457 /code/branches/spaceboundaries2/src/modules 8460-8613 /code/branches/spacerace/src/modules 8182-8630 /code/branches/steering/src/modules 5949-6091,8140-8595 /code/branches/tetris/src/modules 8100-8563 /code/branches/tutoriallevel/src/modules 7827-8370 /code/branches/tutoriallevel2/src/modules 8370-8452 /code/branches/tutoriallevel3/src/modules 8453-8636 /code/branches/unity_build/src/modules 8440-8716 /code/branches/weapon/src/modules 1925-2094 /code/branches/weapon2/src/modules 2107-2488 /code/branches/weapons/src/modules 2897-3051,8143-8591 /code/branches/weaponsystem/src/modules 2742-2890
-
Property
svn:mergeinfo
set to
(toggle deleted branches)
-
code/branches/presentation2012/src/modules/pickup
-
Property
svn:mergeinfo
set to
(toggle deleted branches)
/code/branches/dockingsystem2/src/modules/pickup merged eligible /code/branches/environment3/src/modules/pickup merged eligible /code/branches/formation/src/modules/pickup merged eligible /code/branches/gamecontent/src/modules/pickup merged eligible /code/branches/hud/src/modules/pickup merged eligible /code/branches/masterserverfix/src/modules/pickup merged eligible /code/branches/menue/src/modules/pickup merged eligible /code/branches/newlevel2012/src/modules/pickup merged eligible /code/branches/output/src/modules/pickup merged eligible /code/branches/pickup2012/src/modules/pickup merged eligible /code/branches/presentation/src/modules/pickup merged eligible /code/branches/presentation2011/src/modules/pickup merged eligible /code/branches/shipSelection/src/modules/pickup merged eligible /code/branches/sound2012/src/modules/pickup merged eligible /code/branches/spacegate/src/modules/pickup merged eligible /code/branches/spaceraceTwo/src/modules/pickup merged eligible /code/branches/surfaceRace/src/modules/pickup merged eligible /code/branches/usability/src/modules/pickup merged eligible /code/trunk/src/modules/pickup merged eligible /code/branches/ai/src/modules/pickup 6592-7033 /code/branches/ai2/src/modules/pickup 8721-8880 /code/branches/bigships/src/modules/pickup 8137-8588 /code/branches/buildsystem/src/modules/pickup 1874-2276,2278-2400 /code/branches/buildsystem2/src/modules/pickup 2506-2658 /code/branches/buildsystem3/src/modules/pickup 2662-2708 /code/branches/ceguilua/src/modules/pickup 1802-1808 /code/branches/chat/src/modules/pickup 6527-6797 /code/branches/chat2/src/modules/pickup 6836-6910 /code/branches/console/src/modules/pickup 5941-6104 /code/branches/consolecommands2/src/modules/pickup 6451-7178 /code/branches/consolecommands3/src/modules/pickup 7178-7283 /code/branches/core3/src/modules/pickup 1572-1739 /code/branches/core4/src/modules/pickup 3221-3224,3227,3234-3238,3242,3244-3250,3252-3254,3256,3259-3261,3264-3265,3268-3275,3277-3278,3280,3284-3285,3287,3289-3294,3305,3309-3310 /code/branches/core5/src/modules/pickup 5768-5928,6009 /code/branches/data_cleanup/src/modules/pickup 7537-7686 /code/branches/doc/src/modules/pickup 7290-7400 /code/branches/dockingsystem/src/modules/pickup 8101-8192 /code/branches/dynamicmatch/src/modules/pickup 6584-7030 /code/branches/fps/src/modules/pickup 6591-7072 /code/branches/gameimmersion/src/modules/pickup 8102-8577 /code/branches/gamestate/src/modules/pickup 6430-6572,6621-6661 /code/branches/gamestates2/src/modules/pickup 6594-6745 /code/branches/gametypes/src/modules/pickup 2826-3031 /code/branches/gcc43/src/modules/pickup 1580 /code/branches/gui/src/modules/pickup 1635-1723,2795-2894 /code/branches/hudelements/src/modules/pickup 6584-6941 /code/branches/hudimprovements/src/modules/pickup 7920-8672 /code/branches/ingamemenu/src/modules/pickup 6000-6023 /code/branches/input/src/modules/pickup 1629-1636 /code/branches/ipv6/src/modules/pickup 7293-7458 /code/branches/kicklib/src/modules/pickup 7940-8096,8098-8277 /code/branches/kicklib2/src/modules/pickup 8282-8350 /code/branches/lastmanstanding/src/modules/pickup 7479-7644 /code/branches/lastmanstanding3/src/modules/pickup 7903-8175 /code/branches/libraries/src/modules/pickup 5612-5692 /code/branches/libraries2/src/modules/pickup 5703-5737 /code/branches/lod/src/modules/pickup 6586-6911 /code/branches/lodfinal/src/modules/pickup 2372-2411 /code/branches/mac_osx/src/modules/pickup 7789-8128,8135 /code/branches/map/src/modules/pickup 2801-3086,3089 /code/branches/masterserver/src/modules/pickup 7502-7738 /code/branches/menu/src/modules/pickup 5941-6146,6148,7536-7687 /code/branches/miniprojects/src/modules/pickup 2754-2824 /code/branches/netp2/src/modules/pickup 2835-2988 /code/branches/netp3/src/modules/pickup 2988-3082 /code/branches/netp6/src/modules/pickup 3214-3302 /code/branches/network/src/modules/pickup 2356 /code/branches/network2/src/modules/pickup 6434-6465 /code/branches/network3/src/modules/pickup 7196-7344 /code/branches/network4/src/modules/pickup 7497-7755 /code/branches/network5/src/modules/pickup 7757-7781 /code/branches/network6/src/modules/pickup 7823-8315 /code/branches/network64/src/modules/pickup 2210-2355 /code/branches/notifications/src/modules/pickup 7314-7401 /code/branches/objecthierarchy/src/modules/pickup 1911-2085,2100,2110-2169 /code/branches/objecthierarchy2/src/modules/pickup 2171-2479 /code/branches/ois_update/src/modules/pickup 7506-7788 /code/branches/overlay/src/modules/pickup 2117-2385 /code/branches/particles/src/modules/pickup 2829-3085 /code/branches/particles2/src/modules/pickup 6050-6106,6109 /code/branches/pch/src/modules/pickup 3113-3194 /code/branches/physics/src/modules/pickup 1912-2055,2107-2439 /code/branches/physics_merge/src/modules/pickup 2436-2457 /code/branches/pickup/src/modules/pickup 8145-8555 /code/branches/pickup2/src/modules/pickup 5942-6405 /code/branches/pickup3/src/modules/pickup 6418-6523 /code/branches/pickup4/src/modules/pickup 6594-6710 /code/branches/pickups/src/modules/pickup 1926-2086,2127,2827-2915 /code/branches/pickups2/src/modules/pickup 2107-2497,2915-3071 /code/branches/png2/src/modules/pickup 7262-7263 /code/branches/portals/src/modules/pickup 8087-8455 /code/branches/portals2/src/modules/pickup 8460-8602 /code/branches/ppspickups1/src/modules/pickup 6552-6708 /code/branches/ppspickups2/src/modules/pickup 6527-6532,6554-6709 /code/branches/ppspickups3/src/modules/pickup 6757-6997 /code/branches/ppspickups4/src/modules/pickup 7003-7089 /code/branches/presentation2/src/modules/pickup 6106-6416,7787-7800 /code/branches/presentation3/src/modules/pickup 6913-7162 /code/branches/questsystem/src/modules/pickup 1894-2088 /code/branches/questsystem2/src/modules/pickup 2107-2259 /code/branches/questsystem5/src/modules/pickup 2776-2905 /code/branches/releasetodo/src/modules/pickup 7614-7647 /code/branches/resource/src/modules/pickup 3327-3366 /code/branches/resource2/src/modules/pickup 3372-5694 /code/branches/rocket/src/modules/pickup 6523-6950 /code/branches/rocket2/src/modules/pickup 6953-6970 /code/branches/script_trigger/src/modules/pickup 1295-1953,1955 /code/branches/skybox2/src/modules/pickup 6559-6989 /code/branches/sound/src/modules/pickup 2829-3010 /code/branches/sound3/src/modules/pickup 5941-6102 /code/branches/spaceboundaries/src/modules/pickup 8085-8457 /code/branches/spaceboundaries2/src/modules/pickup 8460-8613 /code/branches/spacerace/src/modules/pickup 8182-8630 /code/branches/steering/src/modules/pickup 5949-6091,8140-8595 /code/branches/tetris/src/modules/pickup 8100-8563 /code/branches/tutoriallevel/src/modules/pickup 7827-8370 /code/branches/tutoriallevel2/src/modules/pickup 8370-8452 /code/branches/tutoriallevel3/src/modules/pickup 8453-8636 /code/branches/unity_build/src/modules/pickup 8440-8716 /code/branches/weapon/src/modules/pickup 1925-2094 /code/branches/weapon2/src/modules/pickup 2107-2488 /code/branches/weapons/src/modules/pickup 2897-3051,8143-8591 /code/branches/weaponsystem/src/modules/pickup 2742-2890
-
Property
svn:mergeinfo
set to
(toggle deleted branches)
-
code/branches/presentation2012/src/modules/pickup/PickupPrereqs.h
r9195 r9241 68 68 namespace orxonox 69 69 { 70 71 70 class CollectiblePickup; 72 71 class DroppedPickup; -
code/branches/presentation2012/src/modules/pickup/items/FlagPickup.cc
r9240 r9241 28 28 29 29 /** 30 31 32 */30 @file FlagPickup.cc 31 @brief Implementation of the FlagPickup class. 32 */ 33 33 34 34 #include "FlagPickup.h" … … 37 37 #include "core/CoreIncludes.h" 38 38 #include "core/XMLPort.h" 39 40 39 #include "pickup/PickupIdentifier.h" 41 40 42 41 namespace orxonox 43 42 { 44 43 45 44 CreateFactory(FlagPickup); 46 45 47 46 /** 48 @brief49 50 */47 @brief 48 Constructor. Registers the object and initializes the member variables. 49 */ 51 50 FlagPickup::FlagPickup(BaseObject* creator) : Pickup(creator) 52 51 { 53 52 RegisterObject(FlagPickup); 54 53 55 54 this->initialize(); 56 55 } 57 56 58 57 /** 59 @brief60 61 */58 @brief 59 Destructor. 60 */ 62 61 FlagPickup::~FlagPickup() 63 62 { 64 63 65 64 } 66 65 67 66 /** 68 @brief69 70 */67 @brief 68 Initializes the member variables. 69 */ 71 70 void FlagPickup::initialize(void) 72 71 { 73 72 this->flagType_ = 0; 74 73 75 74 this->addTarget(ClassIdentifier<Pawn>::getIdentifier()); 76 75 } 77 76 78 77 /** 79 @brief80 81 */78 @brief 79 Initializes the PickupIdentifier of this pickup. 80 */ 82 81 void FlagPickup::initializeIdentifier(void) 83 82 { … … 90 89 this->pickupIdentifier_->addParameter(type1, val); 91 90 } 92 91 93 92 /** 94 @brief95 96 */93 @brief 94 Method for creating a FlagPickup object through XML. 95 */ 97 96 void FlagPickup::XMLPort(Element& xmlelement, orxonox::XMLPort::Mode mode) 98 97 { 99 98 SUPER(FlagPickup, XMLPort, xmlelement, mode); 100 99 101 100 XMLPortParam(FlagPickup, "flagType", setFlagType, getFlagType, xmlelement, mode); 102 101 //XMLPortParam(FlagPickup, "teamNumber", setTeamNumber, getTeamNumber, xmlelement, mode); 103 102 104 103 this->initializeIdentifier(); 105 104 } 106 107 105 106 108 107 /** 109 @brief110 111 @return112 113 */108 @brief 109 Get the flag type of this pickup. 110 @return 111 Returns the falg type as a string. 112 */ 114 113 const int FlagPickup::getFlagType(void) const 115 114 { 116 115 return this->flagType_; 117 116 } 118 117 119 118 /** 120 @brief121 Set the type of the HealthPickup.122 @param type123 124 */119 @brief 120 Set the type of the FlagPickup. 121 @param type 122 The type as a string. 123 */ 125 124 void FlagPickup::setFlagType(int type) 126 125 { … … 133 132 } 134 133 } 134 135 /** 136 @brief 137 Is called when the pickup has transited from used to unused or the other way around. 138 */ 139 void FlagPickup::changedUsed(void) 140 { 141 SUPER(FlagPickup, changedUsed); 142 143 Pawn* pawn = this->carrierToPawnHelper(); 144 145 if(pawn == NULL) // If the PickupCarrier is no Pawn, then this pickup is useless and therefore is destroyed. 146 this->Pickupable::destroy(); 147 148 // If the pickup has transited to used. 149 if(this->isUsed()) 150 { 151 this->bPickedUp_ = true; 152 this->pickedUpBy_ = pawn; 153 orxout(internal_error, context::pickups) << "flag picked up." << endl; 135 154 155 } 156 } 157 136 158 /** 137 @brief 138 Is called when the pickup has transited from used to unused or the other way around. 139 */ 140 void FlagPickup::changedUsed(void) 141 { 142 SUPER(FlagPickup, changedUsed); 143 144 Pawn* pawn = this->carrierToPawnHelper(); 145 146 if(pawn == NULL) // If the PickupCarrier is no Pawn, then this pickup is useless and therefore is destroyed. 147 this->Pickupable::destroy(); 148 149 // If the pickup has transited to used. 150 if(this->isUsed()) 151 { 152 this->bPickedUp_ = true; 153 this->pickedUpBy_ = pawn; 154 } 155 } 156 157 /** 158 @brief 159 Helper to transform the PickupCarrier to a Pawn, and throw an error message if the conversion fails. 160 @return 161 A pointer to the Pawn, or NULL if the conversion failed. 162 */ 163 Pawn* FlagPickup::carrierToPawnHelper(void) 164 { 165 PickupCarrier* carrier = this->getCarrier(); 166 Pawn* pawn = dynamic_cast<Pawn*>(carrier); 167 168 if(pawn == NULL) 169 orxout(internal_error, context::pickups) << "Invalid PickupCarrier in HealthPickup." << endl; 170 171 return pawn; 172 } 173 174 175 159 @brief 160 Helper to transform the PickupCarrier to a Pawn, and throw an error message if the conversion fails. 161 @return 162 A pointer to the Pawn, or NULL if the conversion failed. 163 */ 164 Pawn* FlagPickup::carrierToPawnHelper(void) 165 { 166 PickupCarrier* carrier = this->getCarrier(); 167 Pawn* pawn = dynamic_cast<Pawn*>(carrier); 168 169 if(pawn == NULL) 170 orxout(internal_error, context::pickups) << "Invalid PickupCarrier in Flag Pickup." << endl; 171 172 return pawn; 173 } 174 175 176 176 177 void FlagPickup::tick(float dt) 177 178 179 180 181 182 183 184 185 186 178 { 179 SUPER(FlagPickup, tick, dt); 180 181 //Pawn* pawn = this->carrierToPawnHelper(); 182 183 // if(pawn->isAlive() && pawn->hasFlag()){ 184 // this->Pickupable::destroy(); 185 // } 186 187 } 187 188 } -
code/branches/presentation2012/src/modules/pickup/items/FlagPickup.h
r9240 r9241 28 28 29 29 /** 30 31 32 33 */30 @file FlagPickup.h 31 @brief Declaration of the FlagPickup class. 32 @ingroup PickupItems 33 */ 34 34 35 35 #ifndef _FlagPickup_H__ … … 47 47 48 48 namespace orxonox { 49 /*50 @ingroup PickupItems51 52 53 @author54 55 56 @ingroup PickupItems57 */49 /* 50 @ingroup PickupItems 51 52 53 @author 54 Nino Weingart 55 56 @ingroup PickupItems 57 */ 58 58 class _PickupExport FlagPickup : public Pickup, public Tickable 59 59 { 60 61 62 63 virtual~FlagPickup(); //!< Destructor.64 65 66 67 68 60 public: 61 62 FlagPickup(BaseObject* creator); //!< Constructor. 63 ~FlagPickup(); //!< Destructor. 64 65 virtual void XMLPort(Element& xmlelement, orxonox::XMLPort::Mode mode); //!< Method for creating a FlagPickup object through XML. 66 67 virtual void tick(float dt); 68 69 69 const int getFlagType(void) const; //!< Get the flag type of this pickup. 70 70 71 71 inline bool isPickedUp() const 72 72 { return this->bPickedUp_; } 73 73 inline Pawn* pickedUpBy() const 74 75 74 { return this->pickedUpBy_; } 75 76 76 inline void setPickedUp(bool pickedUp) 77 77 { this->bPickedUp_ = pickedUp; } … … 79 79 inline void ignorePickedUp() 80 80 { this->Pickupable::destroy(); } 81 81 82 82 virtual void changedUsed(void); //!< Is called when the pickup has transited from used to unused or the other way around. 83 84 protected: 85 void initializeIdentifier(void); //!< Initializes the PickupIdentifier of this pickup. 86 87 /** 88 @brief Set the flag type of this pickup. 89 @param type The type of this pickup as an enum. 90 */ 91 inline void setFlagTypeDirect(int type) 92 { this->flagType_ = type; } 93 void setFlagType(int type); //!< Set the type of the FlagPickup. 94 95 private: 96 Pawn* carrierToPawnHelper(void); //!< Helper to transform the PickupCarrier to a Pawn, and throw an error message if the conversion fails. 97 void initialize(void); //!< Initializes the member variables. 98 Pawn* pickedUpBy_; 99 int flagType_; 100 101 bool bPickedUp_; 102 83 84 protected: 85 void initializeIdentifier(void); //!< Initializes the PickupIdentifier of this pickup. 86 87 /** 88 @brief Set the flag type of this pickup. 89 @param type The type of this pickup as an enum. 90 */ 91 inline void setFlagTypeDirect(int type) 92 { this->flagType_ = type; } 93 94 void setFlagType(int type); //!< Set the type of the FlagPickup. 95 96 private: 97 Pawn* carrierToPawnHelper(void); //!< Helper to transform the PickupCarrier to a Pawn, and throw an error message if the conversion fails. 98 void initialize(void); //!< Initializes the member variables. 99 Pawn* pickedUpBy_; 100 int flagType_; 101 102 bool bPickedUp_; 103 103 104 }; 104 105 }
Note: See TracChangeset
for help on using the changeset viewer.