Пример #1
0
    void Update()
    {
        //Set the position of the hexagonFrame to the selected Hexagon
        if ((CameraController.instance.isMoving) || (mousePosition.x != Input.mousePosition.x) || (mousePosition.y != Input.mousePosition.y))
        {
            //If the player selects no hexagon the position is RayCastManager.noResult
            hexagonFrame.transform.position = RayCastManager.getWorldCoordsRaycast("Hexagon");
            selectedPosition = hexagonFrame.transform.position;
        }

        mousePosition = Input.mousePosition;
    }