Esempio n. 1
0
        private void AddStrenthFX(uint fxId)
        {
            //Debug.Log("@@@@@@@@AddStrenthFX(" + fxId+")");
            if (fxId == m_oldStrenthFXID)
            {
                return;
            }

            int fxResId = EquipSpecialEffectData.dataMap[(int)fxId].fxid;

            m_oldStrenthFXID = loadedStrengthenId;

            System.Collections.Generic.List <GameObject> listGo = GameObject.GetComponent <ActorParent>().WeaponObj;

            if (fxId != 0)
            {
                AssetCacheMgr.GetInstance("H_blade_01_fx_6.prefab", (name, id, obj) =>
                {
                    for (int i = 0; i < listGo.Count; ++i)
                    {
                        int index = i;
                        MFUIUtils.AttachWidget(((GameObject)obj).transform, listGo[index].transform);
                    }
                });
            }
            else
            {
            }
        }
Esempio n. 2
0
 public void SetUIDirty()
 {
     act = MFUIUtils.SafeDoAction(OgreMustDieTipViewManager.Instance, () =>
     {
         OgreMustDieTipViewManager.Instance.SetUIDirty();
     });
 }
Esempio n. 3
0
 public void SetUpgradeDialogTitle(string title)
 {
     m_strTitle = (string)MFUIUtils.SafeSetValue(WingUIUpgradeDialogViewManager.Instance, () =>
     {
         WingUIUpgradeDialogViewManager.Instance.SetUpgradeDialogTitle(title);
     }, title);
 }
Esempio n. 4
0
 public void SetUpgradeDialogNextLevel(string level)
 {
     m_strNextLevel = (string)MFUIUtils.SafeSetValue(WingUIUpgradeDialogViewManager.Instance, () =>
     {
         WingUIUpgradeDialogViewManager.Instance.SetUpgradeDialogNextLevel(level);
     }, level);
 }
Esempio n. 5
0
 public void SetUpgradeDialogProgressSize(float size)
 {
     m_fProgressSize = (float)MFUIUtils.SafeSetValue(WingUIUpgradeDialogViewManager.Instance, () =>
     {
         WingUIUpgradeDialogViewManager.Instance.SetUpgradeDialogProgressSize(size);
     }, size);
 }
Esempio n. 6
0
 public void SetUpgradeDialogStarNum(int num)
 {
     m_iStarNum = (int)MFUIUtils.SafeSetValue(WingUIUpgradeDialogViewManager.Instance, () =>
     {
         WingUIUpgradeDialogViewManager.Instance.SetUpgradeDialogStarNum(num);
     }, num);
 }
Esempio n. 7
0
 public void SetUpgradeDialogIcon(string imgName)
 {
     m_strImgName = (string)MFUIUtils.SafeSetValue(WingUIUpgradeDialogViewManager.Instance, () =>
     {
         WingUIUpgradeDialogViewManager.Instance.SetUpgradeDialogIcon(imgName);
     }, imgName);
 }
Esempio n. 8
0
 public void SetUpgradeDialogProgressText(string text)
 {
     m_strProgressText = (string)MFUIUtils.SafeSetValue(WingUIUpgradeDialogViewManager.Instance, () =>
     {
         WingUIUpgradeDialogViewManager.Instance.SetUpgradeDialogProgressText(text);
     }, text);
 }
Esempio n. 9
0
 public void SetUpgradeDialogCost(string cost)
 {
     m_strCost = (string)MFUIUtils.SafeSetValue(WingUIUpgradeDialogViewManager.Instance, () =>
     {
         WingUIUpgradeDialogViewManager.Instance.SetUpgradeDialogCost(cost);
     }, cost);
 }
Esempio n. 10
0
    public void PushOne(Action action, MFUIManager.MFUIID baseUI = MFUIManager.MFUIID.None,
                        uint pri = 0, string debugText = "")
    {
        MFUIQueueUnit unit = new MFUIQueueUnit()
        {
            UnitID       = ++m_nextUnitID,
            act          = action,
            UnitPriority = pri,
            BaseUIID     = baseUI
        };

        if (baseUI == MFUIManager.MFUIID.None)
        {
            MFUIUtils.MFUIDebug(string.Concat(debugText, " Run 1"));
            unit.JustDoIt();
        }
        else if (baseUI == MFUIManager.CurrentUI && !IsLocking)
        {
            MFUIUtils.MFUIDebug(string.Concat(debugText, " Run 2"));
            unit.JustDoIt();
        }
        else
        {
            MFUIUtils.MFUIDebug(string.Concat(debugText, " Run 3"));
            m_listUI.Add(unit);

            m_listUI = m_listUI.OrderByDescending(t => t.UnitPriority).ToList();
        }
    }
 public void SetUIDirty()
 {
     act = MFUIUtils.SafeDoAction(InvitFriendMessageBoxViewManager.Instance, () =>
     {
         InvitFriendMessageBoxViewManager.Instance.SetUIDirty();
     });
 }
Esempio n. 12
0
    public void RegisterGameObjectList(List <MFUIResourceReqInfo> list, System.Action callBack = null, bool preLoad = false)
    {
        for (int i = 0; i < list.Count; ++i)
        {
            if (!m_dictUIIDToUnInstanceObjCount.ContainsKey(list[i].id))
            {
                m_dictUIIDToUnInstanceObjCount.Add(list[i].id, 1);
            }
            else
            {
                ++m_dictUIIDToUnInstanceObjCount[list[i].id];
            }
        }

        for (int i = 0; i < list.Count; ++i)
        {
            if (m_dictGoNameToUIID.ContainsKey(list[i].goName))
            {
                MFUIUtils.MFUIDebug("Same GameObject Name Registered now will Replace it !");
            }

            m_dictGoNameToUIID[list[i].goName] = list[i].id;
            m_dictUIIDToCallBack[list[i].id]   = callBack;

            RegisterGameObject(list[i].id, list[i].path, list[i].goName, preLoad);
        }
    }
Esempio n. 13
0
 public void HideSelf()
 {
     actHideSelf = MFUIUtils.SafeDoAction(OgreMustDieTipViewManager.Instance, () =>
     {
         OgreMustDieTipViewManager.Instance.HideSelf();
     });
 }
Esempio n. 14
0
 public override void CallWhenHide()
 {
     //DisablePlayerModel();
     MFUIUtils.ShowGameObject(false, m_myGameObject);
     //MogoMainCamera.instance.SetActive(true);
     //MFUIGameObjectPool.GetSingleton().DestroyGameObject(m_myGameObject);
 }
    public override void CallWhenCreate()
    {
        AttachLogicUnit(NewChallengeUILogicManager.Instance);

        RegisterButtonHandler("NewChallengeUIClose");
        SetButtonClickHandler("NewChallengeUIClose", OnCloseUp);

        for (int i = 0; i < 4; ++i)
        {
            MFUIUtils.AttachWidget(MFUIGameObjectPool.GetSingleton().GetGameObject(string.Concat("NewChallengeUIGrid", i)).transform,
                                   GetTransform("NewChallengeUIGridListTop").transform);

            MFUIGameObjectPool.GetSingleton().GetGameObject(string.Concat("NewChallengeUIGrid", i)).transform.localPosition =
                new Vector3(m_fGridListStartPos + m_fGridListWidth * i, 0, 0);

            m_listNewChallengeGrid.Add(MFUIGameObjectPool.GetSingleton().GetGameObject(
                                           string.Concat("NewChallengeUIGrid", i)).AddComponent <NewChallengeGrid>());
        }

        for (int i = 0; i < 4; ++i)
        {
            MFUIUtils.AttachWidget(MFUIGameObjectPool.GetSingleton().GetGameObject(string.Concat("NewChallengeUIGrid", 4 + i)).transform,
                                   GetTransform("NewChallengeUIGridListBottom").transform);

            MFUIGameObjectPool.GetSingleton().GetGameObject(string.Concat("NewChallengeUIGrid", 4 + i)).transform.localPosition =
                new Vector3(m_fGridListStartPos + m_fGridListWidth * i, 0, 0);

            m_listNewChallengeGrid.Add(MFUIGameObjectPool.GetSingleton().GetGameObject(
                                           string.Concat("NewChallengeUIGrid", 4 + i)).AddComponent <NewChallengeGrid>());
        }
    }
Esempio n. 16
0
    private void SwitchUI(MFUIID targetUIID, MFUIID baseUIID              = MFUIID.None, uint pri = 0, bool isAttached = false,
                          MFUISwitchAnim.MFUISwitchAnimType switchInType  = MFUISwitchAnim.MFUISwitchAnimType.None,
                          MFUISwitchAnim.MFUISwitchAnimType switchOutType = MFUISwitchAnim.MFUISwitchAnimType.None)
    {
        if (CurrentUI == targetUIID)
        {
            return;
        }

        if (!DictUIIDToOBj.ContainsKey(targetUIID))
        {
            MFUIUtils.MFUIDebug("MFUIID Dictionary not contain Obj");
            return;
        }

        if (switchOutType != MFUISwitchAnim.MFUISwitchAnimType.None)
        {
            MFUISwitchAnimNode[] animNodeArr = DictUIIDToOBj[CurrentUI].GetComponentsInChildren <MFUISwitchAnimNode>(true);

            if (animNodeArr.Length > 0)
            {
                animNodeArr[0].Play(switchOutType);
            }
            else
            {
                DictUIIDToOBj[CurrentUI].AddComponent <MFUISwitchAnimNode>().Play(switchOutType);
            }
        }

        if (switchInType != MFUISwitchAnim.MFUISwitchAnimType.None)
        {
            MFUISwitchAnimNode[] animNodeArr = DictUIIDToOBj[targetUIID].GetComponentsInChildren <MFUISwitchAnimNode>(true);

            if (animNodeArr.Length > 0)
            {
                animNodeArr[0].Play(switchInType);
            }
            else
            {
                DictUIIDToOBj[targetUIID].AddComponent <MFUISwitchAnimNode>().Play(switchInType);
            }
        }

        //DictUIIDToOBj[CurrentUI].MFUIgameObject.GetComponentsInChildren<MFUISwitchAnimNode>(true)[0].Play(switchOutType);
        //DictUIIDToOBj[targetUIID].MFUIgameObject.GetComponentsInChildren<MFUISwitchAnimNode>(true)[0].Play(switchInType);
        //Debug.LogError(CurrentUI);
        //if (DictUIIDToOBj.ContainsKey(CurrentUI) && !isAttached)
        //{
        //    DictUIIDToOBj[CurrentUI].GetComponentsInChildren<MFUIUnit>(true)[0].Hide();
        //    //Debug.LogError(CurrentUI + " Hide");
        //}



        if (DictUIIDToOBj[targetUIID].GetComponentsInChildren <MFUIUnit>(true)[0].IsUIDirty())
        {
            DictUIIDToOBj[targetUIID].GetComponentsInChildren <MFUIUnit>(true)[0].Show();
        }
        //Debug.LogError(targetUIID + " Show");
    }
 public void SetTipText(string text)
 {
     m_strText = (string)MFUIUtils.SafeSetValue(BattlePassCardListUIViewManager.Instance, () =>
     {
         BattlePassCardListUIViewManager.Instance.SetTipText(text);
     }, text);
 }
Esempio n. 18
0
 public void SetUIDirty()
 {
     actDirty = MFUIUtils.SafeDoAction(WingUIBuyDialogViewManager.Instance, () =>
     {
         WingUIBuyDialogViewManager.Instance.SetUIDirty();
     });
 }
 public void StopCountDown()
 {
     m_actStopCountDown = MFUIUtils.SafeDoAction(BattlePassCardListUIViewManager.Instance, () =>
     {
         BattlePassCardListUIViewManager.Instance.StopCountDown();
     });
 }
 public void SetTipImg(int mark)
 {
     m_iMark = (int)MFUIUtils.SafeSetValue(BattlePassCardListUIViewManager.Instance, () =>
     {
         BattlePassCardListUIViewManager.Instance.SetTipImg(mark);
     }, mark);
 }
 public void SetFlipCount(int count)
 {
     m_flipCount = (int)MFUIUtils.SafeSetValue(BattlePassCardListUIViewManager.Instance, () =>
     {
         BattlePassCardListUIViewManager.Instance.SetFlipCount(count);
     }, count);
 }
Esempio n. 22
0
 public void SetUIDirty()
 {
     act = MFUIUtils.SafeDoAction(BattlePassUINoCardUIViewManager.Instance, () =>
     {
         BattlePassUINoCardUIViewManager.Instance.SetUIDirty();
     });
 }
 public void SetUIDirty()
 {
     actDirty = MFUIUtils.SafeDoAction(EquipFXUIViewManager.Instance, () =>
     {
         EquipFXUIViewManager.Instance.SetUIDirty();
     });
 }
 public override void CallWhenShow()
 {
     MFUIUtils.ShowGameObject(true, m_myGameObject);
     MenuUIViewManager.Instance.ShowAllEquipItem(false);
     MenuUIViewManager.Instance.ShowRefreshEquipFXBtn(true);
     MenuUIViewManager.Instance.ShowIconListMask(true);
     MogoMainCamera.instance.SetActive(false);
 }
Esempio n. 25
0
 public void ShowTipBuyBtn(bool isShow)
 {
     showTipUpgradeBtn = MFUIUtils.SafeDoAction(WingUIViewManager.Instance,
                                                () =>
     {
         WingUIViewManager.Instance.ShowTipBuyBtn(isShow);
     });
 }
 public void ShowResetBtn(bool isShow)
 {
     ShowResetBtnAct = MFUIUtils.SafeDoAction(WingUIPreviewInMarketUIViewManager.Instance,
                                              () =>
     {
         WingUIPreviewInMarketUIViewManager.Instance.ShowResetBtn(isShow);
     });
 }
 public void SetWingAttr(System.Collections.Generic.List <string> listAttr)
 {
     attrTotalList = (System.Collections.Generic.List <string>)MFUIUtils.SafeSetValue(WingUIPreviewInMarketUIViewManager.Instance,
                                                                                      () =>
     {
         WingUIPreviewInMarketUIViewManager.Instance.SetWingAttr(listAttr);
     }, listAttr);
 }
 /// <summary>
 /// 复活
 /// </summary>
 /// <param name="text"></param>
 /// <param name="isRevive"></param>
 public void SetRightReviveBtnText(string text)
 {
     m_strRightReviveBtnText = (string)MFUIUtils.SafeSetValue(EnterWaittingMessageBoxViewManager.Instance,
                                                              () =>
     {
         EnterWaittingMessageBoxViewManager.Instance.SetRightReviveBtnText(text);
     }, text);
 }
 public void SetLeftBtnEnable(bool isEnable)
 {
     m_actLeftBtnEnable = MFUIUtils.SafeDoAction(EnterWaittingMessageBoxViewManager.Instance,
                                                 () =>
     {
         EnterWaittingMessageBoxViewManager.Instance.SetLeftBtnEnable(isEnable);
     });
 }
Esempio n. 30
0
 public override void MFUIPress(bool isPressed)
 {
     if (!isPressed)
     {
         m_bIsDragging = false;
         MFUIUtils.SafeDoAction(DragCamera, () => { DragCamera.CameraMove(m_vec2Dir); });
     }
 }