73 lines
2.5 KiB
C#
73 lines
2.5 KiB
C#
|
using System.Collections;
|
|||
|
using System.Collections.Generic;
|
|||
|
using UnityEngine;
|
|||
|
using UnityEngine.UI;
|
|||
|
using GCGame.Table;
|
|||
|
|
|||
|
public class PrivilegeVipOutTimePanel : MonoBehaviour {
|
|||
|
|
|||
|
public static PrivilegeVipOutTimePanel Instance;
|
|||
|
private void Awake()
|
|||
|
{
|
|||
|
Instance = this;
|
|||
|
}
|
|||
|
|
|||
|
private void OnDestroy()
|
|||
|
{
|
|||
|
Instance = null;
|
|||
|
}
|
|||
|
|
|||
|
//public Text _Desc;
|
|||
|
public UICameraTexture _CamerTexture;
|
|||
|
//public Text _Title;
|
|||
|
public void ShowPanel(int privilegeId)
|
|||
|
{
|
|||
|
var privilegeTab = TableManager.GetPrivilegeVipByID(privilegeId, 0);
|
|||
|
if(privilegeTab == null)
|
|||
|
{
|
|||
|
return;
|
|||
|
}
|
|||
|
GameManager.gameManager.PlayerDataPool.ExperIvpLevel = 0;
|
|||
|
//var strId = "#{" + privilegeTab.OutTimeDesc + "}";
|
|||
|
//_Desc.text = StrDictionary.GetClientDictionaryString(strId);
|
|||
|
|
|||
|
//var charModeld = int.Parse(TableManager.GetSystemParamByID(42, 0).StringValue);
|
|||
|
//var charModel = TableManager.GetCharModelByID(charModeld, 0);
|
|||
|
//_CamerTexture._CanDrag = false;
|
|||
|
//if (charModel == null)
|
|||
|
// _CamerTexture.gameObject.SetActive(false);
|
|||
|
//_CamerTexture.gameObject.SetActive(true);
|
|||
|
//_CamerTexture.InitModelPath(charModel.ResPath, charModel, LoadAssetBundle.BUNDLE_PATH_MODEL, true);
|
|||
|
|
|||
|
//Title.text = StrDictionary.GetClientDictionaryString("#{80011}", privilegeTab.Name);
|
|||
|
|
|||
|
var vipTab = TableManager.GetVipIdoitInChargeByID(privilegeId, 0);
|
|||
|
if(vipTab == null)
|
|||
|
{
|
|||
|
_CamerTexture.gameObject.SetActive(false);
|
|||
|
return;
|
|||
|
}
|
|||
|
int charModeld = vipTab.ChrModelIdStr.Contains("|") ?
|
|||
|
int.Parse(vipTab.ChrModelIdStr.Split('|')[GameManager.gameManager.PlayerDataPool.MainPlayerBaseAttr.Profession]) : int.Parse(vipTab.ChrModelIdStr);
|
|||
|
var charModel = TableManager.GetCharModelByID(charModeld, 0);
|
|||
|
//_Title.text = StrDictionary.GetClientDictionaryString("#{80011}", vipTab.Name);
|
|||
|
_CamerTexture._CanDrag = false;
|
|||
|
if (charModel == null)
|
|||
|
_CamerTexture.gameObject.SetActive(false);
|
|||
|
_CamerTexture.gameObject.SetActive(true);
|
|||
|
_CamerTexture.InitModelPath(charModel.ResPath, charModel, LoadAssetBundle.BUNDLE_PATH_MODEL, true, null,false, GameManager.gameManager.PlayerDataPool.MainPlayerBaseAttr.Profession);
|
|||
|
|
|||
|
}
|
|||
|
|
|||
|
public void OnActiveBtn()
|
|||
|
{
|
|||
|
YuanBaoShopLogic.OpenChargePage();
|
|||
|
UIManager.CloseUI(UIInfo.PrivilegeVipOutTimePanel);
|
|||
|
}
|
|||
|
|
|||
|
public void OnCancelBtn()
|
|||
|
{
|
|||
|
UIManager.CloseUI(UIInfo.PrivilegeVipOutTimePanel);
|
|||
|
}
|
|||
|
}
|