Exemple #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);
  }
 /** Convienience method to EventController's passEvent. */
 public void passEvent(final Event _event) {
   eventController.passEvent(_event);
 }
 public void update(final float _dt) {
   super.update(_dt);
   eventController.update();
 }