public static IntPosition WorldToBoardIntPosition(Vector3 vec) { return(new IntPosition(Units.WorldToBoardX(vec.x), Units.WorldToBoardZ(vec.z))); }
public static IntPosition WorldToBoardIntDeployPosition(Vector3 vec) { IntPosition boardPosition = new IntPosition(Units.WorldToBoardX(vec.x), Units.WorldToBoardZ(vec.z)); return(Units.NormalizeDeployPosition(boardPosition)); }
public static SizeComponent SizeCompFromWorld(int worldWidth, int worldDepth) { return(new SizeComponent(Units.WorldToBoardX((float)worldWidth), Units.WorldToBoardZ((float)worldDepth))); }
public static SizeComponent SizeCompFromGrid(int gridWidth, int gridDepth) { return(new SizeComponent(Units.GridToBoardX(gridWidth), Units.GridToBoardZ(gridDepth))); }
public static Vector3 BoardToWorldVec(IntPosition position) { return(Units.BoardToWorldVec(position, 0f)); }
public static Vector3 BoardToWorldVec(IntPosition position, float yPosition) { return(new Vector3(Units.BoardToWorldX(position.x), yPosition, Units.BoardToWorldZ(position.z))); }