public static tile placeInstance(tile proto, Vector2 pos, world parWorld) { tile t = parWorld.getTileAt((int)pos.x, (int)pos.y); t.tileType = proto.tileType; t.baseType = proto.baseType; t.parentWorld = parWorld; t.position = pos; if (t.onSetCB != null) { t.onSetCB(t); // calls the callback } return(t); }