/Hammy/src/animation/Animation.as
ActionScript | 32 lines | 23 code | 5 blank | 4 comment | 0 complexity | 9aba03fcdd77aecfdfe8871707e4e583 MD5 | raw file
1package animation
2{
3 /**
4 * ...
5 * @author Peter Mackay
6 */
7 public class Animation
8 {
9
10 protected var firstFrame:int;
11 protected var frameCount:int;
12 protected var frameDuration:Number;
13
14 public function Animation(firstFrame:int, frameCount:int, frameDuration:Number)
15 {
16 this.firstFrame = firstFrame;
17 this.frameCount = frameCount;
18 this.frameDuration = frameDuration;
19 }
20
21 public function resolve(frame:Number):int
22 {
23 return firstFrame + int(frame);
24 }
25
26 public function advance(frame:Number, dt:Number):Number
27 {
28 throw new Error("Abstract method.");
29 }
30 }
31
32}