| 
                Last change
                  on this file since 3797 was
                  3797,
                  checked in by bensch, 21 years ago
           | 
        
        
          | 
               
orxonox/trunk: added the time-functions to the amimation 
 
           | 
        
        | 
            File size:
            994 bytes
           | 
      
      
        
  | 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 |  | 
|---|
| 20 |  | 
|---|
| 21 | Anim::Anim(void) | 
|---|
| 22 | {   | 
|---|
| 23 |   // initialize a beginning KeyFrame, that will be deleted afterwards | 
|---|
| 24 |   this->bHasKeys = false; | 
|---|
| 25 |  | 
|---|
| 26 |   // setting default values | 
|---|
| 27 |   this->localTime = 0.0; | 
|---|
| 28 |   this->bRunning = true; | 
|---|
| 29 | } | 
|---|
| 30 |  | 
|---|
| 31 |  | 
|---|
| 32 | Anim::~Anim(void) | 
|---|
| 33 | { | 
|---|
| 34 | } | 
|---|
| 35 |  | 
|---|
| 36 | void Anim::setInfinity(ANIM_INFINITY postInfinity) | 
|---|
| 37 | { | 
|---|
| 38 |   this->postInfinity = postInfinity; | 
|---|
| 39 | } | 
|---|
| 40 |  | 
|---|
| 41 |  | 
|---|
| 42 | void Anim::play() | 
|---|
| 43 | { | 
|---|
| 44 |   this->bRunning = true; | 
|---|
| 45 | } | 
|---|
| 46 | void Anim::stop() | 
|---|
| 47 | { | 
|---|
| 48 |   this->rewind(); | 
|---|
| 49 |   this->bRunning = false; | 
|---|
| 50 | } | 
|---|
| 51 | void Anim::pause() | 
|---|
| 52 | { | 
|---|
| 53 |   this->bRunning = false; | 
|---|
| 54 | } | 
|---|
| 55 | void Anim::replay() | 
|---|
| 56 | { | 
|---|
| 57 |   this->rewind(); | 
|---|
| 58 |   this->bRunning = true; | 
|---|
| 59 | } | 
|---|
       
      
      Note: See 
TracBrowser
        for help on using the repository browser.