Beispiel #1
0
 /// <summary>
 /// 试用翅膀弹窗
 /// </summary>
 void Refresh()
 {
     if (GameCenter.wingMng.WingDic.Count != 0)
     {
         GameCenter.uIMng.ReleaseGUI(GUIType.TRIALWING);
         GameCenter.uIMng.SwitchToUI(GUIType.NONE);
         return;
     }
     GameCenter.wingMng.C2S_RequestChangeWing(WingRef.id, true);
     starGo.SetActive(true);
     endGo.SetActive(false);
     if (nameLabel != null)
     {
         nameLabel.text = "[b]" + WingRef.name;
     }
     for (int i = 0; i < attriLabel.Count; i++)
     {
         AttributeTypeRef attributeRef = ConfigMng.Instance.GetAttributeTypeRef((ActorPropertyTag)Enum.ToObject(typeof(ActorPropertyTag), WingRef.property_list[i].eid));
         if (attriLabel[i] != null)
         {
             attriLabel[i].text = attributeRef == null ? string.Empty : attributeRef.stats;
         }
         if (attriNum[i] != null)
         {
             attriNum[i].text = WingRef.property_list[i].count.ToString();
         }
     }
     if (wingTex != null)
     {
         GameCenter.previewManager.TryPreviewSingleEquipment(new EquipmentInfo(WingRef.itemui, EquipmentBelongTo.PREVIEW), wingTex);
         //model.configID = WingRef.itemui;
         //model.StartLoad();
     }
 }
Beispiel #2
0
 /// <summary>
 /// 试用翅膀到期
 /// </summary>
 void ChooseWingGo()
 {
     if (GameCenter.wingMng.WingDic.Count != 0)
     {
         GameCenter.uIMng.ReleaseGUI(GUIType.TRIALWING);
         GameCenter.uIMng.SwitchToUI(GUIType.NONE);
         return;
     }
     GameCenter.wingMng.C2S_RequestChangeWing(WingRef.id, false);
     starGo.SetActive(false);
     endGo.SetActive(true);
     using (var info = Dic.GetEnumerator())
     {
         while (info.MoveNext())
         {
             if (nameLabel != null)
             {
                 nameLabel.text = "[b]" + info.Current.Value.name;
             }
             for (int i = 0; i < attriNextLabel.Count; i++)
             {
                 AttributeTypeRef attributeRef = ConfigMng.Instance.GetAttributeTypeRef((ActorPropertyTag)Enum.ToObject(typeof(ActorPropertyTag), info.Current.Value.property_list[i].eid));
                 if (attriNextLabel[i] != null)
                 {
                     attriNextLabel[i].text = attributeRef == null ? string.Empty : attributeRef.stats;
                 }
                 if (attriNextNum[i] != null)
                 {
                     attriNextNum[i].text = "+" + info.Current.Value.property_list[i].count.ToString();
                 }
             }
             WingRef wingRef = ConfigMng.Instance.GetWingRef(info.Current.Value.id, ConfigMng.Instance.GetWingMaxLev(info.Current.Value.id));
             if (wingRef != null && skillSP != null)
             {
                 SkillMainConfigRef skillRef = ConfigMng.Instance.GetSkillMainConfigRef(wingRef.passivity_skill.skillid);
                 skillSP.spriteName = skillRef == null ? string.Empty : skillRef.skillIcon;
             }
             if (skillDes != null)
             {
                 skillDes.text = info.Current.Value.not_active_skill;
             }
             //if (model != null)
             //{
             //    model.configID = wingRef.itemui;
             //    model.lookRotation = 360;
             //    model.StartLoad();
             //}
             if (wingTex != null)
             {
                 GameCenter.previewManager.TryPreviewSingleEquipment(new EquipmentInfo(wingRef.itemui, EquipmentBelongTo.PREVIEW), wingTex);
             }
             return;
         }
     }
 }
Beispiel #3
0
    /// <summary>
    /// 关闭窗口延时2秒
    /// </summary>
    void CloseWnd()
    {
        if (okBtn != null)
        {
            UIEventListener.Get(okBtn.gameObject).onClick = delegate
            {
                GameCenter.uIMng.ReleaseGUI(GUIType.SHOWMODELUI);
            }
        }
        ;
    }

    /// <summary>
    /// 试用翅膀模型
    /// </summary>
    void ShowTrialWingModel()
    {
        if (GameCenter.wingMng.isNotShowTrialWingModel)
        {
            return;
        }
        if (GameCenter.wingMng.WingDic.Count != 0)
        {
            GameCenter.uIMng.ReleaseGUI(GUIType.SHOWMODELUI);
            GameCenter.uIMng.SwitchToUI(GUIType.NONE);
            return;
        }
        if (attGo != null)
        {
            attGo.SetActive(true);
        }
        GameCenter.wingMng.C2S_RequestChangeWing(WingRef.id, true);
        if (nameLabel != null)
        {
            nameLabel.text = "[b]" + WingRef.name;
        }
        for (int i = 0; i < attriLabel.Count; i++)
        {
            AttributeTypeRef attributeRef = ConfigMng.Instance.GetAttributeTypeRef((ActorPropertyTag)Enum.ToObject(typeof(ActorPropertyTag), WingRef.property_list[i].eid));
            if (attriLabel[i] != null)
            {
                attriLabel[i].text = attributeRef == null ? string.Empty : attributeRef.stats;
            }
            if (attriNum[i] != null)
            {
                attriNum[i].text = WingRef.property_list[i].count.ToString();
            }
        }
        if (modelTex != null)
        {
            GameCenter.previewManager.TryPreviewSingleEquipment(new EquipmentInfo(WingRef.itemui, EquipmentBelongTo.PREVIEW), modelTex);
        }
        //展示翅膀模型的时候直接开启一次固定的锁屏引导
        //Debug.Log("展示翅膀模型开启引导");

        //Debug.Log("当前玩家的Vip等级:"+ GameCenter.vipMng.VipData.vLev);
        if (GameCenter.vipMng.VipData.vLev < 1)
        {
            Invoke("DelayShow", 2.0f);
        }
    }

    /// <summary>
    /// 展示模型
    /// </summary>
    void ShowModel()
    {
        switch (GameCenter.wingMng.modelType)
        {
        case ModelType.WING:
            WingInfo _wingInfo = GameCenter.wingMng.needShowWingInfo;
            if (_wingInfo != null)    //刷新通用翅膀模型
            {
                GameCenter.previewManager.TryPreviewSingleEquipment(new EquipmentInfo(_wingInfo.refData.itemui, EquipmentBelongTo.PREVIEW), modelTex);
                if (nameLabel != null)
                {
                    nameLabel.text = "[b]" + _wingInfo.WingName;
                }
            }
            break;

        case ModelType.ILLUSION:
        case ModelType.MOUNT:
            MountInfo _mountInfo = GameCenter.wingMng.needShowMountInfo;
            if (_mountInfo != null)
            {
                GameCenter.previewManager.TryPreviewSingelMount(_mountInfo, modelTex);
                if (nameLabel != null)
                {
                    nameLabel.text = "[b]" + _mountInfo.MountName;
                }
            }
            break;

        case ModelType.PET:
            MercenaryInfo _petInfo = GameCenter.wingMng.needShowPetInfo;
            if (_petInfo != null)
            {
                GameCenter.previewManager.TryPreviewSingelEntourage(_petInfo, modelTex);
                if (nameLabel != null)
                {
                    nameLabel.text = "[b]" + _petInfo.PetName;
                }
            }
            break;
        }
    }

    /// <summary>
    /// 延迟翅膀引导
    /// </summary>
    void DelayShow()
    {
        GameCenter.noviceGuideMng.OpenGuide(100041, 1);
    }
}