[2068] | 1 | |
---|
| 2 | |
---|
| 3 | /* |
---|
| 4 | orxonox - the future of 3D-vertical-scrollers |
---|
| 5 | |
---|
| 6 | Copyright (C) 2004 orx |
---|
| 7 | |
---|
| 8 | This program is free software; you can redistribute it and/or modify |
---|
| 9 | it under the terms of the GNU General Public License as published by |
---|
| 10 | the Free Software Foundation; either version 2, or (at your option) |
---|
| 11 | any later version. |
---|
| 12 | |
---|
| 13 | ### File Specific: |
---|
[2080] | 14 | main-programmer: Christian Meyer |
---|
[3005] | 15 | co-programmer: ... |
---|
[2068] | 16 | */ |
---|
| 17 | |
---|
| 18 | #include "track.h" |
---|
| 19 | |
---|
| 20 | using namespace std; |
---|
| 21 | |
---|
[2141] | 22 | /** |
---|
[3232] | 23 | \brief creates a null Track part |
---|
[2141] | 24 | */ |
---|
[2101] | 25 | Track::Track () |
---|
| 26 | { |
---|
[3232] | 27 | this->ID = 0; |
---|
| 28 | this->offset = NULL; |
---|
| 29 | this->end = NULL; |
---|
| 30 | this->nextID = 0; |
---|
[3302] | 31 | this->setClassName ("Track"); |
---|
[2101] | 32 | } |
---|
| 33 | |
---|
[2141] | 34 | /** |
---|
[3232] | 35 | \brief creates a functional base Track part |
---|
| 36 | \param number: the ID if this Track part |
---|
| 37 | \param next: the ID of the next Track part |
---|
| 38 | \param start: pointer to an anchor point (Vector) representing the offset of this part |
---|
| 39 | \param finish: pointer to an anchor point (Vector) representing the end of this part |
---|
[2141] | 40 | */ |
---|
[2080] | 41 | Track::Track (Uint32 number, Uint32 next, Vector* start, Vector* finish) |
---|
[2068] | 42 | { |
---|
[3232] | 43 | this->ID = number; |
---|
| 44 | this->offset = start; |
---|
| 45 | this->end = finish; |
---|
| 46 | this->nextID = next; |
---|
[3302] | 47 | this->setClassName ("Track"); |
---|
[2068] | 48 | } |
---|
| 49 | |
---|
[2141] | 50 | /** |
---|
[3232] | 51 | \brief removes the Track part from memory |
---|
[2141] | 52 | */ |
---|
[2068] | 53 | Track::~Track () |
---|
| 54 | { |
---|
| 55 | } |
---|
| 56 | |
---|
[2636] | 57 | void Track::init() |
---|
| 58 | { |
---|
| 59 | |
---|
| 60 | } |
---|
| 61 | |
---|
| 62 | |
---|
[2551] | 63 | |
---|
| 64 | |
---|
[2068] | 65 | |
---|
[2141] | 66 | /** |
---|
[3232] | 67 | \brief this is called when a WorldEntity enters a Track part |
---|
| 68 | \param entity: pointer to the WorldEntity in question |
---|
| 69 | |
---|
| 70 | You can do stuff like add or remove effects, do some coordinate finetuning |
---|
| 71 | or whatever in here. |
---|
[2141] | 72 | */ |
---|
[3232] | 73 | void Track::postEnter (WorldEntity* entity) |
---|
[2080] | 74 | { |
---|
| 75 | } |
---|
[2068] | 76 | |
---|
[3232] | 77 | |
---|
[2141] | 78 | /** |
---|
[3232] | 79 | \brief this is called when a WorldEntity leaves a Track part |
---|
| 80 | \param entity: pointer to the WorldEntity in question |
---|
| 81 | |
---|
| 82 | You can do stuff like add or remove effects, do some coordinate finetuning |
---|
| 83 | or whatever in here. |
---|
[2141] | 84 | */ |
---|
[3232] | 85 | void Track::postLeave (WorldEntity* entity) |
---|
[2080] | 86 | { |
---|
| 87 | } |
---|
[2068] | 88 | |
---|
[3232] | 89 | |
---|
[2141] | 90 | /** |
---|
[3232] | 91 | \brief this is called every frame |
---|
| 92 | \param deltaT: amount of time passed since the last frame in seconds |
---|
| 93 | |
---|
| 94 | Do time based or polling scripts here. |
---|
[2141] | 95 | */ |
---|
[2080] | 96 | void Track::tick (float deltaT) |
---|
| 97 | { |
---|
| 98 | } |
---|
[2068] | 99 | |
---|
| 100 | |
---|
[2080] | 101 | |
---|
| 102 | |
---|
| 103 | |
---|