예제 #1
0
  /**
   * Add a component to the Entity and set its parent to the Entity The Component should not be
   * owned by another Component, it could get messy!
   */
  public final void addComponent(final Component _component) {
    _component.setParent(this);
    components.add(_component);

    final EventController controller = _component.getComponentEventController();
    controller.setAddEventInterface(eventSystem);
    eventSystem.addEventHandler(controller);
  }
예제 #2
0
 /** Convienience method to EventController's passEvent. */
 public void passEvent(final Event _event) {
   eventController.passEvent(_event);
 }
예제 #3
0
 public void update(final float _dt) {
   super.update(_dt);
   eventController.update();
 }