Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 24, 2012, 8:49:19 PM (13 years ago)
Author:
decapitb
Message:

tower defense update

Location:
code/branches/presentation2012
Files:
5 edited
2 copied

Legend:

Unmodified
Added
Removed
  • code/branches/presentation2012

  • code/branches/presentation2012/src

    • Property svn:mergeinfo set to (toggle deleted branches)
      /code/branches/dockingsystem2/srcmergedeligible
      /code/branches/environment3/srcmergedeligible
      /code/branches/formation/srcmergedeligible
      /code/branches/gamecontent/srcmergedeligible
      /code/branches/hud/srcmergedeligible
      /code/branches/masterserverfix/srcmergedeligible
      /code/branches/menue/srcmergedeligible
      /code/branches/newlevel2012/srcmergedeligible
      /code/branches/output/srcmergedeligible
      /code/branches/pickup2012/srcmergedeligible
      /code/branches/presentation/srcmergedeligible
      /code/branches/presentation2011/srcmergedeligible
      /code/branches/shipSelection/srcmergedeligible
      /code/branches/sound2012/srcmergedeligible
      /code/branches/spacegate/srcmergedeligible
      /code/branches/spaceraceTwo/srcmergedeligible
      /code/branches/surfaceRace/srcmergedeligible
      /code/branches/usability/srcmergedeligible
      /code/trunk/srcmergedeligible
      /code/branches/ai/src6592-7033
      /code/branches/ai2/src8721-8880
      /code/branches/bigships/src8137-8588
      /code/branches/buildsystem/src1874-2276,​2278-2400
      /code/branches/buildsystem2/src2506-2658
      /code/branches/buildsystem3/src2662-2708
      /code/branches/ceguilua/src1802-1808
      /code/branches/chat/src6527-6797
      /code/branches/chat2/src6836-6910
      /code/branches/console/src5941-6104
      /code/branches/consolecommands2/src6451-7178
      /code/branches/consolecommands3/src7178-7283
      /code/branches/core3/src1572-1739
      /code/branches/core4/src3221-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/src5768-5928,​6009
      /code/branches/data_cleanup/src7537-7686
      /code/branches/doc/src7290-7400
      /code/branches/dockingsystem/src8101-8192
      /code/branches/dynamicmatch/src6584-7030
      /code/branches/fps/src6591-7072
      /code/branches/gameimmersion/src8102-8577
      /code/branches/gamestate/src6430-6572,​6621-6661
      /code/branches/gamestates2/src6594-6745
      /code/branches/gametypes/src2826-3031
      /code/branches/gcc43/src1580
      /code/branches/gui/src1635-1723,​2795-2894
      /code/branches/hudelements/src6584-6941
      /code/branches/hudimprovements/src7920-8672
      /code/branches/ingamemenu/src6000-6023
      /code/branches/input/src1629-1636
      /code/branches/ipv6/src7293-7458
      /code/branches/kicklib/src7940-8096,​8098-8277
      /code/branches/kicklib2/src8282-8350
      /code/branches/lastmanstanding/src7479-7644
      /code/branches/lastmanstanding3/src7903-8175
      /code/branches/libraries/src5612-5692
      /code/branches/libraries2/src5703-5737
      /code/branches/lod/src6586-6911
      /code/branches/lodfinal/src2372-2411
      /code/branches/mac_osx/src7789-8128,​8135
      /code/branches/map/src2801-3086,​3089
      /code/branches/masterserver/src7502-7738
      /code/branches/menu/src5941-6146,​6148,​7536-7687
      /code/branches/miniprojects/src2754-2824
      /code/branches/netp2/src2835-2988
      /code/branches/netp3/src2988-3082
      /code/branches/netp6/src3214-3302
      /code/branches/network/src2356
      /code/branches/network2/src6434-6465
      /code/branches/network3/src7196-7344
      /code/branches/network4/src7497-7755
      /code/branches/network5/src7757-7781
      /code/branches/network6/src7823-8315
      /code/branches/network64/src2210-2355
      /code/branches/notifications/src7314-7401
      /code/branches/objecthierarchy/src1911-2085,​2100,​2110-2169
      /code/branches/objecthierarchy2/src2171-2479
      /code/branches/ois_update/src7506-7788
      /code/branches/overlay/src2117-2385
      /code/branches/particles/src2829-3085
      /code/branches/particles2/src6050-6106,​6109
      /code/branches/pch/src3113-3194
      /code/branches/physics/src1912-2055,​2107-2439
      /code/branches/physics_merge/src2436-2457
      /code/branches/pickup/src8145-8555
      /code/branches/pickup2/src5942-6405
      /code/branches/pickup3/src6418-6523
      /code/branches/pickup4/src6594-6710
      /code/branches/pickups/src1926-2086,​2127,​2827-2915
      /code/branches/pickups2/src2107-2497,​2915-3071
      /code/branches/png2/src7262-7263
      /code/branches/portals/src8087-8455
      /code/branches/portals2/src8460-8602
      /code/branches/ppspickups1/src6552-6708
      /code/branches/ppspickups2/src6527-6532,​6554-6709
      /code/branches/ppspickups3/src6757-6997
      /code/branches/ppspickups4/src7003-7089
      /code/branches/presentation2/src6106-6416,​7787-7800
      /code/branches/presentation3/src6913-7162
      /code/branches/questsystem/src1894-2088
      /code/branches/questsystem2/src2107-2259
      /code/branches/questsystem5/src2776-2905
      /code/branches/releasetodo/src7614-7647
      /code/branches/resource/src3327-3366
      /code/branches/resource2/src3372-5694
      /code/branches/rocket/src6523-6950
      /code/branches/rocket2/src6953-6970
      /code/branches/script_trigger/src1295-1953,​1955
      /code/branches/skybox2/src6559-6989
      /code/branches/sound/src2829-3010
      /code/branches/sound3/src5941-6102
      /code/branches/spaceboundaries/src8085-8457
      /code/branches/spaceboundaries2/src8460-8613
      /code/branches/spacerace/src8182-8630
      /code/branches/steering/src5949-6091,​8140-8595
      /code/branches/tetris/src8100-8563
      /code/branches/tutoriallevel/src7827-8370
      /code/branches/tutoriallevel2/src8370-8452
      /code/branches/tutoriallevel3/src8453-8636
      /code/branches/unity_build/src8440-8716
      /code/branches/weapon/src1925-2094
      /code/branches/weapon2/src2107-2488
      /code/branches/weapons/src2897-3051,​8143-8591
      /code/branches/weaponsystem/src2742-2890
  • code/branches/presentation2012/src/modules

    • Property svn:mergeinfo set to (toggle deleted branches)
      /code/branches/dockingsystem2/src/modulesmergedeligible
      /code/branches/environment3/src/modulesmergedeligible
      /code/branches/formation/src/modulesmergedeligible
      /code/branches/gamecontent/src/modulesmergedeligible
      /code/branches/hud/src/modulesmergedeligible
      /code/branches/masterserverfix/src/modulesmergedeligible
      /code/branches/menue/src/modulesmergedeligible
      /code/branches/newlevel2012/src/modulesmergedeligible
      /code/branches/output/src/modulesmergedeligible
      /code/branches/pickup2012/src/modulesmergedeligible
      /code/branches/presentation/src/modulesmergedeligible
      /code/branches/presentation2011/src/modulesmergedeligible
      /code/branches/shipSelection/src/modulesmergedeligible
      /code/branches/sound2012/src/modulesmergednon-inheritableeligible
      /code/branches/spacegate/src/modulesmergedeligible
      /code/branches/spaceraceTwo/src/modulesmergedeligible
      /code/branches/surfaceRace/src/modulesmergedeligible
      /code/branches/usability/src/modulesmergedeligible
      /code/trunk/src/modulesmergedeligible
      /code/branches/ai/src/modules6592-7033
      /code/branches/ai2/src/modules8721-8880
      /code/branches/bigships/src/modules8137-8588
      /code/branches/buildsystem/src/modules1874-2276,​2278-2400
      /code/branches/buildsystem2/src/modules2506-2658
      /code/branches/buildsystem3/src/modules2662-2708
      /code/branches/ceguilua/src/modules1802-1808
      /code/branches/chat/src/modules6527-6797
      /code/branches/chat2/src/modules6836-6910
      /code/branches/console/src/modules5941-6104
      /code/branches/consolecommands2/src/modules6451-7178
      /code/branches/consolecommands3/src/modules7178-7283
      /code/branches/core3/src/modules1572-1739
      /code/branches/core4/src/modules3221-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/modules5768-5928,​6009
      /code/branches/data_cleanup/src/modules7537-7686
      /code/branches/doc/src/modules7290-7400
      /code/branches/dockingsystem/src/modules8101-8192
      /code/branches/dynamicmatch/src/modules6584-7030
      /code/branches/fps/src/modules6591-7072
      /code/branches/gameimmersion/src/modules8102-8577
      /code/branches/gamestate/src/modules6430-6572,​6621-6661
      /code/branches/gamestates2/src/modules6594-6745
      /code/branches/gametypes/src/modules2826-3031
      /code/branches/gcc43/src/modules1580
      /code/branches/gui/src/modules1635-1723,​2795-2894
      /code/branches/hudelements/src/modules6584-6941
      /code/branches/hudimprovements/src/modules7920-8672
      /code/branches/ingamemenu/src/modules6000-6023
      /code/branches/input/src/modules1629-1636
      /code/branches/ipv6/src/modules7293-7458
      /code/branches/kicklib/src/modules7940-8096,​8098-8277
      /code/branches/kicklib2/src/modules8282-8350
      /code/branches/lastmanstanding/src/modules7479-7644
      /code/branches/lastmanstanding3/src/modules7903-8175
      /code/branches/libraries/src/modules5612-5692
      /code/branches/libraries2/src/modules5703-5737
      /code/branches/lod/src/modules6586-6911
      /code/branches/lodfinal/src/modules2372-2411
      /code/branches/mac_osx/src/modules7789-8128,​8135
      /code/branches/map/src/modules2801-3086,​3089
      /code/branches/masterserver/src/modules7502-7738
      /code/branches/menu/src/modules5941-6146,​6148,​7536-7687
      /code/branches/miniprojects/src/modules2754-2824
      /code/branches/netp2/src/modules2835-2988
      /code/branches/netp3/src/modules2988-3082
      /code/branches/netp6/src/modules3214-3302
      /code/branches/network/src/modules2356
      /code/branches/network2/src/modules6434-6465
      /code/branches/network3/src/modules7196-7344
      /code/branches/network4/src/modules7497-7755
      /code/branches/network5/src/modules7757-7781
      /code/branches/network6/src/modules7823-8315
      /code/branches/network64/src/modules2210-2355
      /code/branches/notifications/src/modules7314-7401
      /code/branches/objecthierarchy/src/modules1911-2085,​2100,​2110-2169
      /code/branches/objecthierarchy2/src/modules2171-2479
      /code/branches/ois_update/src/modules7506-7788
      /code/branches/overlay/src/modules2117-2385
      /code/branches/particles/src/modules2829-3085
      /code/branches/particles2/src/modules6050-6106,​6109
      /code/branches/pch/src/modules3113-3194
      /code/branches/physics/src/modules1912-2055,​2107-2439
      /code/branches/physics_merge/src/modules2436-2457
      /code/branches/pickup/src/modules8145-8555
      /code/branches/pickup2/src/modules5942-6405
      /code/branches/pickup3/src/modules6418-6523
      /code/branches/pickup4/src/modules6594-6710
      /code/branches/pickups/src/modules1926-2086,​2127,​2827-2915
      /code/branches/pickups2/src/modules2107-2497,​2915-3071
      /code/branches/png2/src/modules7262-7263
      /code/branches/portals/src/modules8087-8455
      /code/branches/portals2/src/modules8460-8602
      /code/branches/ppspickups1/src/modules6552-6708
      /code/branches/ppspickups2/src/modules6527-6532,​6554-6709
      /code/branches/ppspickups3/src/modules6757-6997
      /code/branches/ppspickups4/src/modules7003-7089
      /code/branches/presentation2/src/modules6106-6416,​7787-7800
      /code/branches/presentation3/src/modules6913-7162
      /code/branches/questsystem/src/modules1894-2088
      /code/branches/questsystem2/src/modules2107-2259
      /code/branches/questsystem5/src/modules2776-2905
      /code/branches/releasetodo/src/modules7614-7647
      /code/branches/resource/src/modules3327-3366
      /code/branches/resource2/src/modules3372-5694
      /code/branches/rocket/src/modules6523-6950
      /code/branches/rocket2/src/modules6953-6970
      /code/branches/script_trigger/src/modules1295-1953,​1955
      /code/branches/skybox2/src/modules6559-6989
      /code/branches/sound/src/modules2829-3010
      /code/branches/sound3/src/modules5941-6102
      /code/branches/spaceboundaries/src/modules8085-8457
      /code/branches/spaceboundaries2/src/modules8460-8613
      /code/branches/spacerace/src/modules8182-8630
      /code/branches/steering/src/modules5949-6091,​8140-8595
      /code/branches/tetris/src/modules8100-8563
      /code/branches/tutoriallevel/src/modules7827-8370
      /code/branches/tutoriallevel2/src/modules8370-8452
      /code/branches/tutoriallevel3/src/modules8453-8636
      /code/branches/unity_build/src/modules8440-8716
      /code/branches/weapon/src/modules1925-2094
      /code/branches/weapon2/src/modules2107-2488
      /code/branches/weapons/src/modules2897-3051,​8143-8591
      /code/branches/weaponsystem/src/modules2742-2890
  • code/branches/presentation2012/src/modules/pickup

    • Property svn:mergeinfo set to (toggle deleted branches)
      /code/branches/dockingsystem2/src/modules/pickupmergedeligible
      /code/branches/environment3/src/modules/pickupmergedeligible
      /code/branches/formation/src/modules/pickupmergedeligible
      /code/branches/gamecontent/src/modules/pickupmergedeligible
      /code/branches/hud/src/modules/pickupmergedeligible
      /code/branches/masterserverfix/src/modules/pickupmergedeligible
      /code/branches/menue/src/modules/pickupmergedeligible
      /code/branches/newlevel2012/src/modules/pickupmergedeligible
      /code/branches/output/src/modules/pickupmergedeligible
      /code/branches/pickup2012/src/modules/pickupmergedeligible
      /code/branches/presentation/src/modules/pickupmergedeligible
      /code/branches/presentation2011/src/modules/pickupmergedeligible
      /code/branches/shipSelection/src/modules/pickupmergedeligible
      /code/branches/sound2012/src/modules/pickupmergedeligible
      /code/branches/spacegate/src/modules/pickupmergedeligible
      /code/branches/spaceraceTwo/src/modules/pickupmergedeligible
      /code/branches/surfaceRace/src/modules/pickupmergedeligible
      /code/branches/usability/src/modules/pickupmergedeligible
      /code/trunk/src/modules/pickupmergedeligible
      /code/branches/ai/src/modules/pickup6592-7033
      /code/branches/ai2/src/modules/pickup8721-8880
      /code/branches/bigships/src/modules/pickup8137-8588
      /code/branches/buildsystem/src/modules/pickup1874-2276,​2278-2400
      /code/branches/buildsystem2/src/modules/pickup2506-2658
      /code/branches/buildsystem3/src/modules/pickup2662-2708
      /code/branches/ceguilua/src/modules/pickup1802-1808
      /code/branches/chat/src/modules/pickup6527-6797
      /code/branches/chat2/src/modules/pickup6836-6910
      /code/branches/console/src/modules/pickup5941-6104
      /code/branches/consolecommands2/src/modules/pickup6451-7178
      /code/branches/consolecommands3/src/modules/pickup7178-7283
      /code/branches/core3/src/modules/pickup1572-1739
      /code/branches/core4/src/modules/pickup3221-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/pickup5768-5928,​6009
      /code/branches/data_cleanup/src/modules/pickup7537-7686
      /code/branches/doc/src/modules/pickup7290-7400
      /code/branches/dockingsystem/src/modules/pickup8101-8192
      /code/branches/dynamicmatch/src/modules/pickup6584-7030
      /code/branches/fps/src/modules/pickup6591-7072
      /code/branches/gameimmersion/src/modules/pickup8102-8577
      /code/branches/gamestate/src/modules/pickup6430-6572,​6621-6661
      /code/branches/gamestates2/src/modules/pickup6594-6745
      /code/branches/gametypes/src/modules/pickup2826-3031
      /code/branches/gcc43/src/modules/pickup1580
      /code/branches/gui/src/modules/pickup1635-1723,​2795-2894
      /code/branches/hudelements/src/modules/pickup6584-6941
      /code/branches/hudimprovements/src/modules/pickup7920-8672
      /code/branches/ingamemenu/src/modules/pickup6000-6023
      /code/branches/input/src/modules/pickup1629-1636
      /code/branches/ipv6/src/modules/pickup7293-7458
      /code/branches/kicklib/src/modules/pickup7940-8096,​8098-8277
      /code/branches/kicklib2/src/modules/pickup8282-8350
      /code/branches/lastmanstanding/src/modules/pickup7479-7644
      /code/branches/lastmanstanding3/src/modules/pickup7903-8175
      /code/branches/libraries/src/modules/pickup5612-5692
      /code/branches/libraries2/src/modules/pickup5703-5737
      /code/branches/lod/src/modules/pickup6586-6911
      /code/branches/lodfinal/src/modules/pickup2372-2411
      /code/branches/mac_osx/src/modules/pickup7789-8128,​8135
      /code/branches/map/src/modules/pickup2801-3086,​3089
      /code/branches/masterserver/src/modules/pickup7502-7738
      /code/branches/menu/src/modules/pickup5941-6146,​6148,​7536-7687
      /code/branches/miniprojects/src/modules/pickup2754-2824
      /code/branches/netp2/src/modules/pickup2835-2988
      /code/branches/netp3/src/modules/pickup2988-3082
      /code/branches/netp6/src/modules/pickup3214-3302
      /code/branches/network/src/modules/pickup2356
      /code/branches/network2/src/modules/pickup6434-6465
      /code/branches/network3/src/modules/pickup7196-7344
      /code/branches/network4/src/modules/pickup7497-7755
      /code/branches/network5/src/modules/pickup7757-7781
      /code/branches/network6/src/modules/pickup7823-8315
      /code/branches/network64/src/modules/pickup2210-2355
      /code/branches/notifications/src/modules/pickup7314-7401
      /code/branches/objecthierarchy/src/modules/pickup1911-2085,​2100,​2110-2169
      /code/branches/objecthierarchy2/src/modules/pickup2171-2479
      /code/branches/ois_update/src/modules/pickup7506-7788
      /code/branches/overlay/src/modules/pickup2117-2385
      /code/branches/particles/src/modules/pickup2829-3085
      /code/branches/particles2/src/modules/pickup6050-6106,​6109
      /code/branches/pch/src/modules/pickup3113-3194
      /code/branches/physics/src/modules/pickup1912-2055,​2107-2439
      /code/branches/physics_merge/src/modules/pickup2436-2457
      /code/branches/pickup/src/modules/pickup8145-8555
      /code/branches/pickup2/src/modules/pickup5942-6405
      /code/branches/pickup3/src/modules/pickup6418-6523
      /code/branches/pickup4/src/modules/pickup6594-6710
      /code/branches/pickups/src/modules/pickup1926-2086,​2127,​2827-2915
      /code/branches/pickups2/src/modules/pickup2107-2497,​2915-3071
      /code/branches/png2/src/modules/pickup7262-7263
      /code/branches/portals/src/modules/pickup8087-8455
      /code/branches/portals2/src/modules/pickup8460-8602
      /code/branches/ppspickups1/src/modules/pickup6552-6708
      /code/branches/ppspickups2/src/modules/pickup6527-6532,​6554-6709
      /code/branches/ppspickups3/src/modules/pickup6757-6997
      /code/branches/ppspickups4/src/modules/pickup7003-7089
      /code/branches/presentation2/src/modules/pickup6106-6416,​7787-7800
      /code/branches/presentation3/src/modules/pickup6913-7162
      /code/branches/questsystem/src/modules/pickup1894-2088
      /code/branches/questsystem2/src/modules/pickup2107-2259
      /code/branches/questsystem5/src/modules/pickup2776-2905
      /code/branches/releasetodo/src/modules/pickup7614-7647
      /code/branches/resource/src/modules/pickup3327-3366
      /code/branches/resource2/src/modules/pickup3372-5694
      /code/branches/rocket/src/modules/pickup6523-6950
      /code/branches/rocket2/src/modules/pickup6953-6970
      /code/branches/script_trigger/src/modules/pickup1295-1953,​1955
      /code/branches/skybox2/src/modules/pickup6559-6989
      /code/branches/sound/src/modules/pickup2829-3010
      /code/branches/sound3/src/modules/pickup5941-6102
      /code/branches/spaceboundaries/src/modules/pickup8085-8457
      /code/branches/spaceboundaries2/src/modules/pickup8460-8613
      /code/branches/spacerace/src/modules/pickup8182-8630
      /code/branches/steering/src/modules/pickup5949-6091,​8140-8595
      /code/branches/tetris/src/modules/pickup8100-8563
      /code/branches/tutoriallevel/src/modules/pickup7827-8370
      /code/branches/tutoriallevel2/src/modules/pickup8370-8452
      /code/branches/tutoriallevel3/src/modules/pickup8453-8636
      /code/branches/unity_build/src/modules/pickup8440-8716
      /code/branches/weapon/src/modules/pickup1925-2094
      /code/branches/weapon2/src/modules/pickup2107-2488
      /code/branches/weapons/src/modules/pickup2897-3051,​8143-8591
      /code/branches/weaponsystem/src/modules/pickup2742-2890
  • code/branches/presentation2012/src/modules/pickup/PickupPrereqs.h

    r9195 r9241  
    6868namespace orxonox
    6969{
    70 
    7170    class CollectiblePickup;
    7271    class DroppedPickup;
  • code/branches/presentation2012/src/modules/pickup/items/FlagPickup.cc

    r9240 r9241  
    2828
    2929/**
    30     @file FlagPickup.cc
    31     @brief Implementation of the FlagPickup class.
    32 */
     30 @file FlagPickup.cc
     31 @brief Implementation of the FlagPickup class.
     32 */
    3333
    3434#include "FlagPickup.h"
     
    3737#include "core/CoreIncludes.h"
    3838#include "core/XMLPort.h"
    39 
    4039#include "pickup/PickupIdentifier.h"
    4140
    4241namespace orxonox
    4342{
    44 
     43   
    4544    CreateFactory(FlagPickup);
    46 
     45   
    4746    /**
    48     @brief
    49         Constructor. Registers the object and initializes the member variables.
    50     */
     47     @brief
     48     Constructor. Registers the object and initializes the member variables.
     49     */
    5150    FlagPickup::FlagPickup(BaseObject* creator) : Pickup(creator)
    5251    {
    5352        RegisterObject(FlagPickup);
    54 
     53       
    5554        this->initialize();
    5655    }
    57 
     56   
    5857    /**
    59     @brief
    60         Destructor.
    61     */
     58     @brief
     59     Destructor.
     60     */
    6261    FlagPickup::~FlagPickup()
    6362    {
    64 
     63       
    6564    }
    66 
     65   
    6766    /**
    68     @brief
    69         Initializes the member variables.
    70     */
     67     @brief
     68     Initializes the member variables.
     69     */
    7170    void FlagPickup::initialize(void)
    7271    {
    7372        this->flagType_ = 0;
    74 
     73       
    7574        this->addTarget(ClassIdentifier<Pawn>::getIdentifier());
    7675    }
    77 
     76   
    7877    /**
    79     @brief
    80         Initializes the PickupIdentifier of this pickup.
    81     */
     78     @brief
     79     Initializes the PickupIdentifier of this pickup.
     80     */
    8281    void FlagPickup::initializeIdentifier(void)
    8382    {
     
    9089        this->pickupIdentifier_->addParameter(type1, val);
    9190    }
    92 
     91   
    9392    /**
    94     @brief
    95         Method for creating a FlagPickup object through XML.
    96     */
     93     @brief
     94     Method for creating a FlagPickup object through XML.
     95     */
    9796    void FlagPickup::XMLPort(Element& xmlelement, orxonox::XMLPort::Mode mode)
    9897    {
    9998        SUPER(FlagPickup, XMLPort, xmlelement, mode);
    100 
     99       
    101100        XMLPortParam(FlagPickup, "flagType", setFlagType, getFlagType, xmlelement, mode);
    102101        //XMLPortParam(FlagPickup, "teamNumber", setTeamNumber, getTeamNumber, xmlelement, mode);
    103 
     102       
    104103        this->initializeIdentifier();
    105104    }
    106 
    107 
     105   
     106   
    108107    /**
    109     @brief
    110         Get the flag type of this pickup.
    111     @return
    112         Returns the falg type as a string.
    113     */
     108     @brief
     109     Get the flag type of this pickup.
     110     @return
     111     Returns the falg type as a string.
     112     */
    114113    const int FlagPickup::getFlagType(void) const
    115114    {
    116115                return this->flagType_;
    117116        }
    118 
     117   
    119118    /**
    120     @brief
    121         Set the type of the HealthPickup.
    122     @param type
    123         The type as a string.
    124     */
     119     @brief
     120     Set the type of the FlagPickup.
     121     @param type
     122     The type as a string.
     123     */
    125124    void FlagPickup::setFlagType(int type)
    126125    {
     
    133132        }
    134133    }
     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;
    135154
     155        }
     156    }
     157   
    136158    /**
    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   
    176177        void FlagPickup::tick(float dt)
    177            {
    178                    SUPER(FlagPickup, tick, dt);
    179 
    180                Pawn* pawn = this->carrierToPawnHelper();
    181 
    182                    if(pawn->isAlive() && pawn->hasFlag()){
    183                this->Pickupable::destroy();
    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    }
    187188}
  • code/branches/presentation2012/src/modules/pickup/items/FlagPickup.h

    r9240 r9241  
    2828
    2929/**
    30     @file FlagPickup.h
    31     @brief Declaration of the FlagPickup class.
    32     @ingroup PickupItems
    33 */
     30 @file FlagPickup.h
     31 @brief Declaration of the FlagPickup class.
     32 @ingroup PickupItems
     33 */
    3434
    3535#ifndef _FlagPickup_H__
     
    4747
    4848namespace orxonox {
    49 /*
    50     @ingroup PickupItems
    51    
    52 
    53     @author
    54         Nino Weingart
    55 
    56     @ingroup PickupItems
    57     */
     49    /*
     50     @ingroup PickupItems
     51     
     52     
     53     @author
     54     Nino Weingart
     55     
     56     @ingroup PickupItems
     57     */
    5858    class _PickupExport FlagPickup : public Pickup, public Tickable
    5959    {
    60         public:
    61 
    62             FlagPickup(BaseObject* creator); //!< Constructor.
    63             virtual ~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 
     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       
    6969            const int getFlagType(void) const; //!< Get the flag type of this pickup.
    7070           
    7171                inline bool isPickedUp() const
    72                         { return this->bPickedUp_; }
     72        { return this->bPickedUp_; }
    7373                inline Pawn* pickedUpBy() const
    74                         { return this->pickedUpBy_; }
    75                        
     74        { return this->pickedUpBy_; }
     75       
    7676                inline void setPickedUp(bool pickedUp)
    7777                { this->bPickedUp_ = pickedUp; }
     
    7979                inline void ignorePickedUp()
    8080                { this->Pickupable::destroy(); }
    81                        
     81       
    8282            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       
    103104    };
    104105}
Note: See TracChangeset for help on using the changeset viewer.