Package framework.component.filter

Examples of framework.component.filter.ComponentPathFilter


    this.centreOfOrbitPath = path;
    this.isOrbitingPositionComponent = true;
    Component c = ComponentSystem.getInstance().getComponent(path);
    if(c != null && c.isType(PositionComponent.class)){
      centreOfOrbit = ((PositionComponent) c).getVector();
      EventSystem.getInstance().registerEventListener(this, "PositionChanged", new EventSenderComponentFilter(new ComponentPathFilter(path)));
    }
  }
View Full Code Here


  public CollisionComponent(CollisionMask mask){
    super();
    this.mask = mask;
    RelativeComponentPath posPath = new RelativeComponentPath(PositionComponent.class.getName(), this, 1, new int[]{0});
    ComponentFilter posFilter = new ComponentPathFilter(posPath);
    EventSystem.getInstance().registerEventListener(this, "PositionChanged", new EventSenderComponentFilter(posFilter));

    RelativeComponentPath orientPath = new RelativeComponentPath(OrientationComponent.class.getName(), this, 1, new int[]{0});
    ComponentFilter orientFilter = new ComponentPathFilter(orientPath);
    EventSystem.getInstance().registerEventListener(this, "OrientationChanged", new EventSenderComponentFilter(orientFilter));
  }
View Full Code Here

    return cursorParent;
  }

  private static void setUpEventListener(Component collis) {
    ComponentPath path = new AbsoluteComponentPath(collis);
    EventSenderComponentFilter filter = new EventSenderComponentFilter(new ComponentPathFilter(path));
    EventListener listener = generateCollisionListener();

    EventSystem.getInstance().registerEventListener(listener, "CollisionStarted", filter);
    EventSystem.getInstance().registerEventListener(listener, "CollisionStopped", filter);
    EventSystem.getInstance().registerEventListener(listener, "MouseReleased", null);
View Full Code Here

    }

    setOffsetFromOrigin(offsetFromOrigin);

    RelativeComponentPath orientPath = new RelativeComponentPath(OrientationComponent.class.getName(), this, 1, new int[]{0});
    ComponentFilter orientFilter = new ComponentPathFilter(orientPath);
    EventSystem.getInstance().registerEventListener(this, "OrientationChanged", new EventSenderComponentFilter(orientFilter));
  }
View Full Code Here

TOP

Related Classes of framework.component.filter.ComponentPathFilter

Copyright © 2018 www.massapicom. 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.