New function to only change beginFrame
This commit is contained in:
parent
f353c89172
commit
e96cbc97b4
|
@ -79,14 +79,14 @@ public:
|
||||||
animate();
|
animate();
|
||||||
}
|
}
|
||||||
void makeAnimated(int beginFrame, int numberOfFrames, int animationDelay) {
|
void makeAnimated(int beginFrame, int numberOfFrames, int animationDelay) {
|
||||||
this->numberOfFrames = numberOfFrames;
|
setBeginFrame(beginFrame);
|
||||||
this->animationDelay = animationDelay;
|
animateToFrame(beginFrame);
|
||||||
this->beginFrame = beginFrame;
|
makeAnimated(numberOfFrames, animationDelay);
|
||||||
this->currentFrame = beginFrame;
|
|
||||||
animate();
|
animate();
|
||||||
}
|
}
|
||||||
void animate() { this->animating = true; }
|
void setBeginFrame(int frame) { this->beginFrame = frame; }
|
||||||
void animateToFrame(int frame) { this->currentFrame = frame; }
|
void animateToFrame(int frame) { this->currentFrame = frame; }
|
||||||
|
void animate() { this->animating = true; }
|
||||||
void stopAnimating() { this->animating = false; }
|
void stopAnimating() { this->animating = false; }
|
||||||
void setStayWithinBounds(bool b) { stayWithinBounds = b; }
|
void setStayWithinBounds(bool b) { stayWithinBounds = b; }
|
||||||
void setVelocity(int dx, int dy) {
|
void setVelocity(int dx, int dy) {
|
||||||
|
|
Loading…
Reference in New Issue