@Override public AnimationDesc startAnimation(DogCharacter dog) { AnimationDesc animationDesc = super.startAnimation(dog); if (dog.currentTaskAnimation == getTaskAnimation()) { // Calculate target orientation to make the dog face human targetOrientation = ArithmeticUtils.wrapAngleAroundZero(dog.human.getOrientation() + Constants.PI); } return animationDesc; }
protected AnimationDesc startAnimation (DogCharacter dog) { int loopCount = -1; // if (animationListener != null && animationListener != dog.currentAnimationListener) { if (animationListener != null) { animationListener.setAnimationCompleted(false); loopCount = getAnimationLoopCount(); } dog.currentAnimationListener = animationListener; return dog.animations.animate(dog.currentTaskAnimation.animationId, loopCount, 1, animationListener, 0.1f); }
public void trigger(int tick) { AnimationDesc ad = human.getAnimationController().animate(animation, repeats, Config.getGameSpeed(), null, 0.2f); if (ad != null) { duration = ticksLeft = ad.duration * 60f / Config.getGameSpeed(); } else done = true; active = true; }
public final AnimationDesc GetCurrentAnimationDesc() { return _controller.current; }