]> git.localhorst.tv Git - l2e.git/blobdiff - src/graphics/SimpleAnimation.cpp
added capsule attack/animation handling
[l2e.git] / src / graphics / SimpleAnimation.cpp
index baed3419188b2f393e0e27ade3d3b56f7e38f0f3..24985f91ebb12e5db89143389f29a29a71f2d4d8 100644 (file)
@@ -9,6 +9,41 @@ using loader::TypeDescription;
 
 namespace graphics {
 
+SimpleAnimation::SimpleAnimation()
+: numFrames(0)
+, col(0)
+, row(0) {
+
+}
+
+SimpleAnimation::SimpleAnimation(
+               const Sprite *sprite,
+               int frameTime,
+               int numFrames,
+               int col,
+               int row,
+               bool repeat)
+: Animation(sprite, frameTime, repeat)
+, numFrames(numFrames)
+, col(col)
+, row(row) {
+
+}
+
+
+int SimpleAnimation::NumFrames() const {
+       return numFrames;
+}
+
+int SimpleAnimation::Col(int frame) const {
+       return col;
+}
+
+int SimpleAnimation::Row(int frame) const {
+       return row + frame;
+}
+
+
 void SimpleAnimation::CreateTypeDescription() {
        SimpleAnimation sa;
        Animation *a(&sa);