From 0dcbb273fe47852b76c83250df577d9651ac9f61 Mon Sep 17 00:00:00 2001 From: Tegmine Date: Sat, 3 Mar 2012 15:51:23 -0600 Subject: [PATCH] Added constructors for Actor. --- .gitignore | 1 + Actor.cpp | 14 ++++++++++++++ Actor.h | 2 ++ 3 files changed, 17 insertions(+) diff --git a/.gitignore b/.gitignore index f03e459..59029c4 100644 --- a/.gitignore +++ b/.gitignore @@ -31,6 +31,7 @@ SDL.dll *.sbr *.sdf *.opensdf +*.filters ipch/ obj/ [Bb]in diff --git a/Actor.cpp b/Actor.cpp index 54c636e..ad68834 100644 --- a/Actor.cpp +++ b/Actor.cpp @@ -7,3 +7,17 @@ Actor::Actor(Animation *anim): mAnimations.push_back(anim); } +Actor::Actor(std::vector anims): + mFrame(0), + mCurrentAnimation(0) +{ + mAnimations = anims; +} + +Actor::Actor(std::vector anims): + mFrame(0), + mCurrentAnimation(0) +{ + for(int i=0; i anims); + Actor(std::vector anims); int mFrame;/**< The frame # */ int mCurrentAnimation;/**< Index to the current loaded animation */ std::vector mAnimations;/**< Vector of pointers to all of this sprite's Animations */ -- 2.11.0