- Timestamp:
- Nov 5, 2014, 4:06:09 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/pickupsFS14/src/modules/jump/JumpProjectile.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 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. 32 32 */ 33 33 34 34 #include "JumpProjectile.h" 35 36 35 #include "core/CoreIncludes.h" 37 36 #include "core/GameMode.h" 38 37 #include "graphics/Model.h" 39 38 #include "gametypes/Gametype.h" 40 41 39 #include "JumpFigure.h" 42 43 40 #include "sound/WorldSound.h" 44 41 #include "core/XMLPort.h" … … 48 45 RegisterClass(JumpProjectile); 49 46 50 /**51 @brief52 Constructor. Registers and initializes the object.53 */54 47 JumpProjectile::JumpProjectile(Context* context) : MovableEntity(context) 55 48 { … … 57 50 58 51 figure_ = 0; 59 60 registerVariables();61 62 52 setPosition(Vector3(0,0,0)); 63 53 setVelocity(Vector3(0,0,250.0)); … … 65 55 } 66 56 67 /**68 @brief69 Destructor.70 */71 57 JumpProjectile::~JumpProjectile() 72 58 { 73 /*if (this->isInitialized())74 {75 if (this->bDeleteBats_)76 delete this->figure_;77 59 78 delete[] this->batID_;79 }*/80 60 } 81 61 82 //xml port for loading sounds83 62 void JumpProjectile::XMLPort(Element& xmlelement, XMLPort::Mode mode) 84 63 { … … 86 65 } 87 66 88 /**89 @brief90 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 @brief101 Is called every tick.102 Handles the movement of the ball and its interaction with the boundaries and bats.103 @param dt104 The time since the last tick.105 */106 67 void JumpProjectile::tick(float dt) 107 68 { … … 123 84 } 124 85 125 /**126 @brief127 Set the bats for the ball.128 @param bats129 An array (of size 2) of weak pointers, to be set as the new bats.130 */131 86 void JumpProjectile::setFigure(WeakPtr<JumpFigure> figure) 132 87 {
Note: See TracChangeset
for help on using the changeset viewer.