Last change
on this file since 3808 was
3798,
checked in by bensch, 20 years ago
|
orxonox/trunk: play/rewind and so on work perfectly. (you can try them out on [1-5] keys
1 play
2 stop
3 pause
4 replay
5 rewind
|
File size:
1.0 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" |
---|
| 19 | |
---|
| 20 | |
---|
| 21 | Anim::Anim(void) |
---|
[3795] | 22 | { |
---|
[3784] | 23 | // initialize a beginning KeyFrame, that will be deleted afterwards |
---|
| 24 | this->bHasKeys = false; |
---|
| 25 | |
---|
[3785] | 26 | // setting default values |
---|
[3786] | 27 | this->localTime = 0.0; |
---|
[3787] | 28 | this->bRunning = true; |
---|
[3782] | 29 | } |
---|
| 30 | |
---|
| 31 | |
---|
[3784] | 32 | Anim::~Anim(void) |
---|
| 33 | { |
---|
| 34 | } |
---|
| 35 | |
---|
[3794] | 36 | void Anim::setInfinity(ANIM_INFINITY postInfinity) |
---|
[3784] | 37 | { |
---|
| 38 | this->postInfinity = postInfinity; |
---|
| 39 | } |
---|
[3797] | 40 | |
---|
| 41 | |
---|
| 42 | void Anim::play() |
---|
| 43 | { |
---|
| 44 | this->bRunning = true; |
---|
| 45 | } |
---|
| 46 | void Anim::stop() |
---|
| 47 | { |
---|
| 48 | this->rewind(); |
---|
[3798] | 49 | this->bRunning = true; |
---|
| 50 | this->tick(0.0); |
---|
[3797] | 51 | this->bRunning = false; |
---|
| 52 | } |
---|
| 53 | void Anim::pause() |
---|
| 54 | { |
---|
| 55 | this->bRunning = false; |
---|
| 56 | } |
---|
| 57 | void Anim::replay() |
---|
| 58 | { |
---|
| 59 | this->rewind(); |
---|
| 60 | this->bRunning = true; |
---|
| 61 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.