public void disconnect(string id) { if (mDestination == null) return; if (id == mDestination.getID()) { if (mIsSelected) mDestination.unlight(); mDestination = null; } }
public void connect(IConnectable door) { if (door == null) return; PlaceableTeleporterDoor tDoor = door as PlaceableTeleporterDoor; if (tDoor == null) return; if (mDestination != null) disconnect(mDestination.getID()); if (mIsSelected) tDoor.highlight(Color.yellow); mDestination = tDoor; }