29 lines
709 B
C#
29 lines
709 B
C#
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
using System.Collections;
|
|
using Games.Fellow;
|
|
using GCGame.Table;
|
|
|
|
public class ChatEmojiSlot : UIItemBase
|
|
{
|
|
public Vector2 _ChildPos = Vector2.zero;
|
|
|
|
public override void Show(Hashtable hash)
|
|
{
|
|
base.Show();
|
|
|
|
var emojiId = (int)hash["InitObj"];
|
|
InitEmoji(emojiId);
|
|
}
|
|
|
|
private void InitEmoji(int emojiId)
|
|
{
|
|
var emojiTrans = ResourcePool.Instance.PullEmoji("Emoji" + emojiId, transform);
|
|
if (emojiTrans == null)
|
|
return;
|
|
emojiTrans.anchoredPosition = _ChildPos;
|
|
emojiTrans.localRotation = Quaternion.Euler( Vector3.zero);
|
|
emojiTrans.localScale = Vector3.one;
|
|
}
|
|
}
|