예제 #1
0
    void ShowPageSelector()
    {
        if(currentStatePS == curPS.openingMenu)
        {
            timer += Time.deltaTime * timeToShowMenu;
            psObj[(int)psObjname.rootMenu].transform.localPosition =
                new Vector3(0, Mathf.Lerp(startPosDownerBG, startPosDownerBG + menuScaleY, Mathf.SmoothStep(0.0f, 1.0f, timer)), 0.5F);
            if(timer > timeToShowMenu)
                currentStatePS = curPS.openingPagS;
        }
        if(currentStatePS == curPS.openingPagS)
        {
            timer += Time.deltaTime * timeToShowPageSelector;
            psObj[(int)psObjname.rootUpPS].transform.localPosition =
                new Vector3(0, Mathf.Lerp(startPosUpperBG, startPosUpperBG-cameraSize.y, Mathf.SmoothStep(0.0f, 1.0f, timer-timeToShowMenu)), 1F);

            if(timer > timeToShowMenu + timeToShowPageSelector)
            {
                timer = 0;
                currentStatePS = curPS.opened;
            }
        }
    }
예제 #2
0
 public void Start()
 {
     currentStatePS = curPS._static;
     iconsSceneColor = psObj[(int)psObjname.iconsScene].GetComponent<UISprite>().color;
 }
예제 #3
0
 void ClosePageSelector()
 {
     if(currentStatePS == curPS.closingPagS)
     {
         timer += Time.deltaTime * timeToShowPageSelector;
         psObj[(int)psObjname.rootUpPS].transform.localPosition =
             new Vector3(0, Mathf.Lerp(startPosUpperBG-cameraSize.y, startPosUpperBG, Mathf.SmoothStep(0.0f, 1.0f, timer)), 1F);
         if(timer > timeToShowPageSelector)
         {
             currentStatePS = curPS.closingMenu;
         }
     }
     if(currentStatePS == curPS.closingMenu)
     {
         timer += Time.deltaTime * timeToShowMenu;
         psObj[(int)psObjname.rootMenu].transform.localPosition =
             new Vector3(0, Mathf.Lerp(startPosDownerBG + menuScaleY, startPosDownerBG, Mathf.SmoothStep(0.0f, 1.0f, timer-timeToShowPageSelector)), 0.5F);
         if(timer > timeToShowMenu + timeToShowPageSelector)
         {
             timer = 0;
             currentStatePS = curPS._static;
             TotalManager.Instance.PageSelectorEnabled(false);
             Buttons.Instance.ChangeStatusUI(true,true);
             Buttons.Instance.NextPrevButtons(true, true);
             ClickAndDragController.FingerState = EFingersState.NONE;
         }
     }
 }
예제 #4
0
 public void PressedButtonPageSelector(int id, bool reset = false)
 {
     if (id == SceneAnimationController.Instance.currStage)
     {
         currentStatePS = curPS.closingPagS;
         return;
     }
     SceneAnimationController.Instance.UpdateScenarioId(id);
     LoadPrevScene.Instance.RestoreAllParticipants(id, true);
     psObj[(int)psObjname.buttonsId].SetActive(false);
     currentStatePS = curPS.fadingIcons;
     StartCoroutine(LoadPrevScene.Instance.WaitForSceneLoaded(LoadedScene,true));
     psObj[(int)psObjname.selectScene].transform.localPosition = localPositionsSelectScene[id-1];
 }
예제 #5
0
    public void LoadingScene()
    {
        timer += Time.deltaTime*1.5F;
        if(timer > 1 && timer < 2)
            psObj[(int)psObjname.iconsScene].GetComponent<UISprite>().color =
                new Color(iconsSceneColor.r,iconsSceneColor.g,iconsSceneColor.b, 2 - timer);

            psObj[(int)psObjname.selectScene].renderer.material.color =
                new Color(iconsSceneColor.r,iconsSceneColor.g,iconsSceneColor.b, 2 - timer);

        if(timer > 2)
        {
            currentStatePS = curPS.startLoading;
            timer = 0;
        }
    }
예제 #6
0
 public void LoadedScene()
 {
     Debug.Log("LoadedScene");
     currentStatePS = curPS.fadeoutLoad;
     //SceneAnimationController.Instance.SetFinalParameters(false);
 }
예제 #7
0
 public void InvokeShowPageSelector()
 {
     timer = 0;
     currentStatePS = curPS.openingMenu;
     psObj[(int)psObjname.buttonsId].SetActive(true);
     psObj[(int)psObjname.iconsScene].GetComponent<UISprite>().color = iconsSceneColor;
     psObj[(int)psObjname.selectScene].renderer.material.color = iconsSceneColor;
     Buttons.Instance.ChangeStatusUI(false,true);
     ClickAndDragController.FingerState = EFingersState.LOCKED;
     Buttons.Instance.NextPrevButtons(false, true);
     psObj[(int)psObjname.selectScene].transform.localPosition = localPositionsSelectScene[SceneAnimationController.Instance.currStage-1];
 }
예제 #8
0
 public void InvokeClosePageSelector()
 {
     currentStatePS = curPS.closingPagS;
 }