Esempio n. 1
0
 protected override void OnCreate()
 {
     _simulateCycleSystemGroup = World.GetOrCreateSystem <SimulateCycleSystemGroup>();
     _dynamicNarrowPhaseSystem = World.GetOrCreateSystem <DynamicNarrowPhaseSystem>();
     _staticNarrowPhaseSystem  = World.GetOrCreateSystem <StaticNarrowPhaseSystem>();
     _collDataEntityQuery      = EntityManager.CreateEntityQuery(typeof(ColliderData));
 }
Esempio n. 2
0
        protected override void OnCreate()
        {
            _flipperDataQuery        = EntityManager.CreateEntityQuery(ComponentType.ReadOnly <FlipperMovementData>(), ComponentType.ReadOnly <FlipperStaticData>());
            _collisionEventDataQuery = EntityManager.CreateEntityQuery(ComponentType.ReadOnly <CollisionEventData>());

            _staticBroadPhaseSystem   = World.GetOrCreateSystem <StaticBroadPhaseSystem>();
            _dynamicBroadPhaseSystem  = World.GetOrCreateSystem <DynamicBroadPhaseSystem>();
            _staticNarrowPhaseSystem  = World.GetOrCreateSystem <StaticNarrowPhaseSystem>();
            _dynamicNarrowPhaseSystem = World.GetOrCreateSystem <DynamicNarrowPhaseSystem>();
            _displacementSystemGroup  = World.GetOrCreateSystem <UpdateDisplacementSystemGroup>();
            _staticCollisionSystem    = World.GetOrCreateSystem <StaticCollisionSystem>();
            _dynamicCollisionSystem   = World.GetOrCreateSystem <DynamicCollisionSystem>();
            _contactSystem            = World.GetOrCreateSystem <ContactSystem>();
            _ballSpinHackSystem       = World.GetOrCreateSystem <BallSpinHackSystem>();
            _systemsToUpdate.Add(_staticBroadPhaseSystem);
            _systemsToUpdate.Add(_dynamicBroadPhaseSystem);
            _systemsToUpdate.Add(_staticNarrowPhaseSystem);
            _systemsToUpdate.Add(_dynamicNarrowPhaseSystem);
            _systemsToUpdate.Add(_displacementSystemGroup);
            _systemsToUpdate.Add(_staticCollisionSystem);
            _systemsToUpdate.Add(_dynamicCollisionSystem);
            _systemsToUpdate.Add(_contactSystem);
            _systemsToUpdate.Add(_ballSpinHackSystem);

            Contacts = new NativeList <ContactBufferElement>(Allocator.Persistent);
        }