Пример #1
0
    public static void SelectHexUnderMouse()
    {
        selectedHex = MouseInterface.hexUnderMouse;
        Vector3 positionn = HexCoordinatesSystem.HexToCartesianCords(MouseInterface.hexUnderMouse.hex_crds);

        select_reference.transform.position = positionn + new Vector3(0, 0.001f, 0);
    }
Пример #2
0
    void UpdateHighlight()
    {
        highlightedHex = MouseInterface.hexUnderMouse;
        Vector3 positionn = HexCoordinatesSystem.HexToCartesianCords(MouseInterface.hexUnderMouse.hex_crds);

        highlight_reference.transform.position = positionn + new Vector3(0, 0.001f, 0);
    }
Пример #3
0
    private static void GetMousePosOnMap()
    {
        Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition);

        float enter = 0.0f;

        if (plane.Raycast(ray, out enter))
        {
            mousePosOnMap = ray.GetPoint(enter);
            hexUnderMouse = new HexCords(HexCoordinatesSystem.CartesianToHexCords(mousePosOnMap));
        }
    }