- Timestamp:
- Nov 5, 2014, 4:06:09 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/pickupsFS14/src/modules/jump/JumpPlatformTimer.cc
r10074 r10111 21 21 * 22 22 * Author: 23 * Fabi an 'x3n' Landau23 * Fabien Vultier 24 24 * Co-authors: 25 25 * ... … … 29 29 /** 30 30 @file JumpPlatformTimer.cc 31 @brief Implementation of the JumpPlatform class.31 @brief This platform will explode if you wait for too long time. 32 32 */ 33 33 34 34 #include "JumpPlatformTimer.h" 35 36 35 #include "core/CoreIncludes.h" 37 36 #include "core/GameMode.h" 38 39 37 #include "gametypes/Gametype.h" 40 41 38 #include "JumpFigure.h" 42 43 39 #include "sound/WorldSound.h" 44 40 #include "core/XMLPort.h" … … 48 44 RegisterClass(JumpPlatformTimer); 49 45 50 /**51 @brief52 Constructor. Registers and initializes the object.53 */54 46 JumpPlatformTimer::JumpPlatformTimer(Context* context) : JumpPlatform(context) 55 47 { 56 48 RegisterObject(JumpPlatformTimer); 57 49 58 particleSpawner = NULL;50 particleSpawner_ = NULL; 59 51 60 52 setProperties(3.0); … … 62 54 } 63 55 64 /**65 @brief66 Destructor.67 */68 56 JumpPlatformTimer::~JumpPlatformTimer() 69 57 { … … 71 59 } 72 60 73 //xml port for loading sounds74 61 void JumpPlatformTimer::XMLPort(Element& xmlelement, XMLPort::Mode mode) 75 62 { … … 80 67 } 81 68 82 /**83 @brief84 Is called every tick.85 Handles the movement of the ball and its interaction with the boundaries and bats.86 @param dt87 The time since the last tick.88 */89 69 void JumpPlatformTimer::tick(float dt) 90 70 { … … 92 72 93 73 time_ -= dt; 94 if (time_ < effectStartTime_ && particleSpawner == NULL)74 if (time_ < effectStartTime_ && particleSpawner_ == NULL) 95 75 { 96 76 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_); 102 82 103 attach(particleSpawner );83 attach(particleSpawner_); 104 84 } 105 85 }
Note: See TracChangeset
for help on using the changeset viewer.