Skip to content

Instantly share code, notes, and snippets.

@raveneer
Created January 2, 2018 08:25
Show Gist options
  • Save raveneer/1f7cb52ebc0c51e321bad5087749373b to your computer and use it in GitHub Desktop.
Save raveneer/1f7cb52ebc0c51e321bad5087749373b to your computer and use it in GitHub Desktop.
simple gist test
using Entitas;
using UnityEngine;
using Zenject;
public class DummyGameController : MonoBehaviour
{
Systems _systems;
[Inject] private Contexts _contexts;
[Inject] private DummySystem _dummySystem;
void Start()
{
// get a reference to the contexts
Debug.Assert(_contexts != null);
// create the systems by creating individual features
_systems = new Feature("DummySystems").Add(_dummySystem);
// call Initialize() on all of the IInitializeSystems
_systems.Initialize();
}
void Update()
{
// call Execute() on all the IExecuteSystems and
// ReactiveSystems that were triggered last frame
//_systems.Execute();
// call cleanup() on all the ICleanupSystems
//_systems.Cleanup();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment