Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/orxonox/trunk/src/animation.cc @ 3812

Last change on this file since 3812 was 3812, checked in by bensch, 19 years ago

orxonox/trunk: animation-player added

File size: 1.1 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
22Anim::Anim(void)
23{ 
24  // initialize a beginning KeyFrame, that will be deleted afterwards
25  this->bHasKeys = false;
26
27  // setting default values
28  this->localTime = 0.0;
29  this->bRunning = true;
30
31  AnimationPlayer::getInstance()->addAnimation(this);
32}
33
34
35Anim::~Anim(void)
36{
37}
38
39void Anim::setInfinity(ANIM_INFINITY postInfinity)
40{
41  this->postInfinity = postInfinity;
42}
43
44
45void Anim::play()
46{
47  this->bRunning = true;
48}
49void Anim::stop()
50{
51  this->rewind();
52  this->bRunning = true;
53  this->tick(0.0);
54  this->bRunning = false;
55}
56void Anim::pause()
57{
58  this->bRunning = false;
59}
60void Anim::replay()
61{
62  this->rewind();
63  this->bRunning = true;
64}
Note: See TracBrowser for help on using the repository browser.