示例#1
0
    void OnAwardBoxBtn(GameObject go)
    {
        foreach (AwardBoxInfo item in m_awardBoxInfos)
        {
            if (item.goAwardBoxBtn == go)
            {
                if (item.goAwardBoxBtn.GetComponent <UIButton>().isEnabled&& item.needSocre <= m_curScore)
                {
                    CliProto.CS_GIFT_DAY_BOX_REQ netMsg = new CliProto.CS_GIFT_DAY_BOX_REQ();
                    netMsg.m_BoxID = item.awardBoxId;
                    SDNetGlobal.SendMessage(netMsg);


                    sdUICharacter.Instance.ShowSuccessPanel();
                    //sdUICharacter.Instance.ShowMsgLine("恭喜你获得奖励!", Color.white);
                }
                else if (item.finished)
                {
                    sdUICharacter.Instance.ShowMsgLine("你已经领过了!", Color.white);
                }
                else
                {
                    sdUICharacter.Instance.ShowMsgLine("达到" + item.needSocre.ToString() +
                                                       "积分才能领取哟!", Color.white);
                }
            }
        }
    }
示例#2
0
    void OnGetAwardBtn(GameObject go)
    {
        CliProto.CS_GIFT_DAY_BOX_REQ netMsg = new CliProto.CS_GIFT_DAY_BOX_REQ();
        netMsg.m_BoxID = m_awardBoxId;
        SDNetGlobal.SendMessage(netMsg);

        ClosePanel();
    }
示例#3
0
 void OnGetAwardBtn(GameObject go)
 {
     if (go.GetComponent <UIButton>().isEnabled)
     {
         CliProto.CS_GIFT_DAY_BOX_REQ netMsg = new CliProto.CS_GIFT_DAY_BOX_REQ();
         netMsg.m_BoxID = m_awardBoxId;
         SDNetGlobal.SendMessage(netMsg);
         ClosePanel();
     }
     else
     {
         sdUICharacter.Instance.ShowMsgLine("无法领取", Color.white);
     }
 }