@Test public void testReset() { Actor actor = new Actor("Actor"); world.getWorldObjects().add(actor); world.update(); Angle angle = new Angle(0.0, Angle.FRONT); actor.setAngle(angle); actor.postUpdate(); EventStack stack = actor.getEventStack(StateChangeStack.STACK_NAME); Assert.assertNotNull(stack); Assert.assertTrue(stack instanceof StateChangeStack); Assert.assertEquals(((StateChangeStack) stack).getStateChanges().get(1).angle, angle); }
@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; }