61 lines
1.4 KiB
C#
61 lines
1.4 KiB
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
using GCGame.Table;
|
|
using Module.Log;
|
|
|
|
public class CaptainWelfareAimItem : UIItemBase {
|
|
|
|
|
|
public GameObject _markIcon;
|
|
|
|
public Text _titleDesc;
|
|
public Text _actDesc;
|
|
|
|
private int _missionType;
|
|
public int MissionType
|
|
{
|
|
get { return _missionType; }
|
|
private set { _missionType = value; }
|
|
}
|
|
|
|
private Tab_TeamLeaderAwardActivity teamTab = null;
|
|
public override void Show(Hashtable hash)
|
|
{
|
|
base.Show(hash);
|
|
_missionType = (int)hash["InitObj"];
|
|
teamTab = TableManager.GetTeamLeaderAwardActivityByID(_missionType, 0);
|
|
RefreshItemState();
|
|
}
|
|
|
|
public void RefreshItemState(int missioncount = 0)
|
|
{
|
|
if(teamTab == null)
|
|
{
|
|
LogModule.ErrorLog("teamTab is null");
|
|
return;
|
|
}
|
|
|
|
_titleDesc.text = string.Format(teamTab.TitleName, Mathf.Clamp(missioncount, 0, teamTab.CountDayMax), teamTab.CountDayMax);
|
|
|
|
_actDesc.text = StrDictionary.GetClientDictionaryString("#{68000}", teamTab.Point);
|
|
}
|
|
|
|
public override void OnItemClick()
|
|
{
|
|
base.OnItemClick();
|
|
|
|
if(CaptainWelfareRoot.Instance)
|
|
{
|
|
CaptainWelfareRoot.Instance.OnAimItemClick(MissionType);
|
|
}
|
|
}
|
|
|
|
public void ShowMarkIcon(bool _IsShow)
|
|
{
|
|
_markIcon.SetActive(_IsShow);
|
|
}
|
|
|
|
}
|