49 lines
1.1 KiB
C#
49 lines
1.1 KiB
C#
|
|
using FlappyBird;
|
|||
|
|
using QAssetBundle;
|
|||
|
|
using QFramework;
|
|||
|
|
using QFramework.Example;
|
|||
|
|
using System.Collections;
|
|||
|
|
using UnityEngine;
|
|||
|
|
using XMLTool;
|
|||
|
|
public class Launch : MonoBehaviour
|
|||
|
|
{
|
|||
|
|
ResLoader loader;
|
|||
|
|
private void Awake()
|
|||
|
|
{
|
|||
|
|
loader = ResLoader.Allocate();
|
|||
|
|
StartCoroutine(StartApp());
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
|
|||
|
|
IEnumerator StartApp()
|
|||
|
|
{
|
|||
|
|
yield return ResKit.InitAsync();
|
|||
|
|
loader.Add2Load<TextAsset>(App_xml.APP, (success, res) =>
|
|||
|
|
{
|
|||
|
|
if (success)
|
|||
|
|
{
|
|||
|
|
Global.Instance.appData = XmlParser.ParseXml(res.Asset.As<TextAsset>().text);
|
|||
|
|
}
|
|||
|
|
});
|
|||
|
|
|
|||
|
|
loader.LoadAsync(() =>
|
|||
|
|
{
|
|||
|
|
ActionKit.Delay(2f, () =>
|
|||
|
|
{
|
|||
|
|
loader.Recycle2Cache();
|
|||
|
|
loader = null;
|
|||
|
|
});
|
|||
|
|
});
|
|||
|
|
yield return UIKit.OpenPanelAsync<UIModeSelect>();
|
|||
|
|
|
|||
|
|
// <20><>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD>
|
|||
|
|
//foreach (var item in Global.Instance.appData.ActionDict)
|
|||
|
|
//{
|
|||
|
|
// var act = ActionHelper.GetAction(item.Value);
|
|||
|
|
// act.Start(this, () => Debug.LogError("<22><><EFBFBD>ɡ<EFBFBD><C9A1><EFBFBD><EFBFBD><EFBFBD>"));
|
|||
|
|
//}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
|