40 lines
1.3 KiB
C#
40 lines
1.3 KiB
C#
|
|
using System.Collections;
|
|||
|
|
using System.Collections.Generic;
|
|||
|
|
using UnityEngine;
|
|||
|
|
using ZXK.Framework;
|
|||
|
|
using ZXK.UTility;
|
|||
|
|
/*******************************************************************************
|
|||
|
|
*Create By CG
|
|||
|
|
*Function ÿ<EFBFBD><EFBFBD>UI<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ԥ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Դ
|
|||
|
|
*******************************************************************************/
|
|||
|
|
namespace ZXK.BYSS
|
|||
|
|
{
|
|||
|
|
public class UIModel
|
|||
|
|
{
|
|||
|
|
private Dictionary<string, GameObject> _uiData = new Dictionary<string, GameObject>();
|
|||
|
|
public Dictionary<string, GameObject> _UiData { get => _uiData; }
|
|||
|
|
|
|||
|
|
///// <summary>
|
|||
|
|
///// <20><>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
///// </summary>
|
|||
|
|
public void InitData()
|
|||
|
|
{
|
|||
|
|
AddressablesManager.Instance.LoadAssets<GameObject>("ui", OnLoadedCall);
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
private void OnLoadedCall(List<GameObject> objs)
|
|||
|
|
{
|
|||
|
|
for (int i = 0; i < objs.Count; i++)
|
|||
|
|
{
|
|||
|
|
_uiData.Add(objs[i].name, objs[i]);
|
|||
|
|
}
|
|||
|
|
//AppManagement.Instance.EnterProcess(EnumCtrl.Model.Home);
|
|||
|
|
|
|||
|
|
Transform topCanvas = GameObject.FindGameObjectWithTag("MainCanvas").transform.parent.Find("TopCanvas");
|
|||
|
|
UI_Manage.Instance.ShowPanel("HoverPanel", 0, topCanvas);
|
|||
|
|
|
|||
|
|
AppManagement.Instance.ChangeModel(EnumCtrl.Model.Home);
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|