rendered paste bodyimport theAnimator.*;import java.awt.*;import theAnimator.extras.ALine;import java.awt.Paint;import theAnimator.Animation.*;public class Kanon extends HeavyThing{ AnimationObject target; AnimationObject canonaim; float canonlength; float canonheight; public Kanon(int length, int speed, int kulaspeed) { canonlength = length; canonheight = 15; MovingAnimationObject rail = new MovingAnimationObject(100,100,length, 15); rail.setColor(Color.BLACK); rail.setRound(false); MovingAnimationObject wagon = new MovingAnimationObject(0,-17,60,20); wagon.setColor(Color.GRAY); wagon.setRound(false); rail.addChild(wagon); AnimationObject canonholder = new AnimationObject(0,0,10,10); canonholder.setColor(Color.RED); wagon.addChild(canonholder); AnimationObject canonaim = new AnimationObject(0,0,8,8); canonaim.setColor(Color.BLUE); canonholder.addChild(canonaim); canonaim.setDistance(70); ALine line = new ALine(canonholder, canonaim); line.setColor(Color.BLACK); } public void setTarget(AnimationObject target) { this.target=target; } public void tickMe(int time){ float x = canonaim.getDirectionTo(target); System.out.println(x); } public void moveMe(){ } }