public ThrowingSimulationSystem(
     Contexts contexts,
     ICompensationWorldFactory compensationWorldFactory,
     ThrowingHitHandler hitHandler)
 {
     _contexts                 = contexts;
     _layerMask                = UnityLayers.SceneCollidableLayerMask | UnityLayerManager.GetLayerIndex(EUnityLayerName.UI);//BulletLayers.GetBulletLayer();
     _moveSimulator            = new ThrowingMoveSimulator(20, contexts.player);
     _compensationWorldFactory = compensationWorldFactory;
     _throwingHitHandler       = hitHandler;
     //all throwings
     _throwings = _contexts.throwing.GetGroup(ThrowingMatcher.AllOf(ThrowingMatcher.ThrowingData));
     //all vehicles
     _vehicles = _contexts.vehicle.GetGroup(VehicleMatcher.AllOf(VehicleMatcher.GameObject));
     //all players
     _players = _contexts.player.GetGroup(PlayerMatcher.AllOf(PlayerMatcher.FirstPersonModel, PlayerMatcher.ThirdPersonModel));
 }
示例#2
0
 protected override IGroup <ThrowingEntity> GetIGroup(Contexts contexts)
 {
     return(contexts.throwing.GetGroup(ThrowingMatcher.AllOf(ThrowingMatcher.ThrowingGameObject)));
 }
 public ThrowingCleanUpSystem(ThrowingContext throwingContext)
 {
     _group = throwingContext.GetGroup(ThrowingMatcher.AllOf(ThrowingMatcher.FlagDestroy));
 }