public boolean hit() { for (GameObject g : touchingObjects) { if (!touchingObjectsLast.contains(g)) { return true; } } return false; }
public boolean hitComponent(String compName) { for (GameObject g : touchingObjects) { if (g.components.get(compName) != null && !touchingObjectsLast.contains(g)) return true; } return false; }
public boolean hitProperty(String propName) { for (GameObject g : touchingObjects) { if (g.props.containsKey(propName) && !touchingObjectsLast.contains(g)) return true; } return false; }
public boolean hit(String name) { for (GameObject g : touchingObjects) { if (g.name().equals(name) && !touchingObjectsLast.contains(g)) return true; } return false; }