2023-02-08 17:07:39 +08:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using DCFApixels;
|
|
|
|
|
using UnityEngine;
|
|
|
|
|
|
|
|
|
|
namespace DCFApixels.DragonECS
|
|
|
|
|
{
|
|
|
|
|
public class Startup : MonoBehaviour
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
private EcsSession _ecsSession;
|
2023-02-13 21:11:54 +08:00
|
|
|
|
public SharedData _data = new SharedData();
|
2023-02-08 17:07:39 +08:00
|
|
|
|
|
|
|
|
|
private void Start()
|
|
|
|
|
{
|
2023-03-12 02:48:51 +08:00
|
|
|
|
_ecsSession = new EcsSession()
|
2023-02-08 17:07:39 +08:00
|
|
|
|
.Add(new TestSystem())
|
2023-02-13 21:11:54 +08:00
|
|
|
|
.Inject(_data)
|
2023-02-08 17:07:39 +08:00
|
|
|
|
.Init();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void Update()
|
|
|
|
|
{
|
|
|
|
|
_ecsSession.Run();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void OnDestroy()
|
|
|
|
|
{
|
|
|
|
|
_ecsSession.Destroy();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|