Ejemplo n.º 1
0
    void Update()
    {
        if (Input.GetMouseButtonDown(0))
        {
            Vector3 truecoords;
            truecoords = maincamera.ScreenToWorldPoint(Input.mousePosition);
            Vector2Int hexcoords = hexcalculator.MousePositionToHex(truecoords);

            text.text = "x=" + hexcoords.x + " y=" + hexcoords.y + "   ";

            HexProperties field;
            fieldcontroller.hexProperties.TryGetValue(hexcoords, out field);
            text.text += field.type;
        }
    }