public Marble(Boolean b, float r, float c) { if (b) { position = new Vector3(GameFunctions.calcPos(r, c), 0); } else { position = new Vector3(GameFunctions.calcPos(r, c).X, 0, GameFunctions.calcPos(r, c).Y); } }
public bool isSelected(Vector2 point, int angle, int distance) { angle *= 45; if (GameFunctions.isTheSame(GameFunctions.calcPos(point), getPosition())) { return(true); } else if (GameFunctions.isTheSame((GameFunctions.calcPos(point) + distance * GameFunctions.Vector2FromAngle(angle)), getPosition())) { return(true); } else if (GameFunctions.isTheSame((2 * GameFunctions.calcPos(point) + distance * GameFunctions.Vector2FromAngle(angle)), 2 * getPosition())) { return(true); } else { return(false); } }