/** @see net.wombatrpgs.rainfall.maps.events.MapEvent#halt() */ @Override public void halt() { super.halt(); if (!pacing) { appearance.stopMoving(); appearance.update(0); } targetVX = 0; targetVY = 0; for (Direction dir : directionStatus.keySet()) { directionStatus.put(dir, false); } }
/** @see net.wombatrpgs.rainfall.maps.MapObject#vitalUpdate(float) */ @Override public void vitalUpdate(float elapsed) { super.vitalUpdate(elapsed); if (pacing && appearance != null) { appearance.update(elapsed); } if (!pacing && walkAnim != null) if (Math.abs(vx) < .1 && Math.abs(vy) < .1 && Math.abs(targetVX) < .1 && Math.abs(targetVY) < .1) { walkAnim.stopMoving(); if (appearance == walkAnim) { appearance = idleAnim; idleAnim.setFacing(walkAnim.getFacing()); } } }