/Hammy/src/animation/Animation.as
https://bitbucket.org/peterm/hammy-as3 · ActionScript · 32 lines · 23 code · 5 blank · 4 comment · 0 complexity · 9aba03fcdd77aecfdfe8871707e4e583 MD5 · raw file
- package animation
- {
- /**
- * ...
- * @author Peter Mackay
- */
- public class Animation
- {
-
- protected var firstFrame:int;
- protected var frameCount:int;
- protected var frameDuration:Number;
-
- public function Animation(firstFrame:int, frameCount:int, frameDuration:Number)
- {
- this.firstFrame = firstFrame;
- this.frameCount = frameCount;
- this.frameDuration = frameDuration;
- }
-
- public function resolve(frame:Number):int
- {
- return firstFrame + int(frame);
- }
-
- public function advance(frame:Number, dt:Number):Number
- {
- throw new Error("Abstract method.");
- }
- }
-
- }