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/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    {
Note: See TracChangeset for help on using the changeset viewer.