Last change
on this file since 3818 was
3816,
checked in by bensch, 20 years ago
|
orxonox/trunk: AnimationPlayer updated, created a debug function, and general functionality
|
File size:
1.2 KB
|
Rev | Line | |
---|
[3782] | 1 | /* |
---|
| 2 | orxonox - the future of 3D-vertical-scrollers |
---|
| 3 | |
---|
| 4 | Copyright (C) 2004 orx |
---|
| 5 | |
---|
| 6 | This program is free software; you can redistribute it and/or modify |
---|
| 7 | it under the terms of the GNU General Public License as published by |
---|
| 8 | the Free Software Foundation; either version 2, or (at your option) |
---|
| 9 | any later version. |
---|
| 10 | |
---|
| 11 | ### File Specific: |
---|
| 12 | main-programmer: Benjamin Grauer |
---|
| 13 | co-programmer: ... |
---|
| 14 | */ |
---|
| 15 | |
---|
| 16 | |
---|
| 17 | #include "animation.h" |
---|
| 18 | #include "debug.h" |
---|
[3812] | 19 | #include "animation_player.h" |
---|
[3782] | 20 | |
---|
| 21 | |
---|
| 22 | Anim::Anim(void) |
---|
[3795] | 23 | { |
---|
[3784] | 24 | // initialize a beginning KeyFrame, that will be deleted afterwards |
---|
| 25 | this->bHasKeys = false; |
---|
| 26 | |
---|
[3785] | 27 | // setting default values |
---|
[3786] | 28 | this->localTime = 0.0; |
---|
[3787] | 29 | this->bRunning = true; |
---|
[3812] | 30 | |
---|
| 31 | AnimationPlayer::getInstance()->addAnimation(this); |
---|
[3782] | 32 | } |
---|
| 33 | |
---|
| 34 | |
---|
[3784] | 35 | Anim::~Anim(void) |
---|
| 36 | { |
---|
[3816] | 37 | AnimationPlayer::getInstance()->removeAnimation(this); |
---|
[3784] | 38 | } |
---|
| 39 | |
---|
[3794] | 40 | void Anim::setInfinity(ANIM_INFINITY postInfinity) |
---|
[3784] | 41 | { |
---|
| 42 | this->postInfinity = postInfinity; |
---|
| 43 | } |
---|
[3797] | 44 | |
---|
| 45 | |
---|
| 46 | void Anim::play() |
---|
| 47 | { |
---|
| 48 | this->bRunning = true; |
---|
| 49 | } |
---|
| 50 | void Anim::stop() |
---|
| 51 | { |
---|
| 52 | this->rewind(); |
---|
[3798] | 53 | this->bRunning = true; |
---|
| 54 | this->tick(0.0); |
---|
[3797] | 55 | this->bRunning = false; |
---|
| 56 | } |
---|
| 57 | void Anim::pause() |
---|
| 58 | { |
---|
| 59 | this->bRunning = false; |
---|
| 60 | } |
---|
| 61 | void Anim::replay() |
---|
| 62 | { |
---|
| 63 | this->rewind(); |
---|
| 64 | this->bRunning = true; |
---|
| 65 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.