Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 10111 for code


Ignore:
Timestamp:
Nov 5, 2014, 4:06:09 PM (10 years ago)
Author:
fvultier
Message:
 
Location:
code/branches/pickupsFS14/src/modules/jump
Files:
39 edited

Legend:

Unmodified
Added
Removed
  • code/branches/pickupsFS14/src/modules/jump/Jump.cc

    r10074 r10111  
    2121 *
    2222 *   Author:
    23  *      Fabian 'x3n' Landau
     23 *      Fabien Vultier
    2424 *   Co-authors:
    2525 *      ...
     
    2929/**
    3030    @file Jump.cc
    31     @brief Implementation of the Jump class.
     31    @brief This is the gametype for the awesome minigame. Here the level is randomly created, the camera is shifted, ...
    3232*/
    3333
    3434#include "Jump.h"
    35 
    3635#include "core/CoreIncludes.h"
    3736#include "core/EventIncludes.h"
    3837#include "core/command/Executor.h"
    3938#include "core/config/ConfigValueIncludes.h"
    40 
    4139#include "gamestates/GSLevel.h"
    4240#include "chat/ChatManager.h"
    43 
    4441#include "JumpCenterpoint.h"
    4542#include "JumpPlatform.h"
     
    5956#include "JumpBoots.h"
    6057#include "JumpShield.h"
    61 
    6258#include "infos/PlayerInfo.h"
    6359
    6460namespace orxonox
    6561{
    66     // Events to allow to react to scoring of a player, in the level-file.
    67     CreateEventName(JumpCenterpoint, right);
    68     CreateEventName(JumpCenterpoint, left);
    69 
    7062    RegisterUnloadableClass(Jump);
    7163
    72     /**
    73     @brief
    74         Constructor. Registers and initializes the object.
    75     */
    7664    Jump::Jump(Context* context) : Deathmatch(context)
    7765    {
     
    8169        figure_ = 0;
    8270        camera = 0;
    83 
    8471        setHUDTemplate("JumpHUD");
    8572
    86         scoreLimit_ = 10;
    8773        setConfigValues();
    8874    }
    8975
    90     /**
    91     @brief
    92         Destructor. Cleans up, if initialized.
    93     */
    9476    Jump::~Jump()
    9577    {
     
    10385    {
    10486        SUPER(Jump, tick, dt);
     87
    10588        if (figure_ != NULL)
    10689        {
     
    10891                Vector3 figureVelocity = figure_->getVelocity();
    10992
    110                 float boundary = totalScreenShift+center_->getCameraOffset();
     93                float boundary = totalScreenShift_+center_->getCameraOffset();
    11194
    11295                if (figurePosition.z > boundary)
    11396                {
    114                         screenShiftSinceLastUpdate += figurePosition.z - boundary;
    115                         totalScreenShift = figurePosition.z - center_->getCameraOffset();
    116 
    117                 // Falls noetig neue Platformen im neuen Bereich einfuegen
    118                 if (screenShiftSinceLastUpdate > center_->getSectionLength())
     97                        screenShiftSinceLastUpdate_ += figurePosition.z - boundary;
     98                        totalScreenShift_ = figurePosition.z - center_->getCameraOffset();
     99
     100                // Create new platforms if needed
     101                if (screenShiftSinceLastUpdate_ > center_->getSectionLength())
    119102                {
    120                         screenShiftSinceLastUpdate -= center_->getSectionLength();
    121                         if (sectionNumber_ > 2 && sectionNumber_%4 == 0 && rand()%2 == 0)
     103                        if (sectionNumber_ > 2 && sectionNumber_%4 == 0 && rand()%2 == 0 && figure_->propellerActive_ == false && figure_->rocketActive_ == false && addAdventure(adventureNumber_) == true)
    122104                        {
    123                                 if (addAdventure(adventureNumber_) == false)
    124                                                 {
    125                                         addSection();
    126                                                 }
    127                                 else
    128                                 {
    129                                         ++ adventureNumber_;
    130                                 }
     105                                screenShiftSinceLastUpdate_ -= 2*center_->getSectionLength();
     106                                                ++ adventureNumber_;
    131107                        }
    132108                        else
    133109                        {
     110                                screenShiftSinceLastUpdate_ -= center_->getSectionLength();
    134111                                addSection();
    135112                        }
     
    137114                }
    138115
    139                 // Spiel verloren wegen Ansturz?
    140                 if (figurePosition.z < totalScreenShift - center_->getFieldDimension().y + platformHeight_ && figureVelocity.z < 0)
     116                if (figurePosition.z < totalScreenShift_ - center_->getFieldDimension().y + platformHeight_ && figureVelocity.z < 0)
    141117                {
    142                         end();
     118                        figure_->dead_ = true;
    143119                }
    144120
    145                 // Schiessen
    146 
    147                 if (figure_->fireSignal)
     121                if (figure_->fireSignal_ == true)
    148122                {
    149                         figure_->fireSignal = false;
    150                         addProjectile(figurePosition.x, figurePosition.z + figure_->getPropellerPos());
     123                        if (figure_->dead_ == true)
     124                        {
     125                                end();
     126                        }
     127                        else
     128                        {
     129                                figure_->fireSignal_ = false;
     130                                addProjectile(figurePosition.x, figurePosition.z + figure_->getPropellerPos());
     131                        }
    151132                }
    152133
     
    154135                if (camera != NULL)
    155136                        {
    156                                 Vector3 cameraPosition = Vector3(0, totalScreenShift, 0);
     137                                Vector3 cameraPosition = Vector3(0, totalScreenShift_, 0);
    157138                                camera->setPosition(cameraPosition);
    158139                        }
     
    160141                        {
    161142                                orxout() << "No camera found." << endl;
    162                                 //camera = figure_->getCamera();
    163143                        }
    164144        }
    165         else
    166         {
    167                 //orxout() << "No figure found." << endl;
    168         }
    169 
    170                 // Platformen, die zu weit unten sind entfernen
     145
    171146                ObjectList<JumpPlatform>::iterator beginPlatform = ObjectList<JumpPlatform>::begin();
    172147                ObjectList<JumpPlatform>::iterator endPlatform = ObjectList<JumpPlatform>::end();
     
    177152                {
    178153                        platformPosition = itPlatform->getPosition();
    179                         if (platformPosition.z < totalScreenShift - center_->getFieldDimension().y)
     154                        if (platformPosition.z < totalScreenShift_ - center_->getFieldDimension().y)
    180155                        {
    181156                                ObjectList<JumpPlatform>::iterator temp = itPlatform;
     
    190165                }
    191166
    192                 // DAS GEHT NICHT!!! it++ funktioniert nicht, falls eine Platform geloescht wurde -> Segmentation Error
    193                 /*
    194                 for (ObjectList<JumpPlatformDisappear>::iterator it = ObjectList<JumpPlatformDisappear>::begin(); orxout() << "E" << endl, it != ObjectList<JumpPlatformDisappear>::end(); orxout() << "F" << endl, ++it)
    195                 {
    196                         if (!it->isActive())
    197                         {
    198                                 // Entferne Platform
    199                                 center_->detach(*it);
    200                                 it->destroy();
    201                         }
    202                 }
    203                 */
    204 
    205                 // Deaktivierte Platformen entfernen
     167                // Deleted deactivated platforms
    206168                ObjectList<JumpPlatformDisappear>::iterator beginDisappear = ObjectList<JumpPlatformDisappear>::begin();
    207169                ObjectList<JumpPlatformDisappear>::iterator endDisappear = ObjectList<JumpPlatformDisappear>::end();
     
    223185                }
    224186
    225                 // Abgelaufene Timer-Platformen entfernen
    226187                ObjectList<JumpPlatformTimer>::iterator beginTimer = ObjectList<JumpPlatformTimer>::begin();
    227188                ObjectList<JumpPlatformTimer>::iterator endTimer = ObjectList<JumpPlatformTimer>::end();
     
    243204                }
    244205
    245                 // Projektile, die zu weit oben sind entfernen
    246206                ObjectList<JumpProjectile>::iterator beginProjectile = ObjectList<JumpProjectile>::begin();
    247207                ObjectList<JumpProjectile>::iterator endProjectile = ObjectList<JumpProjectile>::end();
     
    252212                {
    253213                        projectilePosition = itProjectile->getPosition();
    254                         if (projectilePosition.z > totalScreenShift + 5*center_->getFieldDimension().y)
     214                        if (projectilePosition.z > totalScreenShift_ + 5*center_->getFieldDimension().y)
    255215                        {
    256216                                ObjectList<JumpProjectile>::iterator temp = itProjectile;
     
    265225                }
    266226
    267                 // Gegner, die zu weit unten oder abgeschossen sind entfernen
    268227                ObjectList<JumpEnemy>::iterator beginEnemy = ObjectList<JumpEnemy>::begin();
    269228                ObjectList<JumpEnemy>::iterator endEnemy = ObjectList<JumpEnemy>::end();
     
    274233                {
    275234                        enemyPosition = itEnemy->getPosition();
    276                         if (enemyPosition.z < totalScreenShift - center_->getFieldDimension().y || itEnemy->dead_ == true)
     235                        if (enemyPosition.z < totalScreenShift_ - center_->getFieldDimension().y || itEnemy->dead_ == true)
    277236                        {
    278237                                ObjectList<JumpEnemy>::iterator temp = itEnemy;
     
    287246                }
    288247
    289                 // Items, die zu weit unten sind entfernen
    290248                ObjectList<JumpItem>::iterator beginItem = ObjectList<JumpItem>::begin();
    291249                ObjectList<JumpItem>::iterator endItem = ObjectList<JumpItem>::end();
     
    299257                        WorldEntity* parent = itItem->getParent();
    300258
    301                         if (itItem->attachedToFigure_ == false && itemPosition.z < totalScreenShift - center_->getFieldDimension().y && parent == center_)
     259                        if (itItem->attachedToFigure_ == false && itemPosition.z < totalScreenShift_ - center_->getFieldDimension().y && parent == center_)
    302260                        {
    303261                                ObjectList<JumpItem>::iterator temp = itItem;
     
    313271    }
    314272
    315     void Jump::setConfigValues()
    316     {
    317         SetConfigValue(scoreLimit_, 10).description("The player first reaching those points wins.");
    318     }
    319 
    320     /**
    321     @brief
    322         Cleans up the Gametype by destroying the ball and the bats.
    323     */
    324273    void Jump::cleanup()
    325274    {
    326                 if (figure_ != NULL)
    327                 {
    328                         //this->figure_->destroy();
    329                         //this->figure_ = 0;
    330                 }
    331275                camera = 0;
    332276    }
     
    354298        }
    355299
    356         // Set variable to temporarily force the player to spawn.
    357         bool temp = bForceSpawn_;
    358         bForceSpawn_ = true;
    359 
    360300        // Call start for the parent class.
    361301        Deathmatch::start();
    362 
    363         // Reset the variable.
    364         bForceSpawn_ = temp;
    365302
    366303        if (figure_ != NULL)
     
    369306        }
    370307
    371         totalScreenShift = 0.0;
    372         screenShiftSinceLastUpdate = 0.0;
     308        totalScreenShift_ = 0.0;
     309        screenShiftSinceLastUpdate_ = 0.0;
    373310        sectionNumber_ = 0;
    374311        adventureNumber_ = 0;
     
    379316    }
    380317
    381     /**
    382     @brief
    383         Ends the Jump minigame.
    384     */
    385318    void Jump::end()
    386319    {
     
    388321        GSLevel::startMainMenu();
    389322
    390         // Call end for the parent class.
    391323        Deathmatch::end();
    392324    }
    393325
    394     /**
    395     @brief
    396         Spawns the input player.
    397     @param player
    398         The player to be spawned.
    399     */
    400326    void Jump::spawnPlayer(PlayerInfo* player)
    401327    {
    402328        assert(player);
    403329
    404         // If the first (left) bat has no player.
    405         if (this->figure_->getPlayer() == NULL)
     330        if (figure_->getPlayer() == NULL)
    406331        {
    407             player->startControl(this->figure_);
    408             this->players_[player].state_ = PlayerState::Alive;
     332            player->startControl(figure_);
     333            players_[player].state_ = PlayerState::Alive;
    409334        }
    410335    }
    411336
    412     /**
    413     @brief
    414         Is called when the player scored.
    415     */
    416     void Jump::playerScored(PlayerInfo* player, int score)
    417     {
    418 
    419     }
    420 
    421     /**
    422     @brief
    423         Starts the ball with some default speed.
    424     */
    425     void Jump::startBall()
    426     {
    427 
    428     }
    429 
    430     /**
    431     @brief
    432         Get the left player.
    433     @return
    434         Returns a pointer to the player playing on the left. If there is no left player, NULL is returned.
    435     */
    436337    PlayerInfo* Jump::getPlayer() const
    437338    {
     
    494395    JumpPlatformTimer* Jump::addPlatformTimer(float xPosition, float zPosition, float time, float variance)
    495396    {
    496                 float additionalTime = (float)(rand()%100)/(100*variance) - variance/2;
     397                float additionalTime = (float)(rand()%100)/100.0*variance - variance/2.0;
    497398
    498399        JumpPlatformTimer* newPlatform = new JumpPlatformTimer(center_->getContext());
     
    752653            }
    753654            else if (rand()%2 == 0 && sectionNumber_ > 3)
    754                 switch(rand()%4)
    755                 {
    756                 case 0:
    757                         itemType = ITEM_PROPELLER;
    758                         break;
    759                 case 1:
    760                         itemType = ITEM_ROCKET;
    761                         break;
    762                 case 2:
    763                         itemType = ITEM_BOOTS;
    764                         break;
    765                 case 3:
    766                         itemType = ITEM_SHIELD;
    767                         break;
    768                 default:
    769                         break;
    770                 }
     655            {
     656                        switch(rand()%4)
     657                        {
     658                        case 0:
     659                                itemType = ITEM_PROPELLER;
     660                                break;
     661                        case 1:
     662                                itemType = ITEM_ROCKET;
     663                                break;
     664                        case 2:
     665                                itemType = ITEM_BOOTS;
     666                                break;
     667                        case 3:
     668                                itemType = ITEM_SHIELD;
     669                                break;
     670                        default:
     671                                break;
     672                        }
     673            }
    771674
    772675                switch((sectionNumber_ > 28) ? rand()%29 : rand()%(sectionNumber_+1))
     
    894797            }
    895798
    896             // Fill Matrix with selected platform types
     799            // Fill matrix with selected platform types
    897800            for (int i = 0; i < numI; ++ i)
    898801            {
    899802                          for (int j = 0; j < numJ; ++ j)
    900803                          {
    901                                         if (rand()%(sectionNumber_+1) == 0)
     804                                        if (rand()%3 == 0)
    902805                                        {
    903806                                            matrix[i][j].type = platformtype1;
     
    911814            }
    912815
    913             // Delete some platforms or replace them with fake platforms
    914             if (platformtype1 == platformtype2 && sectionNumber_ > 10)
     816            if (platformtype1 == platformtype2 && sectionNumber_ > 10 && rand()%2 == 0)
    915817            {
    916                 int j = rand()%numJ;
    917                         if (rand()%2 == 0)
    918                         {
    919                                 for (int i = 0; i <= j; ++ i)
    920                                 {
    921                                     matrix[rand()%numI][rand()%numJ].type = PLATFORM_EMPTY;
    922                                 }
    923                         }
    924                         else
    925                         {
    926                             for (int i = 0; i <= j; ++ i)
    927                                 {
    928                                       matrix[rand()%numI][rand()%numJ].type = PLATFORM_FAKE;
    929                                 }
    930                         }
     818                matrix[rand()%numI][rand()%numJ].type = PLATFORM_EMPTY;
     819                    matrix[rand()%numI][rand()%numJ].type = PLATFORM_EMPTY;
     820            }
     821
     822            // Delete some planned platforms or replace them with fake platforms
     823            if (sectionNumber_ > 5)
     824            {
     825                if (rand()%2 == 0)
     826                {
     827                        matrix[rand()%numI][rand()%numJ].type = PLATFORM_EMPTY;
     828                }
     829                else
     830                {
     831                        matrix[rand()%numI][rand()%numJ].type = PLATFORM_FAKE;
     832                }
     833            }
     834            else if (sectionNumber_ > 10)
     835            {
     836                if (rand()%2 == 0)
     837                {
     838                        matrix[rand()%numI][rand()%numJ].type = PLATFORM_EMPTY;
     839                }
     840                else
     841                {
     842                        matrix[rand()%numI][rand()%numJ].type = PLATFORM_FAKE;
     843                }
     844                if (rand()%2 == 0)
     845                {
     846                        matrix[rand()%numI][rand()%numJ].type = PLATFORM_EMPTY;
     847                }
     848                else
     849                {
     850                        matrix[rand()%numI][rand()%numJ].type = PLATFORM_FAKE;
     851                }
     852            }
     853            else if (sectionNumber_ > 15)
     854            {
     855                if (rand()%2 == 0)
     856                {
     857                        matrix[rand()%numI][rand()%numJ].type = PLATFORM_EMPTY;
     858                }
     859                else
     860                {
     861                        matrix[rand()%numI][rand()%numJ].type = PLATFORM_FAKE;
     862                }
     863                if (rand()%2 == 0)
     864                {
     865                        matrix[rand()%numI][rand()%numJ].type = PLATFORM_EMPTY;
     866                }
     867                else
     868                {
     869                        matrix[rand()%numI][rand()%numJ].type = PLATFORM_FAKE;
     870                }
     871                if (rand()%2 == 0)
     872                {
     873                        matrix[rand()%numI][rand()%numJ].type = PLATFORM_EMPTY;
     874                }
     875                else
     876                {
     877                        matrix[rand()%numI][rand()%numJ].type = PLATFORM_FAKE;
     878                }
    931879            }
    932880
     
    968916                                                xPosition = randomXPosition(numJ, j);
    969917                                                zPosition = sectionBegin + i*sectionLength/numI;
    970                                                 platformList.push_back(addPlatformTimer(xPosition, zPosition, 10.0, 1.5));
     918                                                platformList.push_back(addPlatformTimer(xPosition, zPosition, 12.0, 1.5));
    971919                                            matrix[i][j].done = true;
    972920                                        break;
     
    1044992                                            break;
    1045993                                    default:
    1046                                         // ERROR
     994                                        //ERROR
    1047995                                        break;
    1048996
    1049997                        }
    1050 
    1051                                         /*if (platformtype1 != PLATFORM_TIMER && platformtype2 != PLATFORM_TIMER)
    1052                                         {
    1053                                                 switch (itemType)
    1054                                                 {
    1055                                                 case ITEM_SPRING:
    1056                                                         addSpring(xPosition, zPosition, leftBoundary, rightBoundary, lowerBoundary, upperBoundary, xVelocity, zVelocity);
    1057                                                         itemType = ITEM_NOTHING;
    1058                                                         break;
    1059                                                 case ITEM_ROCKET:
    1060                                                         addRocket(xPosition, zPosition, leftBoundary, rightBoundary, lowerBoundary, upperBoundary, xVelocity, zVelocity);
    1061                                                         itemType = ITEM_NOTHING;
    1062                                                         break;
    1063                                                 case ITEM_PROPELLER:
    1064                                                         addPropeller(xPosition, zPosition, leftBoundary, rightBoundary, lowerBoundary, upperBoundary, xVelocity, zVelocity);
    1065                                                         itemType = ITEM_NOTHING;
    1066                                                         break;
    1067                                                 case ITEM_BOOTS:
    1068                                                         addBoots(xPosition, zPosition, leftBoundary, rightBoundary, lowerBoundary, upperBoundary, xVelocity, zVelocity);
    1069                                                         itemType = ITEM_NOTHING;
    1070                                                         break;
    1071                                                 case ITEM_SHIELD:
    1072                                                         addShield(xPosition, zPosition, leftBoundary, rightBoundary, lowerBoundary, upperBoundary, xVelocity, zVelocity);
    1073                                                         itemType = ITEM_NOTHING;
    1074                                                         break;
    1075                                                 default:
    1076                                                         // ERROR
    1077                                                         break;
    1078                                                 }
    1079                                         }*/
    1080998                    }
    1081999                }
     
    10851003        int numNewPlatforms = platformList.size();
    10861004
    1087         if (numNewPlatforms > 0)
     1005        if (rand()%4 == 0)
    10881006        {
    1089                 JumpPlatform* itemPlatform = platformList[rand()%numNewPlatforms];
    1090 
    1091                         switch (ITEM_BOOTS)
    1092                         {
    1093                         case ITEM_SPRING:
    1094                                 addSpring(itemPlatform);
    1095                                 break;
    1096                         case ITEM_ROCKET:
    1097                                 addRocket(itemPlatform);
    1098                                 break;
    1099                         case ITEM_PROPELLER:
    1100                                 addPropeller(itemPlatform);
    1101                                 break;
    1102                         case ITEM_BOOTS:
    1103                                 addBoots(itemPlatform);
    1104                                 break;
    1105                         case ITEM_SHIELD:
    1106                                 addShield(itemPlatform);
    1107                                 break;
    1108                         default:
    1109                                 break;
    1110                         }
     1007                        if (rand()%2 == 0)
     1008                        {
     1009                        switch (itemType)
     1010                                {
     1011                                case ITEM_ROCKET:
     1012                                        addRocket(0.0, randomPosition(sectionBegin, sectionBegin + sectionLength), -fieldWidth/2, fieldWidth/2, 0.0, 0.0, randomSpeed(), 0.0);
     1013                                        break;
     1014                                case ITEM_PROPELLER:
     1015                                        addPropeller(0.0, randomPosition(sectionBegin, sectionBegin + sectionLength), -fieldWidth/2, fieldWidth/2, 0.0, 0.0, randomSpeed(), 0.0);
     1016                                        break;
     1017                                case ITEM_BOOTS:
     1018                                        addBoots(0.0, randomPosition(sectionBegin, sectionBegin + sectionLength), -fieldWidth/2, fieldWidth/2, 0.0, 0.0, randomSpeed(), 0.0);
     1019                                        break;
     1020                                case ITEM_SHIELD:
     1021                                        addShield(0.0, randomPosition(sectionBegin, sectionBegin + sectionLength), -fieldWidth/2, fieldWidth/2, 0.0, 0.0, randomSpeed(), 0.0);
     1022                                        break;
     1023                                default:
     1024                                        break;
     1025                                }
     1026                        }
     1027                        else
     1028                        {
     1029                        switch (itemType)
     1030                                {
     1031                                case ITEM_ROCKET:
     1032                                        addRocket(randomPosition(-fieldWidth/2, fieldWidth/2), sectionBegin + sectionLength/2, 0.0, 0.0, sectionBegin, sectionEnd, 0.0, randomSpeed());
     1033                                        break;
     1034                                case ITEM_PROPELLER:
     1035                                        addPropeller(randomPosition(-fieldWidth/2, fieldWidth/2), sectionBegin + sectionLength/2, 0.0, 0.0, sectionBegin, sectionEnd, 0.0, randomSpeed());
     1036                                        break;
     1037                                case ITEM_BOOTS:
     1038                                        addBoots(randomPosition(-fieldWidth/2, fieldWidth/2), sectionBegin + sectionLength/2, 0.0, 0.0, sectionBegin, sectionEnd, 0.0, randomSpeed());
     1039                                        break;
     1040                                case ITEM_SHIELD:
     1041                                        addShield(randomPosition(-fieldWidth/2, fieldWidth/2), sectionBegin + sectionLength/2, 0.0, 0.0, sectionBegin, sectionEnd, 0.0, randomSpeed());
     1042                                        break;
     1043                                default:
     1044                                        break;
     1045                                }
     1046                        }
     1047        }
     1048        else
     1049        {
     1050                if (numNewPlatforms > 0)
     1051                {
     1052                        JumpPlatform* itemPlatform = platformList[rand()%numNewPlatforms];
     1053
     1054                        switch (itemType)
     1055                        {
     1056                        case ITEM_SPRING:
     1057                                addSpring(itemPlatform);
     1058                                break;
     1059                        case ITEM_ROCKET:
     1060                                addRocket(itemPlatform);
     1061                                break;
     1062                        case ITEM_PROPELLER:
     1063                                addPropeller(itemPlatform);
     1064                                break;
     1065                        case ITEM_BOOTS:
     1066                                addBoots(itemPlatform);
     1067                                break;
     1068                        case ITEM_SHIELD:
     1069                                addShield(itemPlatform);
     1070                                break;
     1071                        default:
     1072                                break;
     1073                        }
     1074                }
    11111075        }
    11121076
    11131077        if (sectionNumber_ >= 5 && rand()%3 == 0)
    11141078        {
    1115                 //  BEWEGUNG Verbessern, Grenzen anpassen !!!!!!!! Auch Vertikale Bewegung zulassen
    1116 
    1117 
    11181079            switch(rand()%4)
    11191080                {
    11201081            case 0:
    1121                 addEnemy(1, randomXPosition(), randomPosition(sectionBegin, sectionBegin + sectionLength), -fieldWidth, fieldWidth, sectionBegin, sectionBegin + sectionLength, 5.0, 0.0);
     1082                addEnemy(1, randomXPosition(), randomPosition(sectionBegin, sectionBegin + sectionLength), -fieldWidth/3*2, fieldWidth/3*2, sectionBegin, sectionBegin + sectionLength, randomSpeed(), 0.0);
    11221083                break;
    11231084            case 1:
    1124                 addEnemy(2, randomXPosition(), randomPosition(sectionBegin, sectionBegin + sectionLength), -fieldWidth, fieldWidth, sectionBegin, sectionBegin + sectionLength, 5.0, 0.0);
     1085                addEnemy(2, randomXPosition(), randomPosition(sectionBegin, sectionBegin + sectionLength), -fieldWidth/3*2, fieldWidth/3*2, sectionBegin, sectionBegin + sectionLength, randomSpeed(), 0.0);
    11251086                break;
    11261087            case 2:
    1127                 addEnemy(3, randomXPosition(), randomPosition(sectionBegin, sectionBegin + sectionLength), -fieldWidth, fieldWidth, sectionBegin, sectionBegin + sectionLength, 5.0, 0.0);
     1088                addEnemy(3, randomXPosition(), randomPosition(sectionBegin, sectionBegin + sectionLength), -fieldWidth/3*2, fieldWidth/3*2, sectionBegin, sectionBegin + sectionLength, randomSpeed(), 0.0);
    11281089                break;
    11291090            case 3:
    1130                 addEnemy(4, randomXPosition(), randomPosition(sectionBegin, sectionBegin + sectionLength), -fieldWidth, fieldWidth, sectionBegin, sectionBegin + sectionLength, 5.0, 0.0);
     1091                addEnemy(4, randomXPosition(), randomPosition(sectionBegin, sectionBegin + sectionLength), -fieldWidth/3*2, fieldWidth/3*2, sectionBegin, sectionBegin + sectionLength, randomSpeed(), 0.0);
    11311092                break;
    11321093                }
     
    11471108                        {
    11481109                                int numI = 10;
    1149                                 for (int i = 0; i < numI; ++ i)
     1110                                if (rand()%2 == 0)
    11501111                                {
    1151                                         addPlatformStatic((2*fieldWidth-platformWidth_)*i/numI-fieldWidth+platformWidth_/2, sectionBegin+i*sectionLength/numI);
     1112                                        for (int i = 0; i < numI; ++ i)
     1113                                        {
     1114                                                addPlatformStatic((2*fieldWidth-platformWidth_)*i/numI-fieldWidth+platformWidth_/2, sectionBegin+i*sectionLength/numI);
     1115                                        }
     1116                                }
     1117                                else
     1118                                {
     1119                                        for (int i = 0; i < numI; ++ i)
     1120                                        {
     1121                                                addPlatformStatic((2*fieldWidth-platformWidth_)*i/numI-fieldWidth+platformWidth_/2, sectionBegin+(numI-i)*sectionLength/numI);
     1122                                        }
    11521123                                }
    11531124                                break;
     
    11581129
    11591130                        addPlatformStatic(0.0, sectionBegin);
    1160                         for (int i = 1; i < numI; ++ i)
    1161                         {
    1162                                 addPlatformStatic((fieldWidth-platformWidth_/2)*i/numI, sectionBegin+i*sectionLength/numI);
    1163                                 addPlatformStatic(-(fieldWidth-platformWidth_/2)*i/numI, sectionBegin+i*sectionLength/numI);
     1131                        if (rand()%2 == 0)
     1132                        {
     1133                                for (int i = 1; i < numI; ++ i)
     1134                                {
     1135                                        addPlatformStatic((fieldWidth-platformWidth_/2)*i/numI, sectionBegin+i*sectionLength/numI);
     1136                                        addPlatformStatic(-(fieldWidth-platformWidth_/2)*i/numI, sectionBegin+i*sectionLength/numI);
     1137                                }
     1138                        }
     1139                        else
     1140                        {
     1141                                for (int i = 1; i < numI; ++ i)
     1142                                {
     1143                                        addPlatformStatic((fieldWidth-platformWidth_/2)*i/numI, sectionBegin+(numI-i)*sectionLength/numI);
     1144                                        addPlatformStatic(-(fieldWidth-platformWidth_/2)*i/numI, sectionBegin+(numI-i)*sectionLength/numI);
     1145                                }
    11641146                        }
    11651147                        break;
     
    11681150                        {
    11691151                                int numI = 5;
    1170                                 for (int i = 0; i < numI; ++ i)
     1152                                for (int i = 0; i <= numI; ++ i)
    11711153                                {
    1172                                         addPlatformStatic((2*fieldWidth-platformWidth_)*i/numI-fieldWidth+platformWidth_/2, sectionBegin);
    1173                                         addPlatformStatic((2*fieldWidth-platformWidth_)*i/numI-fieldWidth+platformWidth_/2, sectionBegin+sectionLength/5);
    1174                                         addPlatformStatic((2*fieldWidth-platformWidth_)*i/numI-fieldWidth+platformWidth_/2, sectionBegin+sectionLength*2/5);
    1175                                         addPlatformStatic((2*fieldWidth-platformWidth_)*i/numI-fieldWidth+platformWidth_/2, sectionBegin+sectionLength*3/5);
    1176                                         addPlatformStatic((2*fieldWidth-platformWidth_)*i/numI-fieldWidth+platformWidth_/2, sectionBegin+sectionLength*4/5);
     1154                                        addPlatformStatic((2*fieldWidth-platformWidth_)*i/numI-fieldWidth, sectionBegin);
     1155                                        addPlatformStatic((2*fieldWidth-platformWidth_)*i/numI-fieldWidth, sectionBegin+sectionLength/5);
     1156                                        addPlatformStatic((2*fieldWidth-platformWidth_)*i/numI-fieldWidth, sectionBegin+sectionLength*2/5);
     1157                                        addPlatformStatic((2*fieldWidth-platformWidth_)*i/numI-fieldWidth, sectionBegin+sectionLength*3/5);
     1158                                        addPlatformStatic((2*fieldWidth-platformWidth_)*i/numI-fieldWidth, sectionBegin+sectionLength*4/5);
    11771159                                        addEnemy(4, (2*fieldWidth-platformWidth_)*i/numI-fieldWidth+platformWidth_/2, sectionBegin+sectionLength/2, -fieldWidth, fieldWidth, sectionBegin, sectionBegin + sectionLength, 0.0, 0.0);
    11781160                                }
     1161                                break;
     1162                        }
     1163        case 3:
     1164                        {
     1165                                addRocket(addPlatformStatic(0.0, sectionBegin));
     1166                                addEnemy(2, 0.0, sectionBegin+sectionLength/5, 0.0,0.0, 0.0, 0.0, 0.0, 0.0);
     1167                                break;
     1168                        }
     1169        case 4:
     1170                        {
     1171                                addPropeller(addPlatformStatic(0.0, sectionBegin));
     1172                                addPropeller(addPlatformStatic(-fieldWidth/2, sectionBegin));
     1173                                addPropeller(addPlatformStatic(fieldWidth/2, sectionBegin));
    11791174                                break;
    11801175                        }
     
    11951190    float Jump::randomXPosition(int totalColumns, int culomn)
    11961191    {
    1197         float fieldWidth = center_->getFieldDimension().x; //Width of the half field
    1198 
    1199         float halfWidth = fieldWidth/totalColumns; //Width of a half column
    1200         float leftBound = culomn*halfWidth*2-fieldWidth; //Left beginning of the column
     1192        float fieldWidth = center_->getFieldDimension().x;
     1193
     1194        float halfWidth = fieldWidth/totalColumns;
     1195        float leftBound = culomn*halfWidth*2-fieldWidth;
    12011196        float rightBound = leftBound + 2*halfWidth;
    12021197
     
    12061201    float Jump::randomXPositionLeft(int totalColumns, int culomn)
    12071202    {
    1208         float fieldWidth = center_->getFieldDimension().x; //Width of the half field
    1209 
    1210         float halfWidth = fieldWidth/totalColumns; //Width of a half column
    1211         float leftBound = culomn*halfWidth*2-fieldWidth; //LeftBeginning of the column
     1203        float fieldWidth = center_->getFieldDimension().x;
     1204
     1205        float halfWidth = fieldWidth/totalColumns;
     1206        float leftBound = culomn*halfWidth*2-fieldWidth;
    12121207        float rightBound = leftBound + 2*halfWidth/3;
    12131208
     
    12171212    float Jump::randomXPositionRight(int totalColumns, int culomn)
    12181213    {
    1219         float fieldWidth = center_->getFieldDimension().x; //Width of the half field
    1220 
    1221         float halfWidth = fieldWidth/totalColumns; //Width of a half column
     1214        float fieldWidth = center_->getFieldDimension().x;
     1215
     1216        float halfWidth = fieldWidth/totalColumns;
    12221217        float rightBound = (culomn+1)*halfWidth*2-fieldWidth;
    12231218        float leftBound = rightBound - 2*halfWidth/3;
     
    12271222    float Jump::randomZPosition(int totalRows, int row, float sectionBegin, float SectionEnd)
    12281223    {
    1229         float fieldHeight = SectionEnd - sectionBegin; //Heigt of the half field
    1230         float halfHeight = fieldHeight/totalRows; //Height of a half row
    1231         float lowerBound = row*halfHeight*2+sectionBegin; //Lower beginning of the row
     1224        float fieldHeight = SectionEnd - sectionBegin;
     1225        float halfHeight = fieldHeight/totalRows;
     1226        float lowerBound = row*halfHeight*2+sectionBegin;
    12321227        float upperBound = lowerBound + 2*halfHeight;
    12331228
     
    12371232    float Jump::randomZPositionLower(int totalRows, int row, float sectionBegin, float SectionEnd)
    12381233    {
    1239         float fieldHeight = SectionEnd - sectionBegin; //Heigt of the half field
    1240         float rowHeight = fieldHeight/totalRows; //Height of a row
    1241         float lowerBound = row*rowHeight+sectionBegin; //Lower beginning of the row
     1234        float fieldHeight = SectionEnd - sectionBegin;
     1235        float rowHeight = fieldHeight/totalRows;
     1236        float lowerBound = row*rowHeight+sectionBegin;
    12421237        float upperBound = lowerBound + rowHeight/3;
    12431238
     
    12471242    float Jump::randomZPositionUpper(int totalRows, int row, float sectionBegin, float SectionEnd)
    12481243    {
    1249         float fieldHeight = SectionEnd - sectionBegin; //Heigt of the half field
    1250         float rowHeight = fieldHeight/totalRows; //Height of a row
    1251         float lowerBound = (row+1)*rowHeight+sectionBegin; //Upper end of the row
     1244        float fieldHeight = SectionEnd - sectionBegin;
     1245        float rowHeight = fieldHeight/totalRows;
     1246        float lowerBound = (row+1)*rowHeight+sectionBegin;
    12521247        float upperBound = lowerBound - rowHeight/3;
    12531248
  • code/branches/pickupsFS14/src/modules/jump/Jump.h

    r10074 r10111  
    2727 */
    2828
    29 /**
    30     @file Jump.h
    31     @brief Declaration of the Jump class.
    32     @ingroup Jump
    33 */
    34 
    3529#ifndef _Jump_H__
    3630#define _Jump_H__
    3731
    3832#include "jump/JumpPrereqs.h"
    39 
    4033#include "tools/Timer.h"
    4134#include "graphics/Camera.h"
    42 
    4335#include "gametypes/Deathmatch.h"
    4436#include "JumpCenterpoint.h"
    45 
    4637#include <list>
    4738
    4839namespace orxonox
    4940{
    50 
    51     /**
    52     @brief
    53         Implements a Jump minigame (<a href="http://en.wikipedia.org/wiki/Jump">Wikipedia::Jump</a>).
    54         It connects the different entities present in a game of Jump.
    55 
    56         - The @ref orxonox::JumpCenterpoint "JumpCenterpoint" is the playing field for the Jump minigame, it allows for configuration of the minigame, e.g. by setting the size of the playing field, or the length of the @ref orxonox::JumpFigure "JumpFigures". The playing field is always in the x,y-plane, the x-axis being the horizontal and the z-axis being the vertical axis.<br />
    57         The Jump class redistributes the important parameters defined in @ref orxonox::JumpCenterpoint "JumpCenterpoint" to the other entities, that need to know them, e.g. the @ref orxonox::JumpPlatform "JumpPlatform" and the @ref orxonox::JumpFigure "JumpFigures".<br />
    58         The @ref orxonox::JumpCenterpoint "JumpCenterpoint" needs to exist in a level with the @ref orxonox::Gametype "Gametype" <em>Jump</em>.
    59         - The @ref orxonox::JumpPlatform "JumpPlatform" is the ball both players play with. The @ref orxonox::JumpPlatform "JumpPlatform" both implements the movement of the ball, as well as the influence of the boundaries and consequently, also the bouncing (off the upper and lower delimiters, and as off the @ref orxonox::JumpFigure "JumpFigures") of the ball and the effects of the failure of a player to catch the ball (i.e. the scoring of the other player).
    60         - The two @ref orxonox::JumpFigure "JumpFigures" are the entities through which the players can actively participate in the game, by controlling them. The @ref orxonox::JumpFigure "JumpFigure" class manages the movement (and restrictions thereof) and the influence of the players on the bats.
    61 
    62     @author
    63         Fabian 'x3n' Landau
    64 
    65     @ingroup Jump
    66     */
    6741    class _JumpExport Jump : public Deathmatch
    6842    {
    6943        public:
    70             Jump(Context* context); //!< Constructor. Registers and initializes the object.
    71             virtual ~Jump(); //!< Destructor. Cleans up, if initialized.
    72 
     44            Jump(Context* context);
     45            virtual ~Jump();
    7346            virtual void tick(float dt);
    74 
    75             virtual void start(); //!< Starts the Jump minigame.
    76             virtual void end(); ///!< Ends the Jump minigame.
    77 
    78             virtual void spawnPlayer(PlayerInfo* player); //!< Spawns the input player.
    79 
    80             virtual void playerScored(PlayerInfo* player, int score = 1); //!< Is called when the player scored.
    81 
     47            virtual void start();
     48            virtual void end();
     49            virtual void spawnPlayer(PlayerInfo* player);
    8250            int getScore(PlayerInfo* player) const;
    8351            bool getDead(PlayerInfo* player) const;
    84 
    85             /**
    86             @brief Set the JumpCenterpoint (the playing field).
    87             @param center A pointer to the JumpCenterpoint to be set.
    88             */
    8952            void setCenterpoint(JumpCenterpoint* center)
    9053                { center_ = center; }
    91             void setConfigValues(); //!< Makes scoreLimit configurable.
    92 
    93             PlayerInfo* getPlayer() const; //!< Get the left player.
     54            PlayerInfo* getPlayer() const;
    9455
    9556        protected:
    96             void startBall(); //!< Starts the ball with some default speed.
    97             void cleanup(); //!< Cleans up the Gametype by destroying the ball and the bats.
    98 
     57            void cleanup();
    9958            virtual void addPlatform(JumpPlatform* newPlatform, std::string platformTemplate, float xPosition, float zPosition);
    100 
    10159            virtual JumpPlatformStatic* addPlatformStatic(float xPosition, float zPosition);
    10260            virtual JumpPlatformHMove* addPlatformHMove(float xPosition, float zPosition, float leftBoundary, float rightBoundary, float speed);
     
    11775            virtual void addShield(float xPosition, float zPosition, float leftBoundary, float rightBoundary, float lowerBoundary, float upperBoundary, float xVelocity, float zVelocity);
    11876            virtual void addShield(JumpPlatform* platform);
    119 
    12077            virtual void addStartSection();
    12178            virtual void addSection();
    12279            virtual bool addAdventure(int number);
    123 
    12480            virtual float randomXPosition();
    12581            virtual float randomXPosition(int totalColumns, int culomn);
     
    12985            virtual float randomZPositionLower(int totalRows, int row, float sectionBegin, float SectionEnd);
    13086            virtual float randomZPositionUpper(int totalRows, int row, float sectionBegin, float SectionEnd);
    131 
    13287            virtual float randomPosition(float lowerBoundary, float upperBoundary);
    13388            virtual float randomSpeed();
    13489
    135             WeakPtr<JumpCenterpoint> center_; //!< The playing field.
    136             WeakPtr<JumpFigure> figure_; //!< The two bats.
     90            WeakPtr<JumpCenterpoint> center_;
     91            WeakPtr<JumpFigure> figure_;
    13792            WeakPtr<Camera> camera;
    138             int scoreLimit_; //!< If a player scored that much points, the game is ended.
    139 
    140             float totalScreenShift;
    141             float screenShiftSinceLastUpdate;
     93            float totalScreenShift_;
     94            float screenShiftSinceLastUpdate_;
    14295            int sectionNumber_;
    14396            int adventureNumber_;
  • code/branches/pickupsFS14/src/modules/jump/JumpBoots.cc

    r10074 r10111  
    2121 *
    2222 *   Author:
    23  *      Fabian 'x3n' Landau
     23 *      Fabien Vultier
    2424 *   Co-authors:
    2525 *      ...
     
    2929/**
    3030    @file JumpBoots.cc
    31     @brief Implementation of the JumpBoots class.
     31    @brief These boots give the figure a speed bonus when it jumpes.
    3232*/
    3333
     
    4848    RegisterClass(JumpBoots);
    4949
    50     /**
    51     @brief
    52         Constructor. Registers and initializes the object.
    53     */
    5450    JumpBoots::JumpBoots(Context* context) : JumpItem(context)
    5551    {
     
    5753
    5854        fuel_ = 3.0;
     55        attachedToFigure_ = false;
    5956
    6057        setPosition(Vector3(0,0,0));
     
    6461    }
    6562
    66     /**
    67     @brief
    68         Destructor.
    69     */
    7063    JumpBoots::~JumpBoots()
    7164    {
     
    7366    }
    7467
    75     //xml port for loading sounds
    7668    void JumpBoots::XMLPort(Element& xmlelement, XMLPort::Mode mode)
    7769    {
     
    7971    }
    8072
    81     /**
    82     @brief
    83         Is called every tick.
    84         Handles the movement of the ball and its interaction with the boundaries and bats.
    85     @param dt
    86         The time since the last tick.
    87     */
    8873    void JumpBoots::tick(float dt)
    8974    {
     
    116101
    117102        attachedToFigure_ = figure_->StartBoots(this);
    118         if (attachedToFigure_)
    119         {
    120                 //Starte Feuer-Animation
    121         }
    122103    }
    123104}
  • code/branches/pickupsFS14/src/modules/jump/JumpBoots.h

    r10074 r10111  
    2121 *
    2222 *   Author:
    23  *      Fabian 'x3n' Landau
     23 *      Fabien Vultier
    2424 *   Co-authors:
    2525 *      ...
     
    2727 */
    2828
    29 /**
    30     @file JumpBoots.h
    31     @brief Declaration of the JumpBoots class.
    32     @ingroup Jump
    33 */
    34 
    3529#ifndef _JumpBoots_H__
    3630#define _JumpBoots_H__
    3731
    3832#include "jump/JumpPrereqs.h"
    39 
    4033#include "util/Math.h"
    41 
    4234#include "worldentities/MovableEntity.h"
    4335
     
    4537namespace orxonox
    4638{
    47 
    48     /**
    49     @brief
    50         This class manages the ball for @ref orxonox::Jump "Jump".
    51 
    52         It is responsible for both the movement of the ball in the x,z-plane as well as its interaction with the boundaries of the playing field (defined by the @ref orxonox::JumpCenterpoint "JumpCenterpoint") and the @ref orxonox::JumpFigure "JumpFigures". Or more precisely, it makes the ball bounce off then upper and lower delimiters of the playing field, it makes the ball bounce off the bats and also detects when a player scores and takes appropriate measures.
    53 
    54     @author
    55         Fabian 'x3n' Landau
    56 
    57     @ingroup Jump
    58     */
    5939    class _JumpExport JumpBoots : public JumpItem
    6040    {
  • code/branches/pickupsFS14/src/modules/jump/JumpCenterpoint.cc

    r10074 r10111  
    2121 *
    2222 *   Author:
    23  *      Fabian 'x3n' Landau
     23 *      Fabien Vultier
    2424 *   Co-authors:
    2525 *      ...
     
    2929/**
    3030    @file JumpCenterpoint.cc
    31     @brief Implementation of the JumpCenterpoint class.
     31    @brief The JumpCenterpoint is a StaticEntity which represents the level of the minigame. All platforms, enemies and items are attached to the JumpCenterpoint.
    3232*/
    3333
    3434#include "JumpCenterpoint.h"
    35 
    3635#include "core/CoreIncludes.h"
    3736#include "core/XMLPort.h"
    38 
    3937#include "Jump.h"
    4038
     
    4341    RegisterClass(JumpCenterpoint);
    4442
    45     /**
    46     @brief
    47         Constructor. Registers and initializes the object and checks whether the gametype is actually Jump.
    48     */
    4943    JumpCenterpoint::JumpCenterpoint(Context* context) : StaticEntity(context)
    5044    {
    5145        RegisterObject(JumpCenterpoint);
    5246
    53         // Variablen hier veraendern nuetzt nichts! Diese Variablen koennen in Level-File initialisiert werden.
    54         width_ = 200;
    55         height_ = 120;
    56         sectionLength_ = 120;
    57         platformSpeed_ = 20.0;
     47        width_ = 0.0;
     48        height_ = 0.0;
     49        sectionLength_ = 0.0;
     50        platformSpeed_ = 0.0;
    5851
    5952        checkGametype();
    6053    }
    6154
    62     /**
    63     @brief
    64         Method to create a JumpCenterpoint through XML.
    65     */
    6655    void JumpCenterpoint::XMLPort(Element& xmlelement, XMLPort::Mode mode)
    6756    {
     
    9180    }
    9281
    93     /**
    94     @brief
    95         Is called when the gametype has changed.
    96     */
    9782    void JumpCenterpoint::changedGametype()
    9883    {
    9984        SUPER(JumpCenterpoint, changedGametype);
    10085
    101         // Check, whether it's still Jump.
    10286        checkGametype();
    10387    }
    10488
    105     /**
    106     @brief
    107         Checks whether the gametype is Jump and if it is, sets its centerpoint.
    108     */
    10989    void JumpCenterpoint::checkGametype()
    11090    {
    111         if (this->getGametype() != NULL && this->getGametype()->isA(Class(Jump)))
     91        if (getGametype() != NULL && this->getGametype()->isA(Class(Jump)))
    11292        {
    11393            Jump* jumpGametype = orxonox_cast<Jump*>(this->getGametype().get());
  • code/branches/pickupsFS14/src/modules/jump/JumpCenterpoint.h

    r10074 r10111  
    2121 *
    2222 *   Author:
    23  *      Fabian 'x3n' Landau
     23 *      Fabien Vultier
    2424 *   Co-authors:
    2525 *      ...
    2626 *
    2727 */
    28 
    29 /**
    30     @file JumpCenterpoint.h
    31     @brief Declaration of the JumpCenterpoint class.
    32     @ingroup Jump
    33 */
    3428
    3529#ifndef _JumpCenterpoint_H__
     
    112106       
    113107        For a more elaborate example, have a look at the <code>jump.oxw</code> level file.
    114    
    115     @author
    116         Fabian 'x3n' Landau
    117        
    118     @ingroup Jump
     108
    119109    */
    120110    class _JumpExport JumpCenterpoint : public StaticEntity
     
    123113            JumpCenterpoint(Context* context); //!< Constructor. Registers and initializes the object and checks whether the gametype is actually Jump.
    124114            virtual ~JumpCenterpoint() {}
    125 
    126115            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); //!< Method to create a JumpCenterpoint through XML.
    127 
    128             virtual void changedGametype(); //!< Is called when the gametype has changed.
    129 
    130 
     116            virtual void changedGametype();
    131117            void setPlatformStaticTemplate(const std::string& balltemplate)
    132118                { this->platformStaticTemplate_ = balltemplate; }
    133 
    134119            const std::string& getPlatformStaticTemplate() const
    135120                { return this->platformStaticTemplate_; }
    136 
    137121            void setPlatformHMoveTemplate(const std::string& balltemplate)
    138122                { this->platformHMoveTemplate_ = balltemplate; }
    139 
    140123            const std::string& getPlatformHMoveTemplate() const
    141124                { return this->platformHMoveTemplate_; }
    142 
    143125            void setPlatformVMoveTemplate(const std::string& balltemplate)
    144126                { this->platformVMoveTemplate_ = balltemplate; }
    145 
    146127            const std::string& getPlatformVMoveTemplate() const
    147128                { return this->platformVMoveTemplate_; }
    148 
    149129            void setPlatformDisappearTemplate(const std::string& balltemplate)
    150130                { this->platformDisappearTemplate_ = balltemplate; }
    151 
    152131            const std::string& getPlatformDisappearTemplate() const
    153132                { return this->platformDisappearTemplate_; }
    154 
    155133            void setPlatformTimerTemplate(const std::string& balltemplate)
    156134                { this->platformTimerTemplate_ = balltemplate; }
    157 
    158135            const std::string& getPlatformTimerTemplate() const
    159136                { return this->platformTimerTemplate_; }
    160 
    161137            void setPlatformFakeTemplate(const std::string& balltemplate)
    162138                { this->platformFakeTemplate_ = balltemplate; }
    163 
    164139            const std::string& getPlatformFakeTemplate() const
    165140                { return this->platformFakeTemplate_; }
    166 
    167141            void setProjectileTemplate(const std::string& newTemplate)
    168142                { this->projectileTemplate_ = newTemplate; }
    169 
    170143            const std::string& getProjectileTemplate() const
    171144                { return this->projectileTemplate_; }
    172 
    173145            void setSpringTemplate(const std::string& newTemplate)
    174146                { this->springTemplate_ = newTemplate; }
    175 
    176147            const std::string& getSpringTemplate() const
    177148                { return this->springTemplate_; }
    178 
    179149            void setRocketTemplate(const std::string& newTemplate)
    180150                { this->rocketTemplate_ = newTemplate; }
    181 
    182151            const std::string& getRocketTemplate() const
    183152                { return this->rocketTemplate_; }
    184 
    185153            void setPropellerTemplate(const std::string& newTemplate)
    186154                { this->propellerTemplate_ = newTemplate; }
    187 
    188155            const std::string& getPropellerTemplate() const
    189156                { return this->propellerTemplate_; }
    190 
    191157            void setBootsTemplate(const std::string& newTemplate)
    192158                { this->bootsTemplate_ = newTemplate; }
    193 
    194159            const std::string& getBootsTemplate() const
    195160                { return this->bootsTemplate_; }
    196 
    197161            void setShieldTemplate(const std::string& newTemplate)
    198162                { this->shieldTemplate_ = newTemplate; }
    199 
    200163            const std::string& getShieldTemplate() const
    201164                { return this->shieldTemplate_; }
    202 
    203165            void setFigureTemplate(const std::string& newTemplate)
    204166                { this->figureTemplate_ = newTemplate; }
    205 
    206167            const std::string& getFigureTemplate() const
    207168                { return this->figureTemplate_; }
    208 
    209169            void setEnemy1Template(const std::string& newTemplate)
    210170                { this->enemy1Template_ = newTemplate; }
    211 
    212171            const std::string& getEnemy1Template() const
    213172                { return this->enemy1Template_; }
    214 
    215173            void setEnemy2Template(const std::string& newTemplate)
    216174                { this->enemy2Template_ = newTemplate; }
    217 
    218175            const std::string& getEnemy2Template() const
    219176                { return this->enemy2Template_; }
    220 
    221177            void setEnemy3Template(const std::string& newTemplate)
    222178                { this->enemy3Template_ = newTemplate; }
    223 
    224179            const std::string& getEnemy3Template() const
    225180                { return this->enemy3Template_; }
    226 
    227181            void setEnemy4Template(const std::string& newTemplate)
    228182                { this->enemy4Template_ = newTemplate; }
    229 
    230183            const std::string& getEnemy4Template() const
    231184                { return this->enemy4Template_; }
    232 
    233 
    234             /**
    235             @brief Set the dimensions of the playing field.
    236             @param dimension A vector with the width of the playing field as first component and the height as second.
    237             */
    238185            void setFieldDimension(const Vector2& dimension)
    239186                { this->width_ = dimension.x; this->height_ = dimension.y; }
    240             /**
    241             @brief Get the dimensions of the playing field.
    242             @return Returns a vector with the width of the playing field as first component and the height as second.
    243             */
    244187            Vector2 getFieldDimension() const
    245188                { return Vector2(this->width_, this->height_); }
    246 
    247             /**
    248             @brief Set the dimensions of the playing field.
    249             @param dimension A vector with the width of the playing field as first component and the height as second.
    250             */
    251189            void setSectionLength(const float sectionLength)
    252190                { this->sectionLength_ = sectionLength; }
    253             /**
    254             @brief Get the dimensions of the playing field.
    255             @return Returns a vector with the width of the playing field as first component and the height as second.
    256             */
    257191            float getSectionLength() const
    258192                { return sectionLength_; }
    259 
    260193            void setPlatformSpeed(const float platformSpeed)
    261194                { this->platformSpeed_ = platformSpeed; }
    262 
    263195            float getPlatformSpeed() const
    264196                { return platformSpeed_; }
    265 
    266197            void setCameraOffset(const float cameraOffset)
    267198                { this->cameraOffset_ = cameraOffset; }
    268 
    269199            float getCameraOffset() const
    270200                { return cameraOffset_; }
    271 
    272 
    273201        private:
    274             void checkGametype(); //!< Checks whether the gametype is Jump and if it is, sets its centerpoint.
    275 
    276             std::string platformStaticTemplate_; //!< The template for the ball.
    277             std::string platformHMoveTemplate_; //!< The template for the ball.
    278             std::string platformVMoveTemplate_; //!< The template for the ball.
    279             std::string platformDisappearTemplate_; //!< The template for the ball.
    280             std::string platformTimerTemplate_; //!< The template for the ball.
    281             std::string platformFakeTemplate_; //!< The template for the ball.
    282             std::string projectileTemplate_; //!< The template for the ball.
    283             std::string springTemplate_; //!< The template for the ball.
    284             std::string rocketTemplate_; //!< The template for the ball.
    285             std::string propellerTemplate_; //!< The template for the ball.
    286             std::string bootsTemplate_; //!< The template for the ball.
    287             std::string shieldTemplate_; //!< The template for the ball.
    288             std::string figureTemplate_; //!< The template for the bats.
    289             std::string enemy1Template_; //!< The template for the bats.
    290             std::string enemy2Template_; //!< The template for the bats.
    291             std::string enemy3Template_; //!< The template for the bats.
    292             std::string enemy4Template_; //!< The template for the bats.
    293 
    294             float width_; //!< The height of the playing field.
    295             float height_; //!< The width of the playing field.
    296             float sectionLength_; //!< Height of one section
    297             float platformSpeed_; //!< Height of one section
    298             float cameraOffset_; //!< Height of one section
     202            void checkGametype();
     203            std::string platformStaticTemplate_;
     204            std::string platformHMoveTemplate_;
     205            std::string platformVMoveTemplate_;
     206            std::string platformDisappearTemplate_;
     207            std::string platformTimerTemplate_;
     208            std::string platformFakeTemplate_;
     209            std::string projectileTemplate_;
     210            std::string springTemplate_;
     211            std::string rocketTemplate_;
     212            std::string propellerTemplate_;
     213            std::string bootsTemplate_;
     214            std::string shieldTemplate_;
     215            std::string figureTemplate_;
     216            std::string enemy1Template_;
     217            std::string enemy2Template_;
     218            std::string enemy3Template_;
     219            std::string enemy4Template_;
     220            float width_;
     221            float height_;
     222            float sectionLength_;
     223            float platformSpeed_;
     224            float cameraOffset_;
    299225    };
    300226}
  • code/branches/pickupsFS14/src/modules/jump/JumpEnemy.cc

    r10074 r10111  
    2121 *
    2222 *   Author:
    23  *      Fabian 'x3n' Landau
     23 *      Fabien Vultier
    2424 *   Co-authors:
    2525 *      ...
     
    2929/**
    3030    @file JumpEnemy.cc
    31     @brief Implementation of the JumpEnemy class.
     31    @brief All enemies in the minigame inherit from this class. This class manages the movement of all enemies and allows enemies to touch the figure to kill it.
    3232*/
    3333
  • code/branches/pickupsFS14/src/modules/jump/JumpEnemy.h

    r10074 r10111  
    2121 *
    2222 *   Author:
    23  *      Fabian 'x3n' Landau
     23 *      Fabien Vultier
    2424 *   Co-authors:
    2525 *      ...
     
    4545namespace orxonox
    4646{
    47 
    48     /**
    49     @brief
    50         This class manages the ball for @ref orxonox::Jump "Jump".
    51 
    52         It is responsible for both the movement of the ball in the x,z-plane as well as its interaction with the boundaries of the playing field (defined by the @ref orxonox::JumpCenterpoint "JumpCenterpoint") and the @ref orxonox::JumpFigure "JumpFigures". Or more precisely, it makes the ball bounce off then upper and lower delimiters of the playing field, it makes the ball bounce off the bats and also detects when a player scores and takes appropriate measures.
    53 
    54     @author
    55         Fabian 'x3n' Landau
    56 
    57     @ingroup Jump
    58     */
    5947    class _JumpExport JumpEnemy : public MovableEntity
    6048    {
     
    6250            JumpEnemy(Context* context);
    6351            virtual ~JumpEnemy();
    64 
    6552            virtual void tick(float dt);
    66 
    6753            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
    68 
    69             /**
    70             @brief Set the dimensions of the playing field.
    71             @param width The width of the playing field.
    72             @param height The height of the playing field.
    73             */
    7454            void setFieldDimension(float width, float height)
    7555                { this->fieldWidth_ = width; this->fieldHeight_ = height; }
    76             /**
    77             @brief Get the dimensions of the playing field.
    78             @param dimension A vector with the width as the first and height as the second component.
    79             */
    8056            void setFieldDimension(const Vector2& dimension)
    8157                { this->setFieldDimension(dimension.x, dimension.y); }
    82             /**
    83             @brief Get the dimensions of the playing field.
    84             @return Returns a vector with the width as the first and height as the second component.
    85             */
    8658            Vector2 getFieldDimension() const
    8759                { return Vector2(this->fieldWidth_, this->fieldHeight_); }
    88 
    8960            void setWidth(const float width)
    9061                { this->width_ = width; }
     
    9768
    9869            virtual void setProperties(float newLeftBoundary, float newRightBoundary, float newLowerBoundary, float newUpperBoundary, float newHSpeed, float newVSpeed);
    99 
    100             void setFigure(WeakPtr<JumpFigure> bats); //!< Set the bats for the ball.
     70            void setFigure(WeakPtr<JumpFigure> bats);
    10171            virtual void touchFigure();
    10272            bool dead_;
    10373        protected:
    104 
    10574            float width_;
    10675            float height_;
    107 
    108             float fieldWidth_; //!< The width of the playing field.
    109             float fieldHeight_; //!< The height of the playing field.
    110 
     76            float fieldWidth_;
     77            float fieldHeight_;
    11178            float leftBoundary_;
    11279            float rightBoundary_;
    11380            float lowerBoundary_;
    11481            float upperBoundary_;
    115 
    116             WeakPtr<JumpFigure> figure_; //!< An array with the two bats.
     82            WeakPtr<JumpFigure> figure_;
    11783    };
    11884}
  • code/branches/pickupsFS14/src/modules/jump/JumpFigure.cc

    r10074 r10111  
    2121 *
    2222 *   Author:
    23  *      Fabian 'x3n' Landau
     23 *      Fabien Vultier
    2424 *   Co-authors:
    2525 *      ...
     
    2929/**
    3030    @file JumpFigure.cc
    31     @brief Implementation of the JumpFigure class.
     31    @brief This class represents your figure when you play the minigame. Here the movement of the figure, activating items, ... are handled.
    3232*/
    3333
     
    4141    RegisterClass(JumpFigure);
    4242
    43     /**
    44     @brief
    45         Constructor. Registers and initializes the object.
    46     */
    4743    JumpFigure::JumpFigure(Context* context) : ControllableEntity(context)
    4844    {
    4945        RegisterObject(JumpFigure);
    5046
     47                // initialize variables
    5148        leftHand_ = NULL;
    5249        rightHand_ = NULL;
    53 
    5450        fieldHeight_ = 0;
    5551        fieldWidth_ = 0;
    56 
    5752        jumpSpeed_ = 0.0;
    5853        handSpeed_ = 0.0;
     
    6257        propellerPos_ = 0.0;
    6358        bootsPos_ = 0.0;
    64 
    65         moveUpPressed = false;
    66         moveDownPressed = false;
    67         moveLeftPressed = false;
    68         moveDownPressed = false;
    69         firePressed = false;
    70         fireSignal = false;
    71         timeSinceLastFire = 0.0;
    72 
    73         gravityAcceleration = 8.0;
     59        moveUpPressed_ = false;
     60        moveDownPressed_ = false;
     61        moveLeftPressed_ = false;
     62        moveDownPressed_ = false;
     63        firePressed_ = false;
     64        fireSignal_ = false;
     65        timeSinceLastFire_ = 0.0;
     66        gravityAcceleration_ = 8.0;
    7467        mouseFactor_ = 75.0;
    75         maxFireRate = 0.3;
    76 
     68        maxFireRate_ = 0.3;
    7769        handAngle_ = 0.0;
    7870        animateHands_ = false;
    7971        turnUp_ = false;
    80 
    8172        rocketActive_ = false;
    8273        propellerActive_ = false;
     
    8576        rocketSpeed_ = 0.0;
    8677        propellerSpeed_ = 0.0;
    87 
    8878        dead_ = false;
    8979    }
    9080
    91     /**
    92     @brief
    93         Method to create a JumpCenterpoint through XML.
    94     */
    9581    void JumpFigure::XMLPort(Element& xmlelement, XMLPort::Mode mode)
    9682    {
     
    11096    }
    11197
    112     /**
    113     @brief
    114         Is called each tick.
    115         Moves the bat.
    116     @param dt
    117         The time since last tick.
    118     */
    11998    void JumpFigure::tick(float dt)
    12099    {
    121100        SUPER(JumpFigure, tick, dt);
    122101
    123         // If the bat is controlled (but not over the network).
    124102        if (hasLocalController())
    125103        {
    126                 timeSinceLastFire += dt;
     104                timeSinceLastFire_ += dt;
    127105
    128106                // Move up/down
     
    138116                else
    139117                {
    140                         velocity.z -= gravityAcceleration;
     118                        velocity.z -= gravityAcceleration_;
    141119                }
    142120
     
    174152                if (dead_ == false)
    175153                {
    176                         velocity.x = -mouseFactor_*horizontalSpeed;
     154                        velocity.x = -mouseFactor_*horizontalSpeed_;
    177155                }
    178156                else
     
    182160
    183161                // Cheats
    184                 if (moveUpPressed == true)
    185                 {
    186                         velocity.z = 200.0f;
    187                         moveUpPressed = false;
     162                /*if (moveUpPressed_ == true)
     163                {
     164                        velocity.z = 400.0f;
     165                        moveUpPressed_ = false;
    188166                        dead_ = false;
    189167                }
    190                 if (moveDownPressed == true)
    191                 {
    192                         moveDownPressed = false;
    193                 }
     168                if (moveDownPressed_ == true)
     169                {
     170                        moveDownPressed_ = false;
     171                }*/
    194172
    195173                setVelocity(velocity);
    196174
    197175
    198                 if (firePressed && timeSinceLastFire >= maxFireRate)
    199                 {
    200                                 firePressed = false;
    201                                 timeSinceLastFire = 0.0;
    202                                 fireSignal = true;
    203                                 //orxout() << "fired signal set" << endl;
     176                if (firePressed_ && timeSinceLastFire_ >= maxFireRate_)
     177                {
     178                                firePressed_ = false;
     179                                timeSinceLastFire_ = 0.0;
     180                                fireSignal_ = true;
    204181                }
    205182        }
     
    218195
    219196        // Reset key variables
    220         moveUpPressed = false;
    221         moveDownPressed = false;
    222         moveLeftPressed = false;
    223         moveDownPressed = false;
    224         firePressed = false;
     197        moveUpPressed_ = false;
     198        moveDownPressed_ = false;
     199        moveLeftPressed_ = false;
     200        moveDownPressed_ = false;
     201        firePressed_ = false;
    225202    }
    226203
     
    365342    }
    366343
    367     /**
    368     @briefhandPosition_
    369         Overloaded the function to steer the bat up and down.
    370     @param value
    371         A vector whose first component is the inverse direction in which we want to steer the bat.
    372     */
    373344    void JumpFigure::moveFrontBack(const Vector2& value)
    374345    {
    375346        if (value.x > 0)
    376347        {
    377                 //orxout() << "up pressed" << endl;
    378                 moveUpPressed = true;
    379                 moveDownPressed = false;
     348                moveUpPressed_ = true;
     349                moveDownPressed_ = false;
    380350        }
    381351        else
    382352        {
    383                 //orxout() << "down pressed" << endl;
    384                 moveUpPressed = false;
    385                 moveDownPressed = true;
    386         }
    387     }
    388 
    389     /**
    390     @brief
    391         Overloaded the function to steer the bat up and down.
    392     @param value
    393         A vector whose first component is the direction in which we wnat to steer the bat.
    394     */
     353                moveUpPressed_ = false;
     354                moveDownPressed_ = true;
     355        }
     356    }
     357
    395358    void JumpFigure::moveRightLeft(const Vector2& value)
    396359    {
    397360        if (value.x > 0)
    398361        {
    399                 moveLeftPressed = false;
    400                 moveRightPressed = true;
     362                moveLeftPressed_ = false;
     363                moveRightPressed_ = true;
    401364        }
    402365        else
    403366        {
    404                 moveLeftPressed = true;
    405                 moveRightPressed = false;
     367                moveLeftPressed_ = true;
     368                moveRightPressed_ = false;
    406369        }
    407370    }
     
    409372    void JumpFigure::rotateYaw(const Vector2& value)
    410373    {
    411         horizontalSpeed = value.x;
     374        horizontalSpeed_ = value.x;
    412375    }
    413376
     
    426389    void JumpFigure::fire(unsigned int firemode)
    427390    {
    428         //SUPER(JumpFigure, fire, firemode);
     391
    429392    }
    430393
    431394    void JumpFigure::fired(unsigned int firemode)
    432395    {
    433         //SUPER(JumpFigure, fired, firemode);
    434         firePressed = true;
     396        firePressed_ = true;
    435397    }
    436398}
  • code/branches/pickupsFS14/src/modules/jump/JumpFigure.h

    r10074 r10111  
    2121 *
    2222 *   Author:
    23  *      Fabian 'x3n' Landau
     23 *      Fabien Vultier
    2424 *   Co-authors:
    2525 *      ...
    2626 *
    2727 */
    28 
    29 /**
    30     @file JumpFigure.h
    31     @brief Declaration of the JumpFigure class.
    32     @ingroup Jump
    33 */
    3428
    3529#ifndef _JumpFigure_H__
     
    4236namespace orxonox
    4337{
    44 
    45     /**
    46     @brief
    47         The JumpFigure class manages the bats for @ref orxonox::Jump "Jump", which are the elements controlled by the players.
    48 
    49         It is responsible for the movement (controlled by the players) of the bat.
    50 
    51     @author
    52         Fabian 'x3n' Landau
    53 
    54     @ingroup Jump
    55     */
    5638    class _JumpExport JumpFigure : public ControllableEntity
    5739    {
     
    5941            JumpFigure(Context* context); //!< Constructor. Registers and initializes the object.
    6042            virtual ~JumpFigure() {}
    61 
    6243            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
    63 
    6444            virtual void tick(float dt);
    65 
    6645            virtual void moveFrontBack(const Vector2& value); //!< Overloaded the function to steer the bat up and down.
    6746            virtual void moveRightLeft(const Vector2& value); //!< Overloaded the function to steer the bat up and down.
    68 
    6947            virtual void rotateYaw(const Vector2& value);
    7048            virtual void rotatePitch(const Vector2& value);
    7149            virtual void rotateRoll(const Vector2& value);
    72 
    7350            void fire(unsigned int firemode);
    7451            virtual void fired(unsigned int firemode);
    75 
    7652            virtual void JumpFromPlatform(JumpPlatform* platform);
    7753            virtual void JumpFromSpring(JumpSpring* spring);
     
    8561            virtual bool StartShield(JumpShield* shield);
    8662            virtual void StopShield(JumpShield* shield);
    87 
    8863            virtual void InitializeAnimation(Context* context);
    8964
    9065            void setFieldDimension(float width, float height)
    9166                { fieldWidth_ = width; fieldHeight_ = height; }
    92 
    9367            void setFieldDimension(const Vector2& dimension)
    9468                { setFieldDimension(dimension.x, dimension.y); }
    95 
    9669            Vector2 getFieldDimension() const
    9770                { return Vector2(fieldWidth_, fieldHeight_); }
    98 
    9971            void setMouseFactor(const float mouseFactor)
    10072                { mouseFactor_ = mouseFactor; }
    101 
    10273            const float getMouseFactor() const
    10374                { return mouseFactor_; }
    104 
    10575            void setModelLeftHand(const std::string& modelLeftHand)
    10676                { modelLeftHand_ = modelLeftHand; }
    107 
    10877            const std::string& getModelLeftHand() const
    10978                { return modelLeftHand_; }
    110 
    11179            void setModelRightHand(const std::string& modelRightHand)
    11280                { modelRightHand_ = modelRightHand; }
    113 
    11481            const std::string& getModelRightHand() const
    11582                { return modelRightHand_; }
    116 
    11783            void setRocketPos(const float rocketPos)
    11884                { rocketPos_ = rocketPos; }
    119 
    12085            const float getRocketPos() const
    12186                { return rocketPos_; }
    122 
    12387                        void setPropellerPos(const float propellerPos)
    12488                                { propellerPos_ = propellerPos; }
    125 
    12689                        const float getPropellerPos() const
    12790                                { return propellerPos_; }
    128 
    12991                        void setBootsPos(const float bootsPos)
    13092                                { bootsPos_ = bootsPos; }
    131 
    13293                        const float getBootsPos() const
    13394                                { return bootsPos_; }
    134 
    13595            void setJumpSpeed(const float jumpSpeed)
    13696                { jumpSpeed_ = jumpSpeed; }
    137 
    13897            const float getJumpSpeed() const
    13998                { return jumpSpeed_; }
    140 
    14199            void setRocketSpeed(const float rocketSpeed)
    142100                { rocketSpeed_ = rocketSpeed; }
    143 
    144101            const float getRocketSpeed() const
    145102                { return rocketSpeed_; }
    146 
    147103            void setPropellerSpeed(const float propellerSpeed)
    148104                { propellerSpeed_ = propellerSpeed; }
    149 
    150105            const float getPropellerSpeed() const
    151106                { return propellerSpeed_; }
    152 
    153107            void setHandMinAngle(const float handMinAngle)
    154108                { handMinAngle_ = handMinAngle; }
    155 
    156109            const float getHandMinAngle() const
    157110                { return handMinAngle_; }
    158 
    159111            void setHandMaxAngle(const float handMaxAngle)
    160112                { handMaxAngle_ = handMaxAngle; }
    161 
    162113            const float getHandMaxAngle() const
    163114                { return handMaxAngle_; }
    164 
    165115            void setHandSpeed(const float handSpeed)
    166116                { handSpeed_ = handSpeed; }
    167 
    168117            const float getHandSpeed() const
    169118                { return handSpeed_; }
    170119
    171             bool fireSignal;
     120            bool fireSignal_;
     121            bool rocketActive_;
     122            bool propellerActive_;
    172123            bool dead_;
    173 
    174124        private:
    175125            std::string modelLeftHand_;
    176126            std::string modelRightHand_;
    177 
    178127            Model* leftHand_;
    179128            Model* rightHand_;
    180 
    181129            float fieldWidth_;
    182130            float fieldHeight_;
    183             float timeSinceLastFire;
    184 
    185             bool moveUpPressed;
    186             bool moveDownPressed;
    187             bool moveLeftPressed;
    188             bool moveRightPressed;
    189             bool firePressed;
    190 
    191             float gravityAcceleration;
     131            float timeSinceLastFire_;
     132            bool moveUpPressed_;
     133            bool moveDownPressed_;
     134            bool moveLeftPressed_;
     135            bool moveRightPressed_;
     136            bool firePressed_;
     137            float gravityAcceleration_;
    192138            float mouseFactor_;
    193 
    194139            float jumpSpeed_;
    195140            float handSpeed_;
     
    199144            float propellerPos_;
    200145            float bootsPos_;
    201             float maxFireRate;
    202 
    203             float horizontalSpeed;
    204 
     146            float maxFireRate_;
     147            float horizontalSpeed_;
    205148            float handAngle_;
    206149            bool animateHands_;
    207150            bool turnUp_;
    208 
    209             bool rocketActive_;
    210             bool propellerActive_;
    211151            bool bootsActive_;
    212152            bool shieldActive_;
  • code/branches/pickupsFS14/src/modules/jump/JumpItem.cc

    r10074 r10111  
    2121 *
    2222 *   Author:
    23  *      Fabian 'x3n' Landau
     23 *      Fabien Vultier
    2424 *   Co-authors:
    2525 *      ...
     
    2929/**
    3030    @file JumpItem.cc
    31     @brief Implementation of the JumpItem class.
     31    @brief All items in this minigame inherit from this class. Items can move around like platforms and enemies.
    3232*/
    3333
     
    4848    RegisterClass(JumpItem);
    4949
    50     /**
    51     @brief
    52         Constructor. Registers and initializes the object.
    53     */
    5450    JumpItem::JumpItem(Context* context) : MovableEntity(context)
    5551    {
     
    6662    }
    6763
    68     /**
    69     @brief
    70         Destructor.
    71     */
    7264    JumpItem::~JumpItem()
    7365    {
     
    7567    }
    7668
    77     //xml port for loading sounds
    7869    void JumpItem::XMLPort(Element& xmlelement, XMLPort::Mode mode)
    7970    {
     
    8475    }
    8576
    86     /**
    87     @brief
    88         Is called every tick.
    89         Handles the movement of the ball and its interaction with the boundaries and bats.
    90     @param dt
    91         The time since the last tick.
    92     */
    9377    void JumpItem::tick(float dt)
    9478    {
     
    125109    }
    126110
    127     /**
    128     @brief
    129         Set the bats for the ball.
    130     @param bats
    131         An array (of size 2) of weak pointers, to be set as the new bats.
    132     */
    133111    void JumpItem::setFigure(WeakPtr<JumpFigure> newFigure)
    134112    {
  • code/branches/pickupsFS14/src/modules/jump/JumpItem.h

    r10074 r10111  
    2121 *
    2222 *   Author:
    23  *      Fabian 'x3n' Landau
     23 *      Fabien Vultier
    2424 *   Co-authors:
    2525 *      ...
     
    4545namespace orxonox
    4646{
    47 
    48     /**
    49     @brief
    50         This class manages the ball for @ref orxonox::Jump "Jump".
    51 
    52         It is responsible for both the movement of the ball in the x,z-plane as well as its interaction with the boundaries of the playing field (defined by the @ref orxonox::JumpCenterpoint "JumpCenterpoint") and the @ref orxonox::JumpFigure "JumpFigures". Or more precisely, it makes the ball bounce off then upper and lower delimiters of the playing field, it makes the ball bounce off the bats and also detects when a player scores and takes appropriate measures.
    53 
    54     @author
    55         Fabian 'x3n' Landau
    56 
    57     @ingroup Jump
    58     */
    5947    class _JumpExport JumpItem : public MovableEntity
    6048    {
     
    7462            Vector2 getFieldDimension() const
    7563                { return Vector2(this->fieldWidth_, this->fieldHeight_); }
    76 
    7764            void setWidth(const float width)
    7865                { this->width_ = width; }
     
    8976            float fieldWidth_; //!< The width of the playing field.
    9077            float fieldHeight_; //!< The height of the playing field.
    91 
    9278            WeakPtr<JumpFigure> figure_; //!< An array with the two bats.
    9379            float height_;
    9480            float width_;
    95 
    9681            float leftBoundary_;
    9782            float rightBoundary_;
  • code/branches/pickupsFS14/src/modules/jump/JumpPlatform.cc

    r10074 r10111  
    2121 *
    2222 *   Author:
    23  *      Fabian 'x3n' Landau
     23 *      Fabien Vultier
    2424 *   Co-authors:
    2525 *      ...
     
    2929/**
    3030    @file JumpPlatform.cc
    31     @brief Implementation of the JumpPlatform class.
     31    @brief All platforms in this minigame inherit from this class. The basic functions of a platform (interact with figure) is implemented here. Special functions are implemented in the specialized classes.
    3232*/
    3333
     
    4848    RegisterClass(JumpPlatform);
    4949
    50     const float JumpPlatform::MAX_REL_Z_VELOCITY = 1.5;
    51 
    52     /**
    53     @brief
    54         Constructor. Registers and initializes the object.
    55     */
    5650    JumpPlatform::JumpPlatform(Context* context) : MovableEntity(context)
    5751    {
  • code/branches/pickupsFS14/src/modules/jump/JumpPlatform.h

    r10074 r10111  
    2121 *
    2222 *   Author:
    23  *      Fabian 'x3n' Landau
     23 *      Fabien Vultier
    2424 *   Co-authors:
    2525 *      ...
     
    3737
    3838#include "jump/JumpPrereqs.h"
    39 
    4039#include "util/Math.h"
    41 
    4240#include "worldentities/MovableEntity.h"
    43 
    4441
    4542namespace orxonox
    4643{
    47 
    48     /**
    49     @brief
    50         This class manages the ball for @ref orxonox::Jump "Jump".
    51 
    52         It is responsible for both the movement of the ball in the x,z-plane as well as its interaction with the boundaries of the playing field (defined by the @ref orxonox::JumpCenterpoint "JumpCenterpoint") and the @ref orxonox::JumpFigure "JumpFigures". Or more precisely, it makes the ball bounce off then upper and lower delimiters of the playing field, it makes the ball bounce off the bats and also detects when a player scores and takes appropriate measures.
    53 
    54     @author
    55         Fabian 'x3n' Landau
    56 
    57     @ingroup Jump
    58     */
    5944    class _JumpExport JumpPlatform : public MovableEntity
    6045    {
     
    6651            void setFigure(WeakPtr<JumpFigure> bats); //!< Set the bats for the ball.
    6752            virtual void touchFigure();
    68 
    69             static const float MAX_REL_Z_VELOCITY;
    7053
    7154            void setDefScoreSound(const std::string& engineSound);
  • code/branches/pickupsFS14/src/modules/jump/JumpPlatformDisappear.cc

    r10074 r10111  
    2121 *
    2222 *   Author:
    23  *      Fabian 'x3n' Landau
     23 *      Fabien Vultier
    2424 *   Co-authors:
    2525 *      ...
     
    2929/**
    3030    @file JumpPlatformDisappear.cc
    31     @brief Implementation of the JumpPlatform class.
     31    @brief This platform disappears after contact with the figure.
    3232*/
    3333
     
    4848    RegisterClass(JumpPlatformDisappear);
    4949
    50     /**
    51     @brief
    52         Constructor. Registers and initializes the object.
    53     */
    5450    JumpPlatformDisappear::JumpPlatformDisappear(Context* context) : JumpPlatform(context)
    5551    {
     
    5955    }
    6056
    61     /**
    62     @brief
    63         Destructor.
    64     */
    6557    JumpPlatformDisappear::~JumpPlatformDisappear()
    6658    {
     
    6860    }
    6961
    70 
    71     //xml port for loading sounds
    7262    void JumpPlatformDisappear::XMLPort(Element& xmlelement, XMLPort::Mode mode)
    7363    {
     
    7565    }
    7666
    77     /**
    78     @brief
    79         Is called every tick.
    80         Handles the movement of the ball and its interaction with the boundaries and bats.
    81     @param dt
    82         The time since the last tick.
    83     */
    8467    void JumpPlatformDisappear::tick(float dt)
    8568    {
  • code/branches/pickupsFS14/src/modules/jump/JumpPlatformDisappear.h

    r10050 r10111  
    2121 *
    2222 *   Author:
    23  *      Fabian 'x3n' Landau
     23 *      Fabien Vultier
    2424 *   Co-authors:
    2525 *      ...
     
    3737
    3838#include "jump/JumpPrereqs.h"
    39 
    4039#include "util/Math.h"
    41 
    4240#include "worldentities/MovableEntity.h"
    43 
    4441
    4542namespace orxonox
    4643{
    47 
    48     /**
    49     @brief
    50         This class manages the ball for @ref orxonox::Jump "Jump".
    51 
    52         It is responsible for both the movement of the ball in the x,z-plane as well as its interaction with the boundaries of the playing field (defined by the @ref orxonox::JumpCenterpoint "JumpCenterpoint") and the @ref orxonox::JumpFigure "JumpFigures". Or more precisely, it makes the ball bounce off then upper and lower delimiters of the playing field, it makes the ball bounce off the bats and also detects when a player scores and takes appropriate measures.
    53 
    54     @author
    55         Fabian 'x3n' Landau
    56 
    57     @ingroup Jump
    58     */
    5944    class _JumpExport JumpPlatformDisappear : public JumpPlatform
    6045    {
     
    6247            JumpPlatformDisappear(Context* context);
    6348            virtual ~JumpPlatformDisappear();
    64 
    6549            virtual void tick(float dt);
    66 
    6750            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
    68 
    6951            virtual void setProperties(bool active);
    7052            virtual bool isActive();
    7153            virtual void touchFigure();
    72 
    7354
    7455        protected:
  • code/branches/pickupsFS14/src/modules/jump/JumpPlatformFake.cc

    r10074 r10111  
    2121 *
    2222 *   Author:
    23  *      Fabian 'x3n' Landau
     23 *      Fabien Vultier
    2424 *   Co-authors:
    2525 *      ...
     
    2929/**
    3030    @file JumpPlatformFake.cc
    31     @brief Implementation of the JumpPlatform class.
     31    @brief This platform has a hole in it. You cannot jump from this platform. It has no touchFigure function.
    3232*/
    3333
    3434#include "JumpPlatformFake.h"
    35 
    3635#include "core/CoreIncludes.h"
    3736#include "core/GameMode.h"
    38 
    3937#include "gametypes/Gametype.h"
    40 
    4138#include "JumpFigure.h"
    42 
    4339#include "sound/WorldSound.h"
    4440#include "core/XMLPort.h"
     
    4844    RegisterClass(JumpPlatformFake);
    4945
    50     /**
    51     @brief
    52         Constructor. Registers and initializes the object.
    53     */
    5446    JumpPlatformFake::JumpPlatformFake(Context* context) : JumpPlatform(context)
    5547    {
     
    5749    }
    5850
    59     /**
    60     @brief
    61         Destructor.
    62     */
    6351    JumpPlatformFake::~JumpPlatformFake()
    6452    {
     
    6654    }
    6755
    68     //xml port for loading sounds
    6956    void JumpPlatformFake::XMLPort(Element& xmlelement, XMLPort::Mode mode)
    7057    {
     
    7259    }
    7360
    74     /**
    75     @brief
    76         Is called every tick.
    77         Handles the movement of the ball and its interaction with the boundaries and bats.
    78     @param dt
    79         The time since the last tick.
    80     */
    8161    void JumpPlatformFake::tick(float dt)
    8262    {
  • code/branches/pickupsFS14/src/modules/jump/JumpPlatformFake.h

    r10050 r10111  
    2121 *
    2222 *   Author:
    23  *      Fabian 'x3n' Landau
     23 *      Fabien Vultier
    2424 *   Co-authors:
    2525 *      ...
     
    4545namespace orxonox
    4646{
    47 
    48     /**
    49     @brief
    50         This class manages the ball for @ref orxonox::Jump "Jump".
    51 
    52         It is responsible for both the movement of the ball in the x,z-plane as well as its interaction with the boundaries of the playing field (defined by the @ref orxonox::JumpCenterpoint "JumpCenterpoint") and the @ref orxonox::JumpFigure "JumpFigures". Or more precisely, it makes the ball bounce off then upper and lower delimiters of the playing field, it makes the ball bounce off the bats and also detects when a player scores and takes appropriate measures.
    53 
    54     @author
    55         Fabian 'x3n' Landau
    56 
    57     @ingroup Jump
    58     */
    5947    class _JumpExport JumpPlatformFake : public JumpPlatform
    6048    {
     
    6250            JumpPlatformFake(Context* context);
    6351            virtual ~JumpPlatformFake();
    64 
    6552            virtual void tick(float dt);
    6653            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
  • code/branches/pickupsFS14/src/modules/jump/JumpPlatformHMove.cc

    r10074 r10111  
    2121 *
    2222 *   Author:
    23  *      Fabian 'x3n' Landau
     23 *      Fabien Vultier
    2424 *   Co-authors:
    2525 *      ...
     
    2929/**
    3030    @file JumpPlatformHMove.cc
    31     @brief Implementation of the JumpPlatform class.
     31    @brief This platform can move horizontally.
    3232*/
    3333
    3434#include "JumpPlatformHMove.h"
    35 
    3635#include "core/CoreIncludes.h"
    3736#include "core/GameMode.h"
    38 
    3937#include "gametypes/Gametype.h"
    40 
    4138#include "JumpFigure.h"
    42 
    4339#include "sound/WorldSound.h"
    4440#include "core/XMLPort.h"
    45 
    46 #include "graphics/Backlight.h"
    4741
    4842namespace orxonox
     
    5044    RegisterClass(JumpPlatformHMove);
    5145
    52     /**
    53     @brief
    54         Constructor. Registers and initializes the object.
    55     */
    5646    JumpPlatformHMove::JumpPlatformHMove(Context* context) : JumpPlatform(context)
    5747    {
     
    6151    }
    6252
    63     /**
    64     @brief
    65         Destructor.
    66     */
    6753    JumpPlatformHMove::~JumpPlatformHMove()
    6854    {
     
    7056    }
    7157
    72     //xml port for loading sounds
    7358    void JumpPlatformHMove::XMLPort(Element& xmlelement, XMLPort::Mode mode)
    7459    {
     
    7661    }
    7762
    78     /**
    79     @brief
    80         Is called every tick.
    81         Handles the movement of the ball and its interaction with the boundaries and bats.
    82     @param dt
    83         The time since the last tick.
    84     */
    8563    void JumpPlatformHMove::tick(float dt)
    8664    {
     
    8866
    8967        // Get the current position, velocity and acceleration of the ball.
    90         Vector3 position = this->getPosition();
    91         Vector3 velocity = this->getVelocity();
     68        Vector3 position = getPosition();
     69        Vector3 velocity = getVelocity();
    9270
    9371        if ((position.x < leftBoundary_ && velocity.x < 0) || (position.x > rightBoundary_ && velocity.x > 0))
    9472
    9573        {
    96                 //orxout() << "refelected platformHMove at " << position.x << endl;
    9774                velocity.x = -velocity.x;
    9875        }
    9976
    10077        // Set the position, velocity and acceleration of the ball, if they have changed.
    101         if (velocity != this->getVelocity())
    102             this->setVelocity(velocity);
     78        if (velocity != getVelocity())
     79        {
     80            setVelocity(velocity);
     81        }
    10382        if (position != this->getPosition())
    104             this->setPosition(position);
     83        {
     84            setPosition(position);
     85        }
    10586    }
    10687
     
    10990        leftBoundary_ = leftBoundary;
    11091        rightBoundary_ = rightBoundary;
    111 
    112         this->setVelocity(Vector3(speed,0,0));
    113 
     92        setVelocity(Vector3(speed,0,0));
    11493    }
    11594
  • code/branches/pickupsFS14/src/modules/jump/JumpPlatformHMove.h

    r10050 r10111  
    2121 *
    2222 *   Author:
    23  *      Fabian 'x3n' Landau
     23 *      Fabien Vultier
    2424 *   Co-authors:
    2525 *      ...
    2626 *
    2727 */
    28 
    29 /**
    30     @file JumpPlatformHMove.h
    31     @brief Declaration of the JumpPlatform class.
    32     @ingroup Jump
    33 */
    3428
    3529#ifndef _JumpPlatformHMove_H__
     
    4640{
    4741
    48     /**
    49     @brief
    50         This class manages the ball for @ref orxonox::Jump "Jump".
    51 
    52         It is responsible for both the movement of the ball in the x,z-plane as well as its interaction with the boundaries of the playing field (defined by the @ref orxonox::JumpCenterpoint "JumpCenterpoint") and the @ref orxonox::JumpFigure "JumpFigures". Or more precisely, it makes the ball bounce off then upper and lower delimiters of the playing field, it makes the ball bounce off the bats and also detects when a player scores and takes appropriate measures.
    53 
    54     @author
    55         Fabian 'x3n' Landau
    56 
    57     @ingroup Jump
    58     */
    5942    class _JumpExport JumpPlatformHMove : public JumpPlatform
    6043    {
     
    6245            JumpPlatformHMove(Context* context);
    6346            virtual ~JumpPlatformHMove();
    64 
    6547            virtual void tick(float dt);
    6648            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
    67 
    6849            virtual void setProperties(float leftBoundary, float rightBoundary, float speed);
    6950            virtual void touchFigure();
  • code/branches/pickupsFS14/src/modules/jump/JumpPlatformStatic.cc

    r10074 r10111  
    2121 *
    2222 *   Author:
    23  *      Fabian 'x3n' Landau
     23 *      Fabien Vultier
    2424 *   Co-authors:
    2525 *      ...
     
    2929/**
    3030    @file JumpPlatformStatic.cc
    31     @brief Implementation of the JumpPlatformStatic class.
     31    @brief This is the most simple platform in this minigame.
    3232*/
    3333
    3434#include "JumpPlatformStatic.h"
    35 
    3635#include "core/CoreIncludes.h"
    3736#include "core/GameMode.h"
    38 
    3937#include "gametypes/Gametype.h"
    40 
    4138#include "JumpFigure.h"
    42 
    4339#include "sound/WorldSound.h"
    4440#include "core/XMLPort.h"
     
    4844    RegisterClass(JumpPlatformStatic);
    4945
    50     /**
    51     @brief
    52         Constructor. Registers and initializes the object.
    53     */
    5446    JumpPlatformStatic::JumpPlatformStatic(Context* context) : JumpPlatform(context)
    5547    {
     
    5850    }
    5951
    60     /**
    61     @brief
    62         Destructor.
    63     */
    6452    JumpPlatformStatic::~JumpPlatformStatic()
    6553    {
     
    7361    }
    7462
    75     /**
    76     @brief
    77         Is called every tick.
    78         Handles the movement of the ball and its interaction with the boundaries and bats.
    79     @param dt
    80         The time since the last tick.
    81     */
    8263    void JumpPlatformStatic::tick(float dt)
    8364    {
  • code/branches/pickupsFS14/src/modules/jump/JumpPlatformStatic.h

    r10050 r10111  
    2121 *
    2222 *   Author:
    23  *      Fabian 'x3n' Landau
     23 *      Fabien Vultier
    2424 *   Co-authors:
    2525 *      ...
    2626 *
    2727 */
    28 
    29 /**
    30     @file JumpPlatformStatic.h
    31     @brief Declaration of the JumpPlatformStatic class.
    32     @ingroup Jump
    33 */
    3428
    3529#ifndef _JumpPlatformStatic_H__
     
    4539namespace orxonox
    4640{
    47 
    48     /**
    49     @brief
    50         This class manages the ball for @ref orxonox::Jump "Jump".
    51 
    52         It is responsible for both the movement of the ball in the x,z-plane as well as its interaction with the boundaries of the playing field (defined by the @ref orxonox::JumpCenterpoint "JumpCenterpoint") and the @ref orxonox::JumpFigure "JumpFigures". Or more precisely, it makes the ball bounce off then upper and lower delimiters of the playing field, it makes the ball bounce off the bats and also detects when a player scores and takes appropriate measures.
    53 
    54     @author
    55         Fabian 'x3n' Landau
    56 
    57     @ingroup Jump
    58     */
    5941    class _JumpExport JumpPlatformStatic : public JumpPlatform
    6042    {
  • code/branches/pickupsFS14/src/modules/jump/JumpPlatformTimer.cc

    r10074 r10111  
    2121 *
    2222 *   Author:
    23  *      Fabian 'x3n' Landau
     23 *      Fabien Vultier
    2424 *   Co-authors:
    2525 *      ...
     
    2929/**
    3030    @file JumpPlatformTimer.cc
    31     @brief Implementation of the JumpPlatform class.
     31    @brief This platform will explode if you wait for too long time.
    3232*/
    3333
    3434#include "JumpPlatformTimer.h"
    35 
    3635#include "core/CoreIncludes.h"
    3736#include "core/GameMode.h"
    38 
    3937#include "gametypes/Gametype.h"
    40 
    4138#include "JumpFigure.h"
    42 
    4339#include "sound/WorldSound.h"
    4440#include "core/XMLPort.h"
     
    4844    RegisterClass(JumpPlatformTimer);
    4945
    50     /**
    51     @brief
    52         Constructor. Registers and initializes the object.
    53     */
    5446    JumpPlatformTimer::JumpPlatformTimer(Context* context) : JumpPlatform(context)
    5547    {
    5648        RegisterObject(JumpPlatformTimer);
    5749
    58         particleSpawner = NULL;
     50        particleSpawner_ = NULL;
    5951
    6052        setProperties(3.0);
     
    6254    }
    6355
    64     /**
    65     @brief
    66         Destructor.
    67     */
    6856    JumpPlatformTimer::~JumpPlatformTimer()
    6957    {
     
    7159    }
    7260
    73     //xml port for loading sounds
    7461    void JumpPlatformTimer::XMLPort(Element& xmlelement, XMLPort::Mode mode)
    7562    {
     
    8067    }
    8168
    82     /**
    83     @brief
    84         Is called every tick.
    85         Handles the movement of the ball and its interaction with the boundaries and bats.
    86     @param dt
    87         The time since the last tick.
    88     */
    8969    void JumpPlatformTimer::tick(float dt)
    9070    {
     
    9272
    9373        time_ -= dt;
    94         if (time_ < effectStartTime_ && particleSpawner == NULL)
     74        if (time_ < effectStartTime_ && particleSpawner_ == NULL)
    9575        {
    9676
    97                 particleSpawner = new ParticleSpawner(getContext());
    98                 particleSpawner->setSource(effectPath_);
    99             particleSpawner->setLoop(false);
    100             particleSpawner->setLOD(LODParticle::Low);
    101             particleSpawner->setLifetime(effectStartTime_);
     77                particleSpawner_ = new ParticleSpawner(getContext());
     78                particleSpawner_->setSource(effectPath_);
     79            particleSpawner_->setLoop(false);
     80            particleSpawner_->setLOD(LODParticle::Low);
     81            particleSpawner_->setLifetime(effectStartTime_);
    10282
    103             attach(particleSpawner);
     83            attach(particleSpawner_);
    10484        }
    10585    }
  • code/branches/pickupsFS14/src/modules/jump/JumpPlatformTimer.h

    r10050 r10111  
    2121 *
    2222 *   Author:
    23  *      Fabian 'x3n' Landau
     23 *      Fabien Vultier
    2424 *   Co-authors:
    2525 *      ...
     
    4646namespace orxonox
    4747{
    48 
    49     /**
    50     @brief
    51         This class manages the ball for @ref orxonox::Jump "Jump".
    52 
    53         It is responsible for both the movement of the ball in the x,z-plane as well as its interaction with the boundaries of the playing field (defined by the @ref orxonox::JumpCenterpoint "JumpCenterpoint") and the @ref orxonox::JumpFigure "JumpFigures". Or more precisely, it makes the ball bounce off then upper and lower delimiters of the playing field, it makes the ball bounce off the bats and also detects when a player scores and takes appropriate measures.
    54 
    55     @author
    56         Fabian 'x3n' Landau
    57 
    58     @ingroup Jump
    59     */
    6048    class _JumpExport JumpPlatformTimer : public JumpPlatform
    6149    {
     
    6351            JumpPlatformTimer(Context* context);
    6452            virtual ~JumpPlatformTimer();
    65 
    6653            virtual void tick(float dt);
    6754            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
    68 
    6955            virtual void setProperties(float time);
    7056            virtual bool isActive(void);
     
    8571        protected:
    8672            float time_;
    87             ParticleSpawner* particleSpawner;
     73            ParticleSpawner* particleSpawner_;
    8874            std::string effectPath_;
    8975            float effectStartTime_;
  • code/branches/pickupsFS14/src/modules/jump/JumpPlatformVMove.cc

    r10074 r10111  
    2121 *
    2222 *   Author:
    23  *      Fabian 'x3n' Landau
     23 *      Fabien Vultier
    2424 *   Co-authors:
    2525 *      ...
     
    2929/**
    3030    @file JumpPlatformVMove.cc
    31     @brief Implementation of the JumpPlatform class.
     31    @brief This platform can move vertically.
    3232*/
    3333
    3434#include "JumpPlatformVMove.h"
    35 
    3635#include "core/CoreIncludes.h"
    3736#include "core/GameMode.h"
    38 
    3937#include "gametypes/Gametype.h"
    40 
    4138#include "JumpFigure.h"
    42 
    4339#include "sound/WorldSound.h"
    4440#include "core/XMLPort.h"
     
    4844    RegisterClass(JumpPlatformVMove);
    4945
    50     /**
    51     @brief
    52         Constructor. Registers and initializes the object.
    53     */
    5446    JumpPlatformVMove::JumpPlatformVMove(Context* context) : JumpPlatform(context)
    5547    {
     
    5951    }
    6052
    61     /**
    62     @brief
    63         Destructor.
    64     */
    6553    JumpPlatformVMove::~JumpPlatformVMove()
    6654    {
     
    6856    }
    6957
    70     //xml port for loading sounds
    7158    void JumpPlatformVMove::XMLPort(Element& xmlelement, XMLPort::Mode mode)
    7259    {
     
    7461    }
    7562
    76     /**
    77     @brief
    78         Is called every tick.
    79         Handles the movement of the ball and its interaction with the boundaries and bats.
    80     @param dt
    81         The time since the last tick.
    82     */
    8363    void JumpPlatformVMove::tick(float dt)
    8464    {
     
    8666
    8767        // Get the current position, velocity and acceleration of the ball.
    88         Vector3 position = this->getPosition();
    89         Vector3 velocity = this->getVelocity();
     68        Vector3 position = getPosition();
     69        Vector3 velocity = getVelocity();
    9070
    9171        if ((position.z < lowerBoundary_ && velocity.z < 0) || (position.z > upperBoundary_ && velocity.z > 0))
    9272        {
    93                 //orxout() << "refelected platformVMove at " << position.z << endl;
    9473                velocity.z = -velocity.z;
    9574        }
    9675
    9776        // Set the position, velocity and acceleration of the ball, if they have changed.
    98         if (velocity != this->getVelocity())
    99             this->setVelocity(velocity);
    100         if (position != this->getPosition())
    101             this->setPosition(position);
     77        if (velocity != getVelocity())
     78        {
     79            setVelocity(velocity);
     80        }
     81        if (position != getPosition())
     82        {
     83            setPosition(position);
     84        }
    10285    }
    10386
     
    10790        upperBoundary_ = upperBoundary;
    10891
    109         this->setVelocity(Vector3(0,0,speed));
     92        setVelocity(Vector3(0,0,speed));
    11093
    11194    }
  • code/branches/pickupsFS14/src/modules/jump/JumpPlatformVMove.h

    r10050 r10111  
    2121 *
    2222 *   Author:
    23  *      Fabian 'x3n' Landau
     23 *      Fabien Vultier
    2424 *   Co-authors:
    2525 *      ...
     
    2727 */
    2828
    29 /**
    30     @file JumpPlatformVMove.h
    31     @brief Declaration of the JumpPlatform class.
    32     @ingroup Jump
    33 */
    34 
    3529#ifndef _JumpPlatformVMove_H__
    3630#define _JumpPlatformVMove_H__
    3731
    3832#include "jump/JumpPrereqs.h"
    39 
    4033#include "util/Math.h"
    41 
    4234#include "worldentities/MovableEntity.h"
    43 
    4435
    4536namespace orxonox
    4637{
    47 
    48     /**
    49     @brief
    50         This class manages the ball for @ref orxonox::Jump "Jump".
    51 
    52         It is responsible for both the movement of the ball in the x,z-plane as well as its interaction with the boundaries of the playing field (defined by the @ref orxonox::JumpCenterpoint "JumpCenterpoint") and the @ref orxonox::JumpFigure "JumpFigures". Or more precisely, it makes the ball bounce off then upper and lower delimiters of the playing field, it makes the ball bounce off the bats and also detects when a player scores and takes appropriate measures.
    53 
    54     @author
    55         Fabian 'x3n' Landau
    56 
    57     @ingroup Jump
    58     */
    5938    class _JumpExport JumpPlatformVMove : public JumpPlatform
    6039    {
     
    6241            JumpPlatformVMove(Context* context);
    6342            virtual ~JumpPlatformVMove();
    64 
    6543            virtual void tick(float dt);
    6644            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
    67 
    6845            virtual void setProperties(float leftBoundary, float rightBoundary, float speed);
    6946            virtual void touchFigure();
  • code/branches/pickupsFS14/src/modules/jump/JumpPrereqs.h

    r10074 r10111  
    2121 *
    2222 *   Author:
    23  *      Reto Grieder
     23 *      Fabien Vultier
    2424 *   Co-authors:
    2525 *      ...
  • code/branches/pickupsFS14/src/modules/jump/JumpProjectile.cc

    r10074 r10111  
    2121 *
    2222 *   Author:
    23  *      Fabian 'x3n' Landau
     23 *      Fabien Vultier
    2424 *   Co-authors:
    2525 *      ...
     
    2929/**
    3030    @file JumpProjectile.cc
    31     @brief Implementation of the JumpProjectile class.
     31    @brief projectiles are created by the gametype if the figure shoots. All projectiles check every tick, whether they hit an enemy.
    3232*/
    3333
    3434#include "JumpProjectile.h"
    35 
    3635#include "core/CoreIncludes.h"
    3736#include "core/GameMode.h"
    3837#include "graphics/Model.h"
    3938#include "gametypes/Gametype.h"
    40 
    4139#include "JumpFigure.h"
    42 
    4340#include "sound/WorldSound.h"
    4441#include "core/XMLPort.h"
     
    4845    RegisterClass(JumpProjectile);
    4946
    50     /**
    51     @brief
    52         Constructor. Registers and initializes the object.
    53     */
    5447    JumpProjectile::JumpProjectile(Context* context) : MovableEntity(context)
    5548    {
     
    5750
    5851        figure_ = 0;
    59 
    60         registerVariables();
    61 
    6252        setPosition(Vector3(0,0,0));
    6353        setVelocity(Vector3(0,0,250.0));
     
    6555    }
    6656
    67     /**
    68     @brief
    69         Destructor.
    70     */
    7157    JumpProjectile::~JumpProjectile()
    7258    {
    73         /*if (this->isInitialized())
    74         {
    75             if (this->bDeleteBats_)
    76                 delete this->figure_;
    7759
    78             delete[] this->batID_;
    79         }*/
    8060    }
    8161
    82     //xml port for loading sounds
    8362    void JumpProjectile::XMLPort(Element& xmlelement, XMLPort::Mode mode)
    8463    {
     
    8665    }
    8766
    88     /**
    89     @brief
    90         Register variables to synchronize over the network.
    91     */
    92     void JumpProjectile::registerVariables()
    93     {
    94         registerVariable( this->fieldWidth_ );
    95         registerVariable( this->fieldHeight_ );
    96         //registerVariable( this->batID_[1], VariableDirection::ToClient, new NetworkCallback<JumpProjectile>( this, &JumpProjectile::applyBats) );
    97     }
    98 
    99     /**
    100     @brief
    101         Is called every tick.
    102         Handles the movement of the ball and its interaction with the boundaries and bats.
    103     @param dt
    104         The time since the last tick.
    105     */
    10667    void JumpProjectile::tick(float dt)
    10768    {
     
    12384    }
    12485
    125     /**
    126     @brief
    127         Set the bats for the ball.
    128     @param bats
    129         An array (of size 2) of weak pointers, to be set as the new bats.
    130     */
    13186    void JumpProjectile::setFigure(WeakPtr<JumpFigure> figure)
    13287    {
  • code/branches/pickupsFS14/src/modules/jump/JumpProjectile.h

    r10074 r10111  
    2121 *
    2222 *   Author:
    23  *      Fabian 'x3n' Landau
     23 *      Fabien Vultier
    2424 *   Co-authors:
    2525 *      ...
     
    2727 */
    2828
    29 /**
    30     @file JumpProjectile.h
    31     @brief Declaration of the JumpProjectile class.
    32     @ingroup Jump
    33 */
    34 
    3529#ifndef _JumpProjectile_H__
    3630#define _JumpProjectile_H__
    3731
    3832#include "jump/JumpPrereqs.h"
    39 
    4033#include "util/Math.h"
    41 
    4234#include "worldentities/MovableEntity.h"
    4335
     
    4537namespace orxonox
    4638{
    47 
    48     /**
    49     @brief
    50         This class manages the ball for @ref orxonox::Jump "Jump".
    51 
    52         It is responsible for both the movement of the ball in the x,z-plane as well as its interaction with the boundaries of the playing field (defined by the @ref orxonox::JumpCenterpoint "JumpCenterpoint") and the @ref orxonox::JumpFigure "JumpFigures". Or more precisely, it makes the ball bounce off then upper and lower delimiters of the playing field, it makes the ball bounce off the bats and also detects when a player scores and takes appropriate measures.
    53 
    54     @author
    55         Fabian 'x3n' Landau
    56 
    57     @ingroup Jump
    58     */
    5939    class _JumpExport JumpProjectile : public MovableEntity
    6040    {
     
    7656                { return Vector2(this->fieldWidth_, this->fieldHeight_); }
    7757
    78 
    7958            void setFigure(WeakPtr<JumpFigure> figure);
    8059
    8160        protected:
    82             void registerVariables();
    83 
    84             float fieldWidth_; //!< The width of the playing field.
    85             float fieldHeight_; //!< The height of the playing field.
    86             WeakPtr<JumpFigure> figure_; //!< An array with the two bats.
     61            float fieldWidth_;
     62            float fieldHeight_;
     63            WeakPtr<JumpFigure> figure_;
    8764    };
    8865}
  • code/branches/pickupsFS14/src/modules/jump/JumpPropeller.cc

    r10074 r10111  
    2121 *
    2222 *   Author:
    23  *      Fabian 'x3n' Landau
     23 *      Fabien Vultier
    2424 *   Co-authors:
    2525 *      ...
     
    2929/**
    3030    @file JumpPropeller.cc
    31     @brief Implementation of the JumpPropeller class.
     31    @brief If this propeller is created, attachedToFigure_ is set to false. When the figure picks it up, the variable is set to true and the figure starts flying until the fuel is reduced to zero.
    3232*/
    3333
     
    4848    RegisterClass(JumpPropeller);
    4949
    50     /**
    51     @brief
    52         Constructor. Registers and initializes the object.
    53     */
    5450    JumpPropeller::JumpPropeller(Context* context) : JumpItem(context)
    5551    {
     
    5753
    5854        fuel_ = 3.0;
     55        attachedToFigure_ = false;
    5956
    6057        setPosition(Vector3(0,0,0));
     
    6461    }
    6562
    66     /**
    67     @brief
    68         Destructor.
    69     */
    7063    JumpPropeller::~JumpPropeller()
    7164    {
     
    7366    }
    7467
    75     //xml port for loading sounds
    7668    void JumpPropeller::XMLPort(Element& xmlelement, XMLPort::Mode mode)
    7769    {
     
    7971    }
    8072
    81     /**
    82     @brief
    83         Is called every tick.
    84         Handles the movement of the ball and its interaction with the boundaries and bats.
    85     @param dt
    86         The time since the last tick.
    87     */
    8873    void JumpPropeller::tick(float dt)
    8974    {
  • code/branches/pickupsFS14/src/modules/jump/JumpPropeller.h

    r10074 r10111  
    2121 *
    2222 *   Author:
    23  *      Fabian 'x3n' Landau
     23 *      Fabien Vultier
    2424 *   Co-authors:
    2525 *      ...
    2626 *
    2727 */
    28 
    29 /**
    30     @file JumpPropeller.h
    31     @brief Declaration of the JumpPropeller class.
    32     @ingroup Jump
    33 */
    3428
    3529#ifndef _JumpPropeller_H__
     
    4539namespace orxonox
    4640{
    47 
    48     /**
    49     @brief
    50         This class manages the ball for @ref orxonox::Jump "Jump".
    51 
    52         It is responsible for both the movement of the ball in the x,z-plane as well as its interaction with the boundaries of the playing field (defined by the @ref orxonox::JumpCenterpoint "JumpCenterpoint") and the @ref orxonox::JumpFigure "JumpFigures". Or more precisely, it makes the ball bounce off then upper and lower delimiters of the playing field, it makes the ball bounce off the bats and also detects when a player scores and takes appropriate measures.
    53 
    54     @author
    55         Fabian 'x3n' Landau
    56 
    57     @ingroup Jump
    58     */
    5941    class _JumpExport JumpPropeller : public JumpItem
    6042    {
  • code/branches/pickupsFS14/src/modules/jump/JumpRocket.cc

    r10074 r10111  
    2121 *
    2222 *   Author:
    23  *      Fabian 'x3n' Landau
     23 *      Fabien Vultier
    2424 *   Co-authors:
    2525 *      ...
     
    2929/**
    3030    @file JumpRocket.cc
    31     @brief Implementation of the JumpRocket class.
     31    @brief If this rocket is created, attachedToFigure_ is set to false. When the figure picks it up, the variable is set to true and the figure starts flying fast until the fuel is reduced to zero.
    3232*/
    3333
    3434#include "JumpRocket.h"
    35 
    3635#include "core/CoreIncludes.h"
    3736#include "core/GameMode.h"
    3837#include "graphics/Model.h"
    3938#include "gametypes/Gametype.h"
    40 
    4139#include "JumpFigure.h"
    42 
    4340#include "sound/WorldSound.h"
    4441#include "core/XMLPort.h"
     
    4845    RegisterClass(JumpRocket);
    4946
    50     /**
    51     @brief
    52         Constructor. Registers and initializes the object.
    53     */
    5447    JumpRocket::JumpRocket(Context* context) : JumpItem(context)
    5548    {
     
    5750
    5851        fuel_ = 3.0;
     52        attachedToFigure_ = false;
    5953
    6054        setPosition(Vector3(0,0,0));
     
    6458    }
    6559
    66     /**
    67     @brief
    68         Destructor.
    69     */
    7060    JumpRocket::~JumpRocket()
    7161    {
     
    7363    }
    7464
    75     //xml port for loading sounds
    7665    void JumpRocket::XMLPort(Element& xmlelement, XMLPort::Mode mode)
    7766    {
     
    7968    }
    8069
    81     /**
    82     @brief
    83         Is called every tick.
    84         Handles the movement of the ball and its interaction with the boundaries and bats.
    85     @param dt
    86         The time since the last tick.
    87     */
    8870    void JumpRocket::tick(float dt)
    8971    {
     
    11698
    11799        attachedToFigure_ = figure_->StartRocket(this);
    118         if (attachedToFigure_)
    119         {
    120                 //Starte Feuer-Animation
    121         }
    122100    }
    123101}
  • code/branches/pickupsFS14/src/modules/jump/JumpRocket.h

    r10074 r10111  
    2121 *
    2222 *   Author:
    23  *      Fabian 'x3n' Landau
     23 *      Fabien Vultier
    2424 *   Co-authors:
    2525 *      ...
     
    2727 */
    2828
    29 /**
    30     @file JumpRocket.h
    31     @brief Declaration of the JumpRocket class.
    32     @ingroup Jump
    33 */
    34 
    3529#ifndef _JumpRocket_H__
    3630#define _JumpRocket_H__
    3731
    3832#include "jump/JumpPrereqs.h"
    39 
    4033#include "util/Math.h"
    41 
    4234#include "worldentities/MovableEntity.h"
    43 
    4435
    4536namespace orxonox
    4637{
    47 
    48     /**
    49     @brief
    50         This class manages the ball for @ref orxonox::Jump "Jump".
    51 
    52         It is responsible for both the movement of the ball in the x,z-plane as well as its interaction with the boundaries of the playing field (defined by the @ref orxonox::JumpCenterpoint "JumpCenterpoint") and the @ref orxonox::JumpFigure "JumpFigures". Or more precisely, it makes the ball bounce off then upper and lower delimiters of the playing field, it makes the ball bounce off the bats and also detects when a player scores and takes appropriate measures.
    53 
    54     @author
    55         Fabian 'x3n' Landau
    56 
    57     @ingroup Jump
    58     */
    5938    class _JumpExport JumpRocket : public JumpItem
    6039    {
  • code/branches/pickupsFS14/src/modules/jump/JumpScore.cc

    r10074 r10111  
    2121 *
    2222 *   Author:
    23  *      Fabian 'x3n' Landau
     23 *      Fabien Vultier
    2424 *   Co-authors:
    2525 *      ...
     
    2929/**
    3030    @file JumpScore.cc
    31     @brief Implementation of the JumpScore class.
     31    @brief HUD of thejump minigame. If showScore_ is set, it displays the score. If showMessages_ is set, it displays the game over message.
    3232*/
    3333
    3434#include "JumpScore.h"
    35 
    3635#include "core/CoreIncludes.h"
    3736#include "core/XMLPort.h"
    3837#include "util/Convert.h"
    39 
    4038#include "infos/PlayerInfo.h"
    41 
    4239#include "Jump.h"
    43 #include "sound/WorldSound.h" /////////////////////////////
     40#include "sound/WorldSound.h"
    4441
    4542namespace orxonox
     
    4744    RegisterClass(JumpScore);
    4845
    49     /**
    50     @brief
    51         Constructor. Registers and initializes the object.
    52     */
    5346    JumpScore::JumpScore(Context* context) : OverlayText(context)
    5447    {
     
    6053    }
    6154
    62     /**
    63     @brief
    64         Destructor.
    65     */
    6655    JumpScore::~JumpScore()
    6756    {
     
    6958    }
    7059
    71     /**
    72     @brief
    73         Method to create a JumpScore through XML.
    74     */
    7560    void JumpScore::XMLPort(Element& xmlelement, XMLPort::Mode mode)
    7661    {
     
    8267    }
    8368
    84     /**
    85     @brief
    86         Is called each tick.
    87         Creates and sets the caption to be displayed by the JumpScore.
    88     @param dt
    89         The time that has elapsed since the last tick.
    90     */
    9169    void JumpScore::tick(float dt)
    9270    {
    9371        SUPER(JumpScore, tick, dt);
    9472
    95         // If the owner is set. The owner being a Jump game.
    96 
    97         if (this->owner_ != NULL)
     73        if (owner_ != NULL)
    9874        {
    9975            if (!owner_->hasEnded())
     
    12096    }
    12197
    122     /**
    123     @brief
    124         Is called when the owner changes.
    125         Sets the owner to NULL, if it is not a pointer to a Jump game.
    126     */
    12798    void JumpScore::changedOwner()
    12899    {
  • code/branches/pickupsFS14/src/modules/jump/JumpScore.h

    r10074 r10111  
    2121 *
    2222 *   Author:
    23  *      Fabian 'x3n' Landau
     23 *      Fabien Vultier
    2424 *   Co-authors:
    2525 *      ...
    2626 *
    2727 */
    28 
    29 /**
    30     @file JumpScore.h
    31     @brief Declaration of the JumpScore class.
    32     @ingroup Jump
    33 */
    3428
    3529#ifndef _JumpScore_H__
     
    4438namespace orxonox
    4539{
    46 
    47     /**
    48     @brief
    49         The JumpScore class displays the score for a game of @ref orxonox::Jump "Jump".
    50 
    51     @author
    52         Fabian 'x3n' Landau
    53 
    54     @ingroup Jump
    55     */
    5640    class _JumpExport JumpScore : public OverlayText, public Tickable
    5741    {
     
    6044            virtual ~JumpScore();
    6145
    62             virtual void tick(float dt); //!< Creates and sets the caption to be displayed by the JumpScore.
     46            virtual void tick(float dt);
    6347            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
    64             virtual void changedOwner(); //!< Is called when the owner changes.
     48            virtual void changedOwner();
    6549
    6650            void setShowScore(const bool showScore)
     
    8367
    8468        private:
    85             Jump* owner_; //!< The Jump game that owns this JumpScore.
    86             WeakPtr<PlayerInfo> player_; //!< Store information about left player permanently.
     69            Jump* owner_;
     70            WeakPtr<PlayerInfo> player_;
    8771            WorldSound* scoreSound_;
    8872            bool showScore_;
    8973            bool showMessages_;
    9074            std::string gameOverText_;
    91 
    9275    };
    9376}
  • code/branches/pickupsFS14/src/modules/jump/JumpShield.cc

    r10074 r10111  
    2121 *
    2222 *   Author:
    23  *      Fabian 'x3n' Landau
     23 *      Fabien Vultier
    2424 *   Co-authors:
    2525 *      ...
     
    2929/**
    3030    @file JumpShield.cc
    31     @brief Implementation of the JumpShield class.
     31    @brief If this shield is created, attachedToFigure_ is set to false. When the figure picks it up, the variable is set to true and the figure is protected until the fuel is reduced to zero.
    3232*/
    3333
     
    4848    RegisterClass(JumpShield);
    4949
    50     /**
    51     @brief
    52         Constructor. Registers and initializes the object.
    53     */
    5450    JumpShield::JumpShield(Context* context) : JumpItem(context)
    5551    {
     
    5753
    5854        fuel_ = 7.0;
     55        attachedToFigure_ = false;
    5956
    6057        setPosition(Vector3(0,0,0));
     
    6461    }
    6562
    66     /**
    67     @brief
    68         Destructor.
    69     */
    7063    JumpShield::~JumpShield()
    7164    {
     
    7366    }
    7467
    75     //xml port for loading sounds
    7668    void JumpShield::XMLPort(Element& xmlelement, XMLPort::Mode mode)
    7769    {
     
    7971    }
    8072
    81     /**
    82     @brief
    83         Is called every tick.
    84         Handles the movement of the ball and its interaction with the boundaries and bats.
    85     @param dt
    86         The time since the last tick.
    87     */
    8873    void JumpShield::tick(float dt)
    8974    {
     
    116101
    117102        attachedToFigure_ = figure_->StartShield(this);
    118         if (attachedToFigure_)
    119         {
    120                 //Starte Feuer-Animation
    121         }
    122103    }
    123104}
  • code/branches/pickupsFS14/src/modules/jump/JumpShield.h

    r10074 r10111  
    2121 *
    2222 *   Author:
    23  *      Fabian 'x3n' Landau
     23 *      Fabien Vultier
    2424 *   Co-authors:
    2525 *      ...
    2626 *
    2727 */
    28 
    29 /**
    30     @file JumpShield.h
    31     @brief Declaration of the JumpShield class.
    32     @ingroup Jump
    33 */
    3428
    3529#ifndef _JumpShield_H__
     
    4539namespace orxonox
    4640{
    47 
    48     /**
    49     @brief
    50         This class manages the ball for @ref orxonox::Jump "Jump".
    51 
    52         It is responsible for both the movement of the ball in the x,z-plane as well as its interaction with the boundaries of the playing field (defined by the @ref orxonox::JumpCenterpoint "JumpCenterpoint") and the @ref orxonox::JumpFigure "JumpFigures". Or more precisely, it makes the ball bounce off then upper and lower delimiters of the playing field, it makes the ball bounce off the bats and also detects when a player scores and takes appropriate measures.
    53 
    54     @author
    55         Fabian 'x3n' Landau
    56 
    57     @ingroup Jump
    58     */
    5941    class _JumpExport JumpShield : public JumpItem
    6042    {
  • code/branches/pickupsFS14/src/modules/jump/JumpSpring.cc

    r10074 r10111  
    2121 *
    2222 *   Author:
    23  *      Fabian 'x3n' Landau
     23 *      Fabien Vultier
    2424 *   Co-authors:
    2525 *      ...
     
    2929/**
    3030    @file JumpSpring.cc
    31     @brief Implementation of the JumpSpring class.
     31    @brief If this spring is touched by the figure, it jumps higher then from a platform.
    3232*/
    3333
    3434#include "JumpSpring.h"
    35 
    3635#include "core/CoreIncludes.h"
    3736#include "core/GameMode.h"
    3837#include "graphics/Model.h"
    3938#include "gametypes/Gametype.h"
    40 
    4139#include "JumpFigure.h"
    42 
    4340#include "sound/WorldSound.h"
    4441#include "core/XMLPort.h"
     
    4845    RegisterClass(JumpSpring);
    4946
    50     /**
    51     @brief
    52         Constructor. Registers and initializes the object.
    53     */
    5447    JumpSpring::JumpSpring(Context* context) : JumpItem(context)
    5548    {
     
    6558    }
    6659
    67     /**
    68     @brief
    69         Destructor.
    70     */
    7160    JumpSpring::~JumpSpring()
    7261    {
     
    7463    }
    7564
    76     //xml port for loading sounds
    7765    void JumpSpring::XMLPort(Element& xmlelement, XMLPort::Mode mode)
    7866    {
     
    8068    }
    8169
    82     /**
    83     @brief
    84         Is called every tick.
    85         Handles the movement of the ball and its interaction with the boundaries and bats.
    86     @param dt
    87         The time since the last tick.
    88     */
    8970    void JumpSpring::tick(float dt)
    9071    {
  • code/branches/pickupsFS14/src/modules/jump/JumpSpring.h

    r10074 r10111  
    2121 *
    2222 *   Author:
    23  *      Fabian 'x3n' Landau
     23 *      Fabien Vultier
    2424 *   Co-authors:
    2525 *      ...
    2626 *
    2727 */
    28 
    29 /**
    30     @file JumpSpring.h
    31     @brief Declaration of the JumpSpring class.
    32     @ingroup Jump
    33 */
    3428
    3529#ifndef _JumpSpring_H__
     
    4539namespace orxonox
    4640{
    47 
    48     /**
    49     @brief
    50         This class manages the ball for @ref orxonox::Jump "Jump".
    51 
    52         It is responsible for both the movement of the ball in the x,z-plane as well as its interaction with the boundaries of the playing field (defined by the @ref orxonox::JumpCenterpoint "JumpCenterpoint") and the @ref orxonox::JumpFigure "JumpFigures". Or more precisely, it makes the ball bounce off then upper and lower delimiters of the playing field, it makes the ball bounce off the bats and also detects when a player scores and takes appropriate measures.
    53 
    54     @author
    55         Fabian 'x3n' Landau
    56 
    57     @ingroup Jump
    58     */
    5941    class _JumpExport JumpSpring : public JumpItem
    6042    {
Note: See TracChangeset for help on using the changeset viewer.