Class Helper

java.lang.Object
de.tum.cit.ase.editor.utlis.Helper

public class Helper extends Object
The Helper class provides utility methods for converting between Vector2 and GridPoint2 objects.
  • Constructor Details

    • Helper

      public Helper()
  • Method Details

    • convertVector2ToGridPoint

      public static com.badlogic.gdx.math.GridPoint2 convertVector2ToGridPoint(com.badlogic.gdx.math.Vector2 vector2)
      Converts a Vector2 object to a GridPoint2 object.
      Parameters:
      vector2 - the Vector2 object to convert
      Returns:
      the converted GridPoint2 object
    • convertGridPointToVector2

      public static com.badlogic.gdx.math.Vector2 convertGridPointToVector2(com.badlogic.gdx.math.GridPoint2 gridPoint2)
      Converts a GridPoint2 object to a Vector2 object.
      Parameters:
      gridPoint2 - the GridPoint2 object to convert
      Returns:
      the converted Vector2 object
    • cloneGrid

      public static TileTypes[][] cloneGrid(TileTypes[][] gridToCLone)
      Clones a 2D grid of TileTypes.
      Parameters:
      gridToCLone - the grid to clone
      Returns:
      the cloned grid