| 
                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
           | 
      
      
        
  | 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(); | 
|---|
 | 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.