Esempio n. 1
0
    private void UpdateMapHeight()
    {
        var callsettextvalues = false;

        if (oldMapHeight != mapHeight.value)
        {
            Debug.Log("Map height changed to " + mapHeight.value);
            var diffv = new Vector3(0, mapHeight.value - oldMapHeight, 0);
            sman.CorrectPositionDiff(diffv);
            oldMapHeight      = mapHeight.value;
            callsettextvalues = true;
        }
        if (oldMapRotate != mapRotate.value)
        {
            Debug.Log("Map rotation changed to " + mapRotate.value);
            var diff = mapRotate.value - oldMapRotate;
            sman.CorrectAngle(diff);
            oldMapRotate      = mapRotate.value;
            callsettextvalues = true;
        }
        if (oldMapXval != mapXval.value)
        {
            Debug.Log("Map Xval changed to " + mapXval.value);
            var diffv = new Vector3(mapXval.value - oldMapXval, 0, 0);
            sman.CorrectPositionDiff(diffv);
            oldMapXval        = mapXval.value;
            callsettextvalues = true;
        }
        if (oldMapZval != mapZval.value)
        {
            Debug.Log("Map Zval changed to " + mapZval.value);
            var diffv = new Vector3(0, 0, mapZval.value - oldMapZval);
            sman.CorrectPositionDiff(diffv);
            oldMapZval        = mapZval.value;
            callsettextvalues = true;
        }
        if (callsettextvalues)
        {
            SetTextValues();
            sman.RequestRefresh("MapFitPanel-updateMapHeight");
            SetTextValues();
        }
    }