Last change
on this file since 3827 was
3820,
checked in by bensch, 20 years ago
|
orxonox/trunk: more descriptive comments
|
File size:
1.3 KB
|
Line | |
---|
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 | #include "animation_player.h" |
---|
20 | |
---|
21 | |
---|
22 | Anim::Anim(void) |
---|
23 | { |
---|
24 | // initialize a beginning KeyFrame, that will be deleted afterwards |
---|
25 | this->bHasKeys = false; |
---|
26 | this->bHandled = true; |
---|
27 | |
---|
28 | // setting default values |
---|
29 | this->localTime = 0.0; |
---|
30 | this->bRunning = true; |
---|
31 | |
---|
32 | AnimationPlayer::getInstance()->addAnimation(this); |
---|
33 | } |
---|
34 | |
---|
35 | Anim::~Anim(void) |
---|
36 | { |
---|
37 | this->doNotHandle(); |
---|
38 | } |
---|
39 | |
---|
40 | void Anim::doNotHandle(void) |
---|
41 | { |
---|
42 | if (this->bHandled) |
---|
43 | AnimationPlayer::getInstance()->removeAnimation(this); |
---|
44 | } |
---|
45 | |
---|
46 | |
---|
47 | void Anim::setInfinity(ANIM_INFINITY postInfinity) |
---|
48 | { |
---|
49 | this->postInfinity = postInfinity; |
---|
50 | } |
---|
51 | |
---|
52 | |
---|
53 | void Anim::play() |
---|
54 | { |
---|
55 | this->bRunning = true; |
---|
56 | } |
---|
57 | void Anim::stop() |
---|
58 | { |
---|
59 | this->rewind(); |
---|
60 | this->bRunning = true; |
---|
61 | this->tick(0.0); |
---|
62 | this->bRunning = false; |
---|
63 | } |
---|
64 | void Anim::pause() |
---|
65 | { |
---|
66 | this->bRunning = false; |
---|
67 | } |
---|
68 | void Anim::replay() |
---|
69 | { |
---|
70 | this->rewind(); |
---|
71 | this->bRunning = true; |
---|
72 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.