Package org.seattlegamer.spacegame.core

Examples of org.seattlegamer.spacegame.core.Bus.register()


    Bus bus = bus();
    Collection<State> states = new LinkedList<State>();
    states.add(gameState());
    states.add(menuState());
    StateManager stateManager = new StateManager(states);
    bus.register(stateManager, null);
    bus.broadcast(new StateChange(MenuState.class));
    return stateManager;

  }
 
View Full Code Here


  }
 
  public @Bean GameLauncher gameLauncher() {
    Bus bus = bus();
    GameLauncher gameLauncher = new GameLauncher(bus(), gameState());
    bus.register(gameLauncher, null);
    return gameLauncher;
  }

  public @Bean Engine engine() {
    PropertiesAccessor propertiesAccessor = propertiesAccessor();
View Full Code Here

   
    UUID entityId = UUID.randomUUID();
   
    Foo fooOne = new Foo(bus, entityId);
   
    bus.register(fooOne, entityId);
    bus.send("blah", entityId);
   
    assertEquals("blah", fooOne.fooValue);
    fooOne.fooValue = null;
View Full Code Here

   
    UUID entityId = UUID.randomUUID();
   
    Bar bar = new Bar(bus, entityId);
   
    bus.register(bar, entityId);
    bus.broadcast("blah");
   
    assertEquals("blah", bar.fooValue);
    assertEquals("blah", bar.barValue);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.