//--------------------------------------------------------
|
// [Author]: 第二世界
|
// [ Date ]: Thursday, August 16, 2018
|
//--------------------------------------------------------
|
using UnityEngine;
|
using System.Collections;
|
using UnityEngine.UI;
|
using System.Collections.Generic;
|
using TableConfig;
|
//神兽强化;列表条目
|
namespace Snxxz.UI
|
{
|
|
public class GodBeastEntry : MonoBehaviour
|
{
|
[SerializeField] ItemCell m_itemCell;
|
[SerializeField] GameObject m_Selectedbar_Image;
|
[SerializeField] Text m_Item_Text;
|
//[SerializeField] Button //
|
DogzModel Dogz_model;
|
DogzModel dogz_model { get { return Dogz_model ?? (Dogz_model = ModelCenter.Instance.GetModel<DogzModel>()); } }
|
public void GetGodBeastLocationMarker(int locationMarker)
|
{
|
int godBeastNumber = locationMarker / 10;
|
int godBeastPart = locationMarker % 10;
|
List<ItemModel> itemModel = dogz_model.GetDogzEquips(godBeastNumber);
|
if (itemModel != null)
|
{
|
for (int i = 0; i < itemModel.Count; i++)
|
{
|
if (itemModel[i].EquipPlace == godBeastPart)
|
{
|
ItemCellModel ItemModel = new ItemCellModel(itemModel[i].itemId, true, 0, 1);
|
m_itemCell.Init(ItemModel);
|
var itemConfig = ConfigManager.Instance.GetTemplate<ItemConfig>(itemModel[i].itemId);
|
var IudetDogzEquipPlus = itemModel[i].GetUseDataModel((int)ItemUseDataKey.Def_IudetDogzEquipPlus);// 神兽装备强化信息列表 [强化等级, 强化熟练度]
|
m_Item_Text.color = UIHelper.GetUIColor(itemConfig.ItemColor);
|
if (IudetDogzEquipPlus != null && IudetDogzEquipPlus[0] > 0)
|
{
|
m_Item_Text.text = itemConfig.ItemName+" +"+ IudetDogzEquipPlus[0];
|
}
|
else
|
{
|
m_Item_Text.text = itemConfig.ItemName;
|
}
|
}
|
|
}
|
|
}
|
|
}
|
}
|
|
}
|