Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 8951


Ignore:
Timestamp:
Nov 26, 2011, 10:06:08 AM (12 years ago)
Author:
jo
Message:

Removing interface - no actual need for it, since only two classes are necessary to have a teamnumber. Prepared tutorial level for new HUD feature.

Location:
code/branches/gamecontent
Files:
2 deleted
8 edited

Legend:

Unmodified
Added
Removed
  • code/branches/gamecontent/data/levels/missionOne.oxw

    r8942 r8951  
    432432
    433433
    434     <SimpleNotification message="Three red arrows just appeared.">
     434    <SimpleNotification message="Three arrows just appeared.">
    435435        <events>
    436436            <trigger>
     
    441441
    442442    <DistanceTrigger name="flying5" position="-900,640,600" target="Pawn" distance=60 stayActive="true" delay=5/>
    443     <SimpleNotification message="Follow those red arrows.">
     443    <SimpleNotification message="Follow those arrows.">
    444444        <events>
    445445            <trigger>
     
    510510
    511511<!-- @Objects: 4 boxes (uncontrolled pawns) -->
    512                 <Pawn team=1 health=30 position="0,0,0" direction="0,-1,0" collisionType=dynamic mass=100000 name=box >
    513                     <events>
    514                       <visibility>
    515                         <EventListener event="flying4" />
    516                       </visibility>
    517                     </events>
    518                     <attached>
    519                         <Model position="0,0,0" mesh="crate.mesh" scale3D="3,3,3" />
    520                     </attached>
    521                     <collisionShapes>
    522                         <BoxCollisionShape position="0,0,0" halfExtents="15,15,15" />
    523                     </collisionShapes>
    524                 </Pawn>
    525 
    526                 <Pawn team=1 health=30 position="0,100,0" direction="0,-1,0" collisionType=dynamic mass=100000 name=box visible="true">
    527                     <events>
    528                       <visibility>
    529                         <EventListener event="flying4" />
    530                       </visibility>
    531                     </events>
    532                     <attached>
    533                         <Model position="0,0,0" mesh="crate.mesh" scale3D="3,3,3" />
    534                     </attached>
    535                     <collisionShapes>
    536                         <BoxCollisionShape position="0,0,0" halfExtents="15,15,15" />
    537                     </collisionShapes>
    538                 </Pawn>
    539                 <Pawn health=30 position="0,200,0" direction="0,-1,0" collisionType=dynamic mass=100000 name=box team=1>
    540                     <events>
    541                       <visibility>
    542                         <EventListener event="flying4" />
    543                       </visibility>
    544                     </events>
    545                     <attached>
    546                         <Model position="0,0,0" mesh="crate.mesh" scale3D="3,3,3" />
    547                     </attached>
    548                     <collisionShapes>
    549                         <BoxCollisionShape position="0,0,0" halfExtents="15,15,15" />
    550                     </collisionShapes>
    551                 </Pawn>
    552                 <Pawn health=30 position="0,300,0" direction="0,-1,0" collisionType=dynamic mass=100000 name=box team=1>
    553                     <events>
    554                       <visibility>
    555                         <EventListener event="flying4" />
    556                       </visibility>
    557                     </events>
    558                     <attached>
    559                         <Model position="0,0,0" mesh="crate.mesh" scale3D="3,3,3" />
    560                     </attached>
    561                     <collisionShapes>
    562                         <BoxCollisionShape position="0,0,0" halfExtents="15,15,15" />
    563                     </collisionShapes>
    564                 </Pawn>
     512    <Pawn team=1 health=30 position="0,0,0" direction="0,-1,0" collisionType=dynamic mass=100000 name=box RVName = "Box 1" >
     513        <events>
     514          <visibility>
     515            <EventListener event="flying4" />
     516          </visibility>
     517        </events>
     518        <attached>
     519            <Model position="0,0,0" mesh="crate.mesh" scale3D="3,3,3" />
     520        </attached>
     521        <collisionShapes>
     522            <BoxCollisionShape position="0,0,0" halfExtents="15,15,15" />
     523        </collisionShapes>
     524    </Pawn>
     525
     526    <Pawn team=1 health=30 position="0,100,0" direction="0,-1,0" collisionType=dynamic mass=100000 name=box RVName = "Box 2">
     527        <events>
     528          <visibility>
     529            <EventListener event="flying4" />
     530          </visibility>
     531        </events>
     532        <attached>
     533           <Model position="0,0,0" mesh="crate.mesh" scale3D="3,3,3" />
     534        </attached>
     535        <collisionShapes>
     536            <BoxCollisionShape position="0,0,0" halfExtents="15,15,15" />
     537        </collisionShapes>
     538    </Pawn>
     539
     540    <Pawn health=30 position="0,200,0" direction="0,-1,0" collisionType=dynamic mass=100000 name=box team=1 RVName = "Box 3">
     541        <events>
     542          <visibility>
     543            <EventListener event="flying4" />
     544          </visibility>
     545        </events>
     546        <attached>
     547           <Model position="0,0,0" mesh="crate.mesh" scale3D="3,3,3" />
     548        </attached>
     549        <collisionShapes>
     550            <BoxCollisionShape position="0,0,0" halfExtents="15,15,15" />
     551        </collisionShapes>
     552    </Pawn>
     553
     554    <Pawn health=30 position="0,300,0" direction="0,-1,0" collisionType=dynamic mass=100000 name=box team=1 RVName = "Box 4">
     555        <events>
     556          <visibility>
     557            <EventListener event="flying4" />
     558          </visibility>
     559        </events>
     560        <attached>
     561            <Model position="0,0,0" mesh="crate.mesh" scale3D="3,3,3" />
     562        </attached>
     563        <collisionShapes>
     564           <BoxCollisionShape position="0,0,0" halfExtents="15,15,15" />
     565        </collisionShapes>
     566    </Pawn>
    565567
    566568<!-- @Triggers: boxtrigger1 <-> one   box   destroyed
     
    634636
    635637<!-- @Objects: 2 pirates moving in squares, nonlethal -->
    636                 <SpaceShip position="0,2000,200" lookat="0,0,0" name="movingtarget" >
     638                <SpaceShip position="0,2000,200" lookat="0,0,0" name="movingtarget" RVName="Pirate">
    637639                            <events>
    638640                                <visibility>
     
    655657                </SpaceShip>
    656658
    657                 <SpaceShip position="0,2000,400" lookat="0,0,0" name="movingtarget">
     659                <SpaceShip position="0,2000,400" lookat="0,0,0" name="movingtarget" RVName="Pirate">
    658660                            <events>
    659661                                <visibility>
     
    924926
    925927
    926     <SimpleNotification message="Dock to the Hydrogen Farmer.">
     928    <SimpleNotification message="Dock to the Hydrogen Farmer." broadcast="true">
    927929        <events>
    928930            <trigger>
     
    956958    </Trigger>
    957959
    958     <SimpleNotification message="We just received a message from DuBall.">
     960    <SimpleNotification message="We just received a message from DuBall." broadcast="true">
    959961        <events>
    960962            <trigger>
     
    965967
    966968
    967     <SimpleNotification message="We will lend you our strongest ship.">
     969    <SimpleNotification message="We will lend you our strongest ship." broadcast="true">
    968970        <events>
    969971            <trigger>
     
    976978<!-- @Objects: HYDROGEN FARMER & DOCKING -->
    977979    <SpaceShip
    978         team=0
    979         position="-48900,100,0"
    980         roll=90 yaw=0 pitch=20
    981         mass=10000
    982         health=100000 initialhealth=100000 maxhealth="100000"
    983         name="HydroFarmer">
     980        team     = 0
     981        position = "-48900,100,0"
     982        roll     = 90   yaw=0  pitch=20
     983        mass     = 10000
     984        health   = 100000 initialhealth=100000 maxhealth="100000"
     985        name     = "HydroFarmer"
     986        RVName   = "Hydrogen Farmer" >
    984987      <attached>
    985988        <!-- Docking -->
     
    10631066        reloadrate          = "1"
    10641067        reloadwaittime      = "1"
    1065         name                = "cruiser" >
     1068        name                = "cruiser"
     1069        RVName              = "Spacecruiser" >
    10661070      <attached>
    10671071        <DockingTarget name="spaceShip" />
  • code/branches/gamecontent/src/orxonox/controllers/ArtificialController.h

    r8891 r8951  
    5151            void abandonTarget(Pawn* target);
    5252
    53             inline void setTeam(int team)
     53            inline void setTeam(int team) //TODO: write through to controllable entity.
    5454                { this->team_ = team; }
    5555            inline int getTeam() const
  • code/branches/gamecontent/src/orxonox/gametypes/TeamGametype.cc

    r8942 r8951  
    5959        static ColourValue colours[] =
    6060        {
    61             ColourValue(1.0f, 0.3f, 0.3f),
    62             ColourValue(0.3f, 0.3f, 1.0f),
     61            ColourValue(0.2f, 0.2f, 1.0f),
     62            ColourValue(1.0f, 0.1f, 0.1f),
    6363            ColourValue(0.3f, 1.0f, 0.3f),
    64             ColourValue(1.0f, 1.0f, 0.0f)
     64            ColourValue(1.0f, 1.0f, 0.0f),
     65            ColourValue(0.0f, 1.0f, 1.0f),
     66            ColourValue(1.0f, 0.0f, 1.0f),
     67            ColourValue(7.0f, 7.0f, 7.0f),
     68            ColourValue(2.0f, 2.0f, 2.0f)
    6569        };
    6670        static std::vector<ColourValue> defaultcolours(colours, colours + sizeof(colours) / sizeof(ColourValue));
  • code/branches/gamecontent/src/orxonox/interfaces/CMakeLists.txt

    r8942 r8951  
    66  PickupListener.cc
    77  RadarViewable.cc
    8   PartyMember.cc
    98)
  • code/branches/gamecontent/src/orxonox/worldentities/ControllableEntity.cc

    r8923 r8951  
    8787        this->setPriority( Priority::VeryHigh );
    8888        this->registerVariables();
     89        this->team_ = -1;
    8990    }
    9091
     
    119120        SUPER(ControllableEntity, XMLPort, xmlelement, mode);
    120121
     122        XMLPortParam(ControllableEntity, "team", setTeam, getTeam, xmlelement, mode).defaultValues(-1);
    121123        XMLPortParam(ControllableEntity, "hudtemplate", setHudTemplate, getHudTemplate, xmlelement, mode);
    122124        XMLPortParam(ControllableEntity, "camerapositiontemplate", setCameraPositionTemplate, getCameraPositionTemplate, xmlelement, mode);
  • code/branches/gamecontent/src/orxonox/worldentities/ControllableEntity.h

    r8923 r8951  
    163163                { return this->target_.get(); }
    164164            void setTargetInternal( uint32_t targetID );
     165
     166            inline void setTeam(int team)
     167                { this->team_ = team; }
     168            inline float getTeam() const
     169                { return this->team_; }
    165170
    166171        protected:
     
    237242            CameraPosition* reverseCamera_;
    238243            WeakPtr<WorldEntity> target_;
     244
     245            int team_ ; //<! teamnumber
    239246    };
    240247}
  • code/branches/gamecontent/src/orxonox/worldentities/pawns/Pawn.cc

    r8942 r8951  
    6060        this->bReload_ = false;
    6161
    62         this->team_ = -1;
    6362        this->health_ = 0;
    6463        this->maxHealth_ = 0;
     
    110109    {
    111110        SUPER(Pawn, XMLPort, xmlelement, mode);
    112 
    113         XMLPortParam(Pawn, "team", setTeam, getTeam, xmlelement, mode).defaultValues(-1);
    114111
    115112        XMLPortParam(Pawn, "health", setHealth, getHealth, xmlelement, mode).defaultValues(100);
  • code/branches/gamecontent/src/orxonox/worldentities/pawns/Pawn.h

    r8942 r8951  
    3535#include "interfaces/PickupCarrier.h"
    3636#include "interfaces/RadarViewable.h"
    37 #include "interfaces/PartyMember.h"
    3837#include "worldentities/ControllableEntity.h"
    3938
     
    4140{ // tolua_export
    4241    class _OrxonoxExport Pawn // tolua_export
    43         : public ControllableEntity, public RadarViewable, public PickupCarrier//, public PartyMember
     42        : public ControllableEntity, public RadarViewable, public PickupCarrier
    4443    { // tolua_export
    4544        friend class WeaponSystem;
     
    5554                { return this->bAlive_; }
    5655
    57             inline void setTeam(int team)
    58                 { this->team_ = team; }
    59             inline float getTeam() const
    60                 { return this->team_; }
    6156
    6257            virtual void setHealth(float health);
     
    200195                { return NULL; }
    201196
    202             int team_;
    203197
    204198            float health_;
Note: See TracChangeset for help on using the changeset viewer.