@Test public void testStepToNullLocation() throws InterruptedException { Actor actor = new Actor("Actor"); world.getWorldObjects().add(actor); world.update(); Angle angle = new Angle(0.0, Angle.BACK); actor.setAngle(angle); world.update(); Thread.sleep(1000); world.update(); double distance = Vector2D.ORIGIN.getDistanceToVector(actor.getVector2D()); Assert.assertEquals(distance, 0, 0.1); }
@Override public void update() { super.update(); ActorUtils.stepForward(this); }
Actor extends WorldObject { @Override public void update() { super.update(); ActorUtils.stepForward(this); } }
Actor extends WorldObject { @Override public void update() { super.update(); ActorUtils.stepForward(this); } Actor(String name); }
Actor extends WorldObject { @Override public void update() { super.update(); ActorUtils.stepForward(this); } Actor(String name); @Override void preUpdate(); @Override void update(); MoveState getForcedState(); void setForcedState(MoveState forcedState); double getMoveSpeed(); void setMoveSpeed(double moveSpeed); }
Actor extends WorldObject { @Override public void update() { super.update(); ActorUtils.stepForward(this); } Actor(String name); @Override void preUpdate(); @Override void update(); MoveState getForcedState(); void setForcedState(MoveState forcedState); double getMoveSpeed(); void setMoveSpeed(double moveSpeed); static double DEFAULT_MOVE_SPEED; }