IndieGame/client/Assets/Test.cs

85 lines
2.4 KiB
C#
Raw Normal View History

2024-10-11 10:12:15 +08:00
/********************************************************************
: Test.cs
:
: 1982614048@qq.com
: 2024/04/11 18:49:03
:
: 2024/04/24 13:33:01
:
*********************************************************************/
using Sirenix.OdinInspector;
using System.Collections;
using System.Collections.Generic;
using Unity.VisualScripting;
using UnityEngine;
using UnityEngine.UI;
namespace Ether
{
public class Test : MonoBehaviour
{
[Label("场景")]
[ValueDropdown("@ConstName.SceneNameList")]
public string scenceName;
//public DictionaryEx<string, string> dic = new DictionaryEx<string, string>();
private void Start()
{
//ReInputManager.Inst.Init();
//Debug.Log(JsonTools.ToJson(dic));
//InputManager.Inst.Init();
//InputManager.Inst.AddInput<KeyboardInput>();
//KeyboardInput input = InputManager.Inst.GetInput<KeyboardInput>();
//List<RoleTable> roleList = TableProvider.Get<TbRole>().DataList;
Entity entity = EntityManager.Inst.GetEntity("MainCanvas");
Debug.Log(entity.name);
//SceneSystemManager.Inst.LoadSceneAsync("DiningCar", (progress) =>
//{
// Debug.Log(progress.ToString());
//});
//TaskSystem.Inst.Init();
//TaskSystem.Inst.ReceiveTask(1);
//TaskSystem.Inst.ReceiveTask(5);
//TaskSystem.Inst.SuccessTask(7);
//SaveSystem.Inst.SaveArchive(1);
SaveSystem.Inst.LoadArchive(1);
//foreach (var item in TaskSystem.Inst.taskStateDic)
//{
// Debug.LogError(item.Key + " " + item.Value);
//}
//var task = TaskSystem.Inst.CurMainTaskData;
//TbRole tbRole = tables.Get<TbRole>();
//GetComponent<ScrollViewGridEx>().Init((item, index)=>{
// Image image = item.GetComponent<Image>();
// image.sprite = LoaderTools.LoadAsset<Sprite>($"UI/Main/ui_main_{index}");
//}, 50);
ReInputManager.Inst.Init();
//ReInputManager.Inst.ShowInteractionBind();
UIManager.Inst.Init();
DialogueSystem.Inst.Init();
}
private void OnDestroy()
{
UIManager.Inst.Clear();
DialogueSystem.Inst.Clear();
}
}
}