DragonECS/test/Startup.cs

33 lines
610 B
C#
Raw Normal View History

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;
public SharedData _data = new SharedData();
2023-02-08 17:07:39 +08:00
private void Start()
{
_ecsSession
.Add(new TestSystem())
.Inject(_data)
2023-02-08 17:07:39 +08:00
.Init();
}
private void Update()
{
_ecsSession.Run();
}
private void OnDestroy()
{
_ecsSession.Destroy();
}
}
}