@Test public void testSpeedProperty() throws Exception { GameEventManager theEventManager = mock(GameEventManager.class); GameObject theOwner = mock(GameObject.class); SpriteBehaviorTemplate theTemplate = new SpriteBehaviorTemplate(theEventManager, theOwner); assertEquals("speed", theTemplate.speedProperty().getName()); assertFalse(theTemplate.speedProperty().isNull()); assertEquals(Integer.class, theTemplate.speedProperty().getType()); assertEquals(Integer.valueOf(5), theTemplate.speedProperty().get()); theTemplate.speedProperty().set(17); assertEquals(Integer.valueOf(17), theTemplate.speedProperty().get()); assertFalse(theTemplate.speedProperty().isNull()); }
@Override public Property<Integer> speedProperty() { return speed; }
SpriteBehaviorTemplate implements BehaviorTemplate<SpriteBehavior>, Sprite, Reflectable<SpriteClassInformation> { @Override public Property<Integer> speedProperty() { return speed; } }
SpriteBehaviorTemplate implements BehaviorTemplate<SpriteBehavior>, Sprite, Reflectable<SpriteClassInformation> { @Override public Property<Integer> speedProperty() { return speed; } SpriteBehaviorTemplate(GameEventManager aEventManager, GameObject aOwner); }
SpriteBehaviorTemplate implements BehaviorTemplate<SpriteBehavior>, Sprite, Reflectable<SpriteClassInformation> { @Override public Property<Integer> speedProperty() { return speed; } SpriteBehaviorTemplate(GameEventManager aEventManager, GameObject aOwner); @Override BehaviorType getType(); @Override SpriteClassInformation getClassInformation(); @Override GameObject getOwner(); @Override SpriteBehavior create(GameObjectInstance aInstance, GameRuntime aGameRuntime); @Override Property<Animation> currentAnimationProperty(); @Override Property<Integer> speedProperty(); void addAnimation(Animation aAnimation); @Override Map<String, Object> serialize(); @Override void delete(); @Override GameScene getGameScene(); @Override Animation[] getAnimations(); void replaceAnimation(Animation aOldAnimation, Animation aNewAnimation); static SpriteBehaviorTemplate deserialize(GameEventManager aEventManager, GameObject aOwner, Map<String, Object> aSerializedData); }
SpriteBehaviorTemplate implements BehaviorTemplate<SpriteBehavior>, Sprite, Reflectable<SpriteClassInformation> { @Override public Property<Integer> speedProperty() { return speed; } SpriteBehaviorTemplate(GameEventManager aEventManager, GameObject aOwner); @Override BehaviorType getType(); @Override SpriteClassInformation getClassInformation(); @Override GameObject getOwner(); @Override SpriteBehavior create(GameObjectInstance aInstance, GameRuntime aGameRuntime); @Override Property<Animation> currentAnimationProperty(); @Override Property<Integer> speedProperty(); void addAnimation(Animation aAnimation); @Override Map<String, Object> serialize(); @Override void delete(); @Override GameScene getGameScene(); @Override Animation[] getAnimations(); void replaceAnimation(Animation aOldAnimation, Animation aNewAnimation); static SpriteBehaviorTemplate deserialize(GameEventManager aEventManager, GameObject aOwner, Map<String, Object> aSerializedData); static final BehaviorType TYPE; }