Пример #1
0
 public static IntPosition WorldToBoardIntPosition(Vector3 vec)
 {
     return(new IntPosition(Units.WorldToBoardX(vec.x), Units.WorldToBoardZ(vec.z)));
 }
Пример #2
0
        public static IntPosition WorldToBoardIntDeployPosition(Vector3 vec)
        {
            IntPosition boardPosition = new IntPosition(Units.WorldToBoardX(vec.x), Units.WorldToBoardZ(vec.z));

            return(Units.NormalizeDeployPosition(boardPosition));
        }
Пример #3
0
 public static SizeComponent SizeCompFromWorld(int worldWidth, int worldDepth)
 {
     return(new SizeComponent(Units.WorldToBoardX((float)worldWidth), Units.WorldToBoardZ((float)worldDepth)));
 }
Пример #4
0
 public static SizeComponent SizeCompFromGrid(int gridWidth, int gridDepth)
 {
     return(new SizeComponent(Units.GridToBoardX(gridWidth), Units.GridToBoardZ(gridDepth)));
 }
Пример #5
0
 public static Vector3 BoardToWorldVec(IntPosition position)
 {
     return(Units.BoardToWorldVec(position, 0f));
 }
Пример #6
0
 public static Vector3 BoardToWorldVec(IntPosition position, float yPosition)
 {
     return(new Vector3(Units.BoardToWorldX(position.x), yPosition, Units.BoardToWorldZ(position.z)));
 }