Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Nov 5, 2014, 4:06:09 PM (9 years ago)
Author:
fvultier
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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    }
Note: See TracChangeset for help on using the changeset viewer.