예제 #1
0
 public void CloseWind()
 {
     if (WindObj.activeSelf)
     {
         WindObj.SetActive(false);
     }
 }
예제 #2
0
 public void ShowWind()
 {
     if (!WindObj.activeSelf)
     {
         WindObj.SetActive(true);
     }
 }
예제 #3
0
 public void ShutHide()
 {
     if (WindObj != null)
     {
         WindObj.SetActive(false);
     }
 }
예제 #4
0
    public bool ShowLoadingMessage()
    {
        if (WindObj == null)
        {
            return(false);
        }
        else if (MessageLoading == false)
        {
            MessageLoading = true;
            if (!WindObj.activeSelf)
            {
                WindObj.SetActive(true);
            }
            if (!m_MessageWind[0].activeSelf)
            {
                m_MessageWind[0].SetActive(true);
            }

            if (m_MessageWind[1].activeSelf)
            {
                WndManager.Instance.Pop(BaseTranF);
                m_MaskObj.SetActive(false);
                m_MessageWind[1].SetActive(false);
            }

            return(true);
        }
        else
        {
            return(true);
        }
    }
예제 #5
0
    public System.Collections.IEnumerator InitGameObj(object objtype)
    {
        InfmationWind WindType = (InfmationWind )objtype;

        m_bInit = true;
        if (WindObj != null)
        {
            WindObj.SetActive(true);
            for (byte i = 0; i < 4; ++i)
            {
                if (i == (byte)WindType)
                {
                    m_TopBtns[i].m_IsChecked = true;
                }
                else
                {
                    m_TopBtns[i].m_IsChecked = false;
                }
            }
        }
        else
        {
            Init_GameObj();
            WindObj.SetActive(false);
            yield return(new WaitForEndOfFrame());

            m_SmailBg[0] = BaseTranF.GetChild(1).GetChild(0).gameObject;
            for (byte i = 0; i < 2; ++i)
            {
                m_SmailBg[i + 1] = m_SmailBg[0].transform.GetChild(i).gameObject;
            }
            InitTopBtns(WindType); yield return(new WaitForEndOfFrame());

            InitAchievement(); yield return(new WaitForEndOfFrame());

            InitUserInf(); yield return(new WaitForEndOfFrame());

            InitTask(); yield return(new WaitForEndOfFrame());

            InitRank(); yield return(new WaitForEndOfFrame());

            InitChangeHead(); yield return(new WaitForEndOfFrame());

            InitChangeUserInf(); yield return(new WaitForEndOfFrame());
        }
        ExchangeTopBtnsBg();
        m_bInit = false;
        yield break;
    }
예제 #6
0
 void ShutDown()
 {
     if (WindObj != null && WindObj.activeSelf)
     {
         for (byte i = 0; i < m_ChildMsgObj.Length; ++i)
         {
             m_ChildMsgObj[i].SetActive(false);
         }
         WndManager.Instance.Pop(BaseTranF);
         WindObj.SetActive(false);
         if (m_MaskObj.activeSelf)
         {
             m_MaskObj.SetActive(false);
         }
     }
 }
예제 #7
0
    public new void Init()
    {
        if (WindObj != null)
        {
            return;
        }
        Object obj = Resources.Load("InnerRes/ui/Inner_MessageWind");

        SetParent(((GameObject)GameObject.Instantiate(obj)).transform);
        InitLoading();
        if (WindObj.activeSelf)
        {
            WindObj.SetActive(false);
        }
        InitBoxMessage();
    }
예제 #8
0
    public void InitGameObject()
    {
        if (WindObj == null)
        {
            WindObj   = GameObject.Instantiate(Obj) as GameObject;
            BaseTranF = WindObj.transform;
            BaseTranF.SetParent(SceneObjMgr.Instance.UIPanelTransform, false);
            WindObj.SetActive(true);
            WndManager.Instance.Push(WindObj);
        }
        m_ScaleTran = BaseTranF.GetChild(0);
        m_ActivityDetail.m_DetailObj   = m_ScaleTran.GetChild(2).gameObject;
        m_ActivityDetail.m_DetailLabel = m_ScaleTran.GetChild(2).GetComponent <UILabel>();
        GetBtnLister(m_ScaleTran.GetChild(1).gameObject).onClick = OnClickActivityDetail;
        GetBtnLister(m_ScaleTran.GetChild(8).gameObject).onClick = OnClickCloseWind;

        for (byte i = 0; i < (byte)ActivityType.ActivityMax_Num; ++i)
        {
            m_ActivityTitle[i] = m_ScaleTran.GetChild(0).GetChild(i).gameObject;

            m_ActivityBtn[i].m_BtnObj = m_ScaleTran.GetChild(3).GetChild(i).gameObject;
            m_ActivityBtn[i].m_BtnBg  = m_ScaleTran.GetChild(3).GetChild(i).GetChild(0).GetComponent <UISprite>();
            m_ActivityBtn[i].m_BtnBg2 = m_ActivityBtn[i].m_BtnBg.transform.GetChild(0).GetComponent <UISprite>();
            m_ActivityBtn[i].m_Tag    = i;
            if (i == (byte)ActivityType.LevelActivity_UI)
            {
                m_ActivityBtn[i].m_IsChecked = true;
            }
            else
            {
                m_ActivityBtn[i].m_IsChecked = false;
            }
            GetBtnLister(m_ActivityBtn[i].m_BtnObj).onClick = OnChangeActivityWnd;

            m_WarningObj[i] = m_ScaleTran.GetChild(3).GetChild(4 + i).gameObject;
        }
        m_bTimeLimitExist = m_ActivityTimeLimitWnd.CheckActivityIsExist();
        SetInitalWnd();
        //ExchangeLeftBtnBg();
        InitActivity();
        // m_ActivityRewardWnd.Init(BaseTranF.GetChild(8).gameObject);
    }
예제 #9
0
    public void ShowMessageBox(string strMsg, MssageType type, byte RoomID = 0, uint ExData = 0)
    {
        if (WindObj == null)
        {
            return;
        }
        if (m_ChildMsgObj[2].activeSelf == true && type == MssageType.Exit_Msg_5)
        {
            ShutDown();
            return;
        }
        for (byte i = 0; i < m_ChildMsgObj.Length; ++i)
        {
            if (m_ChildMsgObj[i].activeSelf == true)
            {
                ShutDown();
            }
        }
        WndManager.Instance.Push(BaseTranF);
        m_MsgType = type;
        m_RoomID  = RoomID;
        WindObj.SetActive(true);
        m_MaskObj.SetActive(true);
        m_MessageWind[1].SetActive(true);
        m_NormalPopAnim.ResetToBeginning();
        m_NormalPopAnim.PlayForward();
        //for (byte i = 0; i < m_ChildMsgObj.Length; ++i)
        //{
        //    m_ChildMsgObj[i].SetActive(false);
        //}

        switch (type)
        {
        case MssageType.PayScuess_Mag_0:                     //
        {
            m_ChildMsgObj[0].SetActive(true);
            m_MsgBoxLabel[0].text = "[242858FF]" + strMsg + "[-]";
            break;
        }

        case MssageType.GameRoom_Msg_1:
        {
            m_ChildMsgObj[0].SetActive(true);
            m_MsgBoxLabel[0].text = "[242858FF]" + strMsg + "[-]";
            break;
        }

        case MssageType.GameRoom_Msg_2:
        {
            m_ChildMsgObj[1].SetActive(true);
            m_MsgBoxLabel[1].text = "[242858FF]" + strMsg + "[-]";
            break;
        }

        case MssageType.GameRoom_Msg_3:
        {
            m_ChildMsgObj[0].SetActive(true);
            GetDstUnlockRateConsume(strMsg);
            break;
        }

        case MssageType.GoldLack_Msg_4:
        {
            m_ChildMsgObj[0].SetActive(true);
            string strDec = "";
            if (strMsg == "金币")
            {
                strDec    = string.Format(StringTable.GetString("Ec_RoleCharm_GlodNotEnough"), strMsg);
                m_Paytype = PayType.Gold;
            }
            else if (strMsg == "钻石")
            {
                strDec    = string.Format(StringTable.GetString("Ec_RoleCharm_GlodNotEnough"), strMsg);
                m_Paytype = PayType.Diamond;
            }
            m_MsgBoxLabel[0].text = "[242858FF]" + strDec + "[-]";
            break;
        }

        case MssageType.Exit_Msg_5:
        {
            m_ChildMsgObj[2].SetActive(true);
            m_MsgBoxLabel[2].text = "[242858FF]" + strMsg + "[-]";
            break;
        }

        case MssageType.BeneFit_Msg_6:
        {
            m_ChildMsgObj[0].SetActive(true);
            m_MsgBoxLabel[0].text = strMsg;
            break;
        }

        case MssageType.VIP_UnLock_Msg_7:
        {
            m_ChildMsgObj[0].SetActive(true);
            m_MsgBoxLabel[0].text = strMsg;
            break;
        }

        case MssageType.NiuNiu_Exit_Tips:
        {
            m_ChildMsgObj[2].SetActive(true);
            m_MsgBoxLabel[2].text = "[242858FF]" + strMsg + "[-]";
            break;
        }

        case MssageType.NiuNiu_UpHostFail_Tips:
        {
            m_ChildMsgObj[2].SetActive(true);
            m_MsgBoxLabel[2].text = "[242858FF]" + strMsg + "[-]";
            break;
        }

        case MssageType.NiuNiu_SantchHost_Tips:
        {
            m_ChildMsgObj[0].SetActive(true);
            m_MsgBoxLabel[0].text = "[242858FF]" + strMsg + "[-]";
            break;
        }

        case MssageType.Del_Friend_Msg:
        {
            m_UserID = ExData;
            m_ChildMsgObj[0].SetActive(true);
            m_MsgBoxLabel[0].text = "[242858FF]" + strMsg + "[-]";
            break;
        }

        case MssageType.ForestDance_SnatchHost_Tips:
        {
            m_ChildMsgObj[0].SetActive(true);
            m_MsgBoxLabel[0].text = "[242858FF]" + strMsg + "[-]";
            break;
        }

        case MssageType.ForestDance_Exit_Tips:
        {
            m_ChildMsgObj[2].SetActive(true);
            m_MsgBoxLabel[2].text = "[242858FF]" + strMsg + "[-]";
            break;
        }

        case MssageType.Car_SantchHost_Tips:
        {
            m_ChildMsgObj[0].SetActive(true);
            m_MsgBoxLabel[0].text = "[242858FF]" + strMsg + "[-]";
            break;
        }

        case MssageType.Car_Exit_Tips:
        {
            m_ChildMsgObj[2].SetActive(true);
            m_MsgBoxLabel[2].text = "[242858FF]" + strMsg + "[-]";
            break;
        }
        }
    }