示例#1
0
        private void Start()
        {
            EntityManager = World.DefaultGameObjectInjectionWorld.EntityManager;
            hits          = new NativeList <SaberNoteHitData>(4, Allocator.Persistent);

            detectionSystem = World.DefaultGameObjectInjectionWorld.GetOrCreateSystem <SaberHitDetectionSystem>();
        }
示例#2
0
 private void OnEnable()
 {
     if (detectionSystem == null)
     {
         detectionSystem = World.DefaultGameObjectInjectionWorld.GetOrCreateSystem <SaberHitDetectionSystem>();
     }
     detectionSystem.RegisterController(this);
 }