/** * Clears all the channels that were created. * * @see AnimControl#createChannel() */ public void clearChannels() { for (AnimChannel animChannel : channels) { for (AnimEventListener list : listeners) { list.onAnimCycleDone(this, animChannel, animChannel.getAnimationName()); } } channels.clear(); }
public void onAnimCycleDone(AnimControl control, AnimChannel channel, String animName) { // if(channel.getAnimationName().equals("StandUpFront")){ // channel.setAnim("Dance"); // } if (channel.getAnimationName().equals("StandUpBack") || channel.getAnimationName().equals("StandUpFront")) { channel.setLoopMode(LoopMode.DontLoop); channel.setAnim("IdleTop", 5); channel.setLoopMode(LoopMode.Loop); } // if(channel.getAnimationName().equals("IdleTop")){ // channel.setAnim("StandUpFront"); // } }
public void onAction(String name, boolean keyPressed, float tpf) { if (name.equals("Walk") && !keyPressed) { if (!channel.getAnimationName().equals("Walk")) { /** Play the "walk" animation! */ channel.setAnim("Walk", 0.50f); channel.setLoopMode(LoopMode.Loop); } } } };
public void onAnimCycleDone(AnimControl control, AnimChannel channel, String animName) { if (channel.getAnimationName().equals("SliceHorizontal")) { channel.setLoopMode(LoopMode.DontLoop); channel.setAnim("IdleTop", 5); channel.setLoopMode(LoopMode.Loop); } }
public void onAction(String binding, boolean value, float tpf) { if (binding.equals("Attack") && value){ if (!channel.getAnimationName().equals("Dodge")){ channel.setAnim("Dodge", 0.50f); channel.setLoopMode(LoopMode.Cycle); channel.setSpeed(0.10f); } } }
@Override public void onAction(String binding, boolean value, float tpf) { if (binding.equals("Attack") && value) { if (!channel.getAnimationName().equals("Punches")) { channel.setAnim("Punches", 0.5f); channel.setLoopMode(LoopMode.Cycle); channel.setSpeed(0.5f); } } } }
if (!"stand".equals(animationChannel.getAnimationName())) { animationChannel.setAnim("stand", 1f); character.setViewDirection(walkDirection); if (airTime > .3f) { if (!"stand".equals(animationChannel.getAnimationName())) { animationChannel.setAnim("stand"); } else if (!"Walk".equals(animationChannel.getAnimationName())) { animationChannel.setAnim("Walk", 0.7f);
@Override public void setTime(float time) { super.setTime(time); if (!animationName.equals(channel.getAnimationName())) { channel.setAnim(animationName, blendTime);
/** * Clears all the channels that were created. * * @see AnimControl#createChannel() */ public void clearChannels() { for (AnimChannel animChannel : channels) { for (AnimEventListener list : listeners) { list.onAnimCycleDone(this, animChannel, animChannel.getAnimationName()); } } channels.clear(); }
/** * Clears all the channels that were created. * * @see AnimControl#createChannel() */ public void clearChannels() { for (AnimChannel animChannel : channels) { for (AnimEventListener list : listeners) { list.onAnimCycleDone(this, animChannel, animChannel.getAnimationName()); } } channels.clear(); }
@Override public void onAnimCycleDone(AnimControl control, AnimChannel channel, String animName) { super.onAnimCycleDone(control, channel, animName); // if(channel.getAnimationName().equals("StandUpFront")){ // channel.setAnim("Dance"); // } if (channel.getAnimationName().equals(ANIM_STAND_BACK) || channel.getAnimationName().equals(ANIM_STAND_FRONT)) { channel.setLoopMode(LoopMode.DontLoop); channel.setAnim(ANIM_IDLE_TOP, 5); channel.setLoopMode(LoopMode.Loop); } // if(channel.getAnimationName().equals("IdleTop")){ // channel.setAnim("StandUpFront"); // } } }
@Override public void setTime(float time) { super.setTime(time); if (!animationName.equals(channel.getAnimationName())) { channel.setAnim(animationName, blendTime);
if(!a.getName().equals(chan.getAnimationName()))