Пример #1
0
 public void ShowRebornCD(int rebornCD)
 {
     gameObject.SetActive(true);
     UITweener[] tweeners = spRebornCD.GetComponents <UITweener>();
     for (int i = 0; i < tweeners.Length; i++)
     {
         tweeners[i].ResetToBeginning();
         tweeners[i].enabled = true;
     }
     if (Camera.main.GetComponent <UIDraggableCamera>() != null)
     {
         UIDraggableCamera dc = GetComponentInChildren <UIDragCamera>().draggableCamera = Camera.main.GetComponent <UIDraggableCamera>();
         dc.scale = 0.01f * Vector2.one;
         if (SceneBaseManager.instance.sceneType == SceneType.MB1 || SceneBaseManager.instance.sceneType == SceneType.Dungeons_MB1)
         {
             dc.SetDragBounds(20, -20, -6, -10, 0);
         }
         else if (SceneBaseManager.instance.sceneType == SceneType.MB3)
         {
             dc.SetDragBounds(-22, -58, -2, -15, 5);
         }
     }
     cd = CDTimer.GetInstance().AddCD(1, (int count, long id) =>
     {
         //laRebornCD.text = string.Format(Localization.Get("RebornCD"), count);
         laRebornCD.text = count.ToString();
     }, rebornCD + 1, true);
     cd.OnRemove += (int count, long id) =>
     {
         spRebornCD.alpha = 0f;
         spRebornCD.transform.localScale    = new Vector3(0.1f, 1f, 1f);
         spRebornCD.transform.localPosition = new Vector3(0f, -350f, 0f);
         gameObject.SetActive(false);
     };
 }
Пример #2
0
    void Awake()
    {
        instance = this;
        if (SceneManager.GetActiveScene().name == "Loding")
        {
            return;
        }
        else
        {
            if (transform.Find("ArenaDragCam") != null)
            {
                ArenaDragCam = transform.Find("ArenaDragCam").gameObject;
                if (Camera.main.GetComponentInChildren <UIDraggableCamera>() != null)
                {
                    UIDraggableCamera dc = ArenaDragCam.GetComponentInChildren <UIDragCamera>().draggableCamera = Camera.main.GetComponentInChildren <UIDraggableCamera>();
                    if (GameLibrary.SceneType(SceneType.PVP3))
                    {
                        dc.SetDragBounds(8.25f, 2, 2, 0.78f, -90);
                    }
                    else
                    {
                        dc.SetDragBounds(20, -20, 20, -20);
                    }
                }
            }

            bloodScreen = transform.FindChild("PanelUIEffects/GamePromptPanel/UIBloodScreen").gameObject;
            // ACTCounter = transform.FindChild("ACTCounter").gameObject;

            if (transform.FindChild("TaskBubble") != null)
            {
                taskBubble = transform.FindChild("TaskBubble").gameObject;
            }

            SwitchBloodScreen(false);

            tas = laChubingCD.GetComponents <TweenAlpha>();

            FlopCardPanel   = AddUIGo(GameLibrary.UIFlopCardPanel).GetComponent <FlopPanel>();
            MobaStatInfoGo  = AddUIGo(GameLibrary.UIMobaStatInfo);
            arenaWinPanel   = AddUIGo(GameLibrary.UIArenaWinPanel).GetComponent <UIArenaWinPanel>();
            startGamePrompt = AddUIGo(GameLibrary.UIGamePromptPanel);

            if (Globe.isFightGuide)
            {
                AddUIGo("GuideMask");
            }

            if (null != SceneBaseManager.instance)
            {
                if (SceneBaseManager.instance.sceneType == SceneType.FD_LG)
                {
                    Control.ShowGUI(UIPanleID.UITaskTracker, EnumOpenUIType.DefaultUIOrSecond);
                    Control.ShowGUI(UIPanleID.UIDeadToReborn, EnumOpenUIType.DefaultUIOrSecond);
                    Control.ShowGUI(UIPanleID.UITaskEffectPanel, EnumOpenUIType.DefaultUIOrSecond);
                }
                ShowUIByScene(SceneBaseManager.instance.sceneType);
            }
        }
    }