Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 11105


Ignore:
Timestamp:
Feb 1, 2016, 5:27:49 PM (9 years ago)
Author:
fvultier
Message:

Removed wrong comments in Jump minigame. These comments were artifacts from copy paste.

Location:
code/trunk/src/modules
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/src/modules/jump/JumpCenterpoint.h

    r11071 r11105  
    3838    /**
    3939    @brief
    40         The JumpCenterpoint implements the playing field @ref orxonox::Jump "Jump" takes place in and allows for many parameters of the minigame to be set.
    41         The playing field resides in the x,z-plane, with the x-axis being the horizontal axis and the z-axis being the vertical axis.
    42        
    43         Various parameters can be set:
    44         - The <b>dimension</b> is a vector, that defines the width and height of the playing field. The default is <em>(200, 120)</em>.
    45         - The <b>balltemplate</b> is a template that is applied to the @ref orxonox::JumpPlatform "JumpPlatform", it can be used to attach different things to it, e.g. its @ref orxonox::Model "Model". See below for a usage example.
    46         - The <b>battemplate</b> is a template that is applied to the @ref orxonox::JumpPlatform "JumpFigure", it can be used to attach different things to it, e.g. its @ref orxonox::Model "Model". See below for a usage example.
    47         - The <b>ballspeed</b> is the speed with which the @ref orxonox::JumpPlatform "JumpPlatform" moves. The default is <em>100</em>.
    48         - The <b>ballaccfactor</b> is the acceleration factor for the @ref orxonox::JumpPlatform "JumpPlatform". The default is <em>1.0</em>.
    49         - The <b>batspeed</b> is the speed with which the @ref orxonox::JumpFigure "JumpFigures" move. The default is <em>60</em>.
    50         - The <b>batlength</b> is the length of the @ref orxonox::JumpFigure "JumpFigures" as the percentage of the height of the playing field. The default is <em>0.25</em>.
    51        
    52         An example in XML of the JumpCenterpoint would be:
    53        
    54         First the needed templates:
    55         The template for the @ref orxonox::JumpPlatform "JumpPlatform".
    56         @code
    57         <Template name="jumpball">
    58           <JumpPlatform>
    59             <attached>
    60               <Model mesh="sphere.mesh" scale="2" />
    61               <ParticleSpawner name="hiteffect" position="0,0,0" source="Orxonox/sparks2" lifetime="0.01" autostart="0" mainstate="spawn" />
    62             </attached>
    63             <eventlisteners>
    64               <EventTarget target="hiteffect" />
    65             </eventlisteners>
    66           </JumpPlatform>
    67         </Template>
    68         @endcode
    69         As can be seen, a sphere is attached as the @ref orxonox::Model "Model" for the @ref orxonox::JumpPlatform "JumpPlatform", and also an @ref orxonox::EventListener "EventListener" that triggers a @ref orxonox::ParticleSpawner "ParticleSpawner", whenever the ball hits the boundaries is attached.
    70        
    71         Additionally the template for the @ref orxonox::JumpFigure "JumpFigure".
    72         @code
    73         <Template name="jumpbatcameras" defaults="0">
    74           <JumpFigure>
    75             <camerapositions>
    76               <CameraPosition position="0,200,0" pitch="-90" absolute="true" />
    77             </camerapositions>
    78           </JumpFigure>
    79         </Template>
    80 
    81         <Template name="jumpbat">
    82           <JumpFigure camerapositiontemplate=jumpbatcameras>
    83             <attached>
    84               <Model position="0,0,3" mesh="cube.mesh" scale3D="14,2,2" />
    85             </attached>
    86           </JumpFigure>
    87         </Template>
    88         @endcode
    89         As can be seen, there are actually two templates. The first template is needed to set the camera for the @ref orxonox::JumpFigure "JumpFigure". The second template ist the actual template for the @ref orxonox::JumpFigure "JumpFigure", the template for the camera position is added and a @ref orxonox::Model "Model" for the @ref orxonox::JumpFigure "JumpFigure" is attached.
    90         propellerTemplate_
    91         Finally the JumpCenterpoint is created.
    92         @code
    93         <JumpCenterpoint name="jumpcenter" dimension="200,120" balltemplate="jumpball" battemplate="jumpbat" ballspeed="200" ballaccfactor="1.0" batspeed="130" batlength="0.25">
    94           <attached>
    95             <Model position="0,0,60" mesh="cube.mesh" scale3D="105,1,1" />
    96             <Model position="0,0,-60" mesh="cube.mesh" scale3D="105,1,1" />
    97           </attached>
    98         </JumpCenterpoint>
    99         @endcode
    100         All parameters are specified. And also two @ref orxonox::Model "Models" (for the upper and lower boundary) are attached.
    101        
    102         For a more elaborate example, have a look at the <code>jump.oxw</code> level file.
    103 
     40        @brief The JumpCenterpoint is a StaticEntity which represents the level of the minigame. All platforms, enemies and items are attached to the JumpCenterpoint.
    10441    */
    10542    class _JumpExport JumpCenterpoint : public StaticEntity
  • code/trunk/src/modules/jump/JumpFigure.h

    r11071 r11105  
    4242            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override;
    4343            virtual void tick(float dt) override;
    44             virtual void moveFrontBack(const Vector2& value) override; //!< Overloaded the function to steer the bat up and down.
    45             virtual void moveRightLeft(const Vector2& value) override; //!< Overloaded the function to steer the bat up and down.
     44            virtual void moveFrontBack(const Vector2& value) override; //!< Overloaded the function to steer the figure up and down.
     45            virtual void moveRightLeft(const Vector2& value) override; //!< Overloaded the function to steer the figure up and down.
    4646            virtual void rotateYaw(const Vector2& value) override;
    4747            virtual void rotatePitch(const Vector2& value) override;
  • code/trunk/src/modules/objects/SpaceBoundaries.cc

    r11083 r11105  
    8282                    pawnsIn_.push_back(currentPawn);
    8383                }
    84             } else if (this->reaction_ == 2) {
     84            }
     85            else if (this->reaction_ == 2)
     86            {
    8587                float distance = this->computeDistance(currentPawn);
    8688                if(distance >= this->maxDistance_)
     
    8890                    pawnsIn_.push_back(currentPawn);
    8991                }
    90             } else {
     92            }
     93            else
     94            {
    9195                pawnsIn_.push_back(currentPawn);
    9296            }
     
    205209        this->removeAllBillboards();
    206210
     211        if(!this->isActive())
     212            return;
     213
    207214        float distance;
    208215        bool humanItem;
Note: See TracChangeset for help on using the changeset viewer.