Beispiel #1
0
        public IEnumerator ShowDialog(string line1, string line2, string line3, string line4, string line5)
        {
            yield return(null);

            if (calcFunctions)
            {
                if (PersistentEngine.IsMobileScreen())
                {
                    defBgPos.y = (-advCamera.cameraSize + defCamSizeForCalc) * multiplierSmall;
                }
                else
                {
                    defBgPos.y = (-advCamera.cameraSize + defCamSizeForCalc) * multiplierLarge;
                }
                offsetBackground = (advCamera.cameraSize - defCamSizeForCalc) * secondMultiplier + addedOffest;
            }

            SetEnabled(true);

            SetLines(line1, line2, line3, line4, line5);
            lineSelected = -1;

            while (lineSelected == -1)
            {
                yield return(new WaitForSeconds(0.5f));
            }

            SetEnabled(false);
        }
Beispiel #2
0
 public void recalculateHiddenOffset()
 {
     if (advCamera)
     {
         hiddenOffset = 0.35f * advCamera.cameraSize / advCamera.transform.localScale.x;
         if (PersistentEngine.IsMobileScreen())
         {
             hiddenOffset = hiddenOffset * 1.5f;
         }
         if (positionOk && isHidden)
         {
             positionOffset = new Vector3(-hiddenOffset, positionOffset.y, 0);
         }
     }
 }
Beispiel #3
0
 void tryLines2()
 {
     if (calcFunctions)
     {
         if (PersistentEngine.IsMobileScreen())
         {
             defBgPos.y = (-advCamera.cameraSize + defCamSizeForCalc) * multiplierSmall;
         }
         else
         {
             defBgPos.y = (-advCamera.cameraSize + defCamSizeForCalc) * multiplierLarge;
         }
         offsetBackground = (advCamera.cameraSize - defCamSizeForCalc) * secondMultiplier + addedOffest;
     }
     StartCoroutine(ShowDialog("test1", "test2", "", "", ""));
 }
Beispiel #4
0
        // Use this for initialization
        void Start()
        {
            advCamera = PersistentEngine.advCamera;
            float cameraSize = 4;

            if (advCamera)
            {
                cameraSize = advCamera.cameraSize;
            }
            else
            {
                cameraSize = PersistentEngine.activeCamera.fieldOfView;
            }

            textStrings         = new string[5];
            colorSelected       = new Color32(255, 168, 48, 255);
            colorIdle           = new Color32(255, 243, 197, 255);
            colorShadowSelected = new Color32(32, 53, 63, 255);
            colorShadowIdle     = new Color32(13, 63, 81, 255);
            bg       = background.transform.parent.transform;
            defBgPos = bg.transform.localPosition;
            if (calcFunctions)
            {
                if (PersistentEngine.IsMobileScreen())
                {
                    defBgPos.y = (-cameraSize + defCamSizeForCalc) * multiplierSmall;
                }
                else
                {
                    defBgPos.y = (-cameraSize + defCamSizeForCalc) * multiplierLarge;
                }
                offsetBackground = (cameraSize - defCamSizeForCalc) * secondMultiplier + addedOffest;
            }

            defTextPosKrat = textPosKrat;
            defTextPosPlus = textPosPlus;
            SetEnabled(false);

            shadowOffsetLeft  *= cameraSize / 0.93f;
            shadowOffsetLeft1 *= cameraSize / 0.93f;
            shadowOffsetLeft2 *= cameraSize / 0.93f;
            shadowOffsetDown  *= cameraSize / 0.93f;
            shadowOffsetDown1 *= cameraSize / 0.93f;
            shadowOffsetDown2 *= cameraSize / 0.93f;
        }