29 lines
794 B
C#
29 lines
794 B
C#
|
|
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
using UnityEngine.EventSystems;
|
|
using System.Collections;
|
|
using Games.GlobeDefine;
|
|
using GCGame.Table;
|
|
using GCGame;
|
|
|
|
public class PlayHelpMessageRootItem : UIItemBase
|
|
{
|
|
public RawImage raw;
|
|
public Text Desc;
|
|
|
|
public override void Show(Hashtable hash)
|
|
{
|
|
string itemStr = hash["InitObj"] as string;
|
|
if (itemStr.Contains("[-]") == false)
|
|
return;
|
|
string[] lists = itemStr.Split('-');
|
|
if (lists.Length < 2)
|
|
return;
|
|
Desc.text = lists[0].Remove(lists[0].Length - 1, 1);
|
|
string imagePath = lists[1].Remove(0, 1);
|
|
string name = System.IO.Path.GetFileNameWithoutExtension(imagePath);
|
|
LoadAssetBundle.Instance.SetRawTexture(raw, name, imagePath);
|
|
}
|
|
}
|