示例#1
0
    protected override void OnEnable()
    {
        base.OnEnable();
        base.SetAsLastSibling();
        this.mData = DataReader <KuangCheDiTuPeiZhi> .Get(TramcarUI.LastSelectMapId);

        FriendManager.Instance.SendRefreshBuddyInfo();
        this.RefreshFriendList();
    }
示例#2
0
    protected override void OnEnable()
    {
        base.OnEnable();
        base.SetAsLastSibling();
        this.mData = DataReader <KuangCheDiTuPeiZhi> .Get(TramcarUI.LastSelectMapId);

        if (this.mData != null)
        {
            this.mTxMapName.set_text(GameDataUtils.GetChineseContent(this.mData.name, false));
        }
        TramcarManager.Instance.SendOpenGrabPanelReq(TramcarUI.LastSelectMapId);
    }
示例#3
0
 private HuntMapItem CreateMapItem(KuangCheDiTuPeiZhi data)
 {
     if (data != null)
     {
         GameObject instantiate2Prefab = ResourceManager.GetInstantiate2Prefab("HuntMapItem");
         UGUITools.SetParent(this.mMapContent, instantiate2Prefab, false);
         instantiate2Prefab.set_name("map" + data.id);
         HuntMapItem component = instantiate2Prefab.GetComponent <HuntMapItem>();
         component.SetData(data.id, data.minLv, data.maxLv, data.name, data);
         component.EventHandler = new Predicate <HuntMapItem>(this.OnClickCity);
         instantiate2Prefab.SetActive(true);
         this.mMapList.Add(component);
         return(component);
     }
     return(null);
 }
示例#4
0
    private void OnTramcarLootChangeNty(int times = 0)
    {
        if (TramcarManager.Instance.IsProtecting)
        {
            this.mTxLootTimes.set_text("护送成功奖励:");
            KuangCheDiTuPeiZhi kuangCheDiTuPeiZhi = DataReader <KuangCheDiTuPeiZhi> .Get(TramcarManager.Instance.CurMapId);

            if (kuangCheDiTuPeiZhi != null)
            {
                this.CreateOtherReward(kuangCheDiTuPeiZhi.frienddropID);
            }
            this.mTxTramcarTips1.get_gameObject().SetActive(false);
            this.mTxTramcarTips2.get_gameObject().SetActive(false);
        }
        else if (TramcarManager.Instance.CurLootQulity > 0)
        {
            this.mTxLootTimes.set_text("抢夺成功随机获得:");
            KuangCheDiTuPeiZhi kuangCheDiTuPeiZhi2 = DataReader <KuangCheDiTuPeiZhi> .Get(TramcarManager.Instance.CurMapId);

            if (kuangCheDiTuPeiZhi2 != null)
            {
                this.CreateOtherReward(kuangCheDiTuPeiZhi2.faightdropID);
            }
            this.mTxTramcarTips1.get_gameObject().SetActive(false);
            this.mTxTramcarTips2.get_gameObject().SetActive(false);
        }
        else
        {
            this.mTxLootTimes.set_text(string.Format("被抢夺次数:<color=#5ce228>{0}/{1}</color>", times, TramcarManager.Instance.BeLootLimit));
            if (TramcarManager.Instance.TramcarRewards != null)
            {
                this.CreateSelfReward(TramcarManager.Instance.TramcarRewards, (float)(100 - TramcarManager.Instance.LootDeduct * times) * 0.01f);
            }
            this.mTxTramcarTips1.get_gameObject().SetActive(true);
            this.mTxTramcarTips2.get_gameObject().SetActive(true);
        }
    }