Files
JJBB/Assets/Project/Script/GUI/RedPacket/RedPacketDetailGetItem.cs
2024-08-23 15:49:34 +08:00

67 lines
1.4 KiB
C#

using UnityEngine;
using UnityEngine.UI;
using UnityEngine.EventSystems;
using System.Collections;
using System.Collections.Generic;
using System;
using GCGame.Table;
public class RedPacketPickInfo
{
public string Name;
public int Value;
public bool IsBest;
public bool IsWorse;
}
public class RedPacketDetailGetItem : UIItemSelect
{
public Text _PlayerName;
public UICurrencyItem _PickValue;
public GameObject _GOBest;
public GameObject _GOWorse;
private RedPacketPickInfo _PacketInfo;
public RedPacketPickInfo PacketInfo
{
get
{
return _PacketInfo;
}
}
public override void Show(Hashtable hash)
{
base.Show();
_PacketInfo = (RedPacketPickInfo)hash["InitObj"];
UpdatePacket(_PacketInfo);
}
public void UpdatePacket(RedPacketPickInfo pcaketInfo)
{
_PlayerName.text = _PacketInfo.Name;
_PickValue.SetColor("<color=#A1544EFF>");
_PickValue.ShowCurrency(MONEYTYPE.MONEYTYPE_COIN, _PacketInfo.Value);
if (_PacketInfo.IsBest)
{
_GOBest.SetActive(true);
}
else
{
_GOBest.SetActive(false);
}
if (_PacketInfo.IsWorse)
{
_GOWorse.SetActive(true);
}
else
{
_GOWorse.SetActive(false);
}
}
}