public MapSystem() { TemplateFilter <UnitOccupyingCellTemplate> .Setup(); _templateList = EntityController.GetTemplateList <UnitOccupyingCellTemplate>(); _del = UpdateNode; }
public FlightPhysicsSystem() { TemplateFilter <FlyingTemplate> .Setup(); _flyingList = EntityController.GetTemplateList <FlyingTemplate>(); _del = UpdateNode; }
public PhysicsMoverSystem() { _rbDel = CheckPaused; _moverDel = HandleVelocityMover; MessageKit.addObserver(Messages.PauseChanged, CheckPause); _moverList = EntityController.GetTemplateList <RigidbodyMoverTemplate>(); }
public CollisionCheckSystem() { TemplateFilter <CollisionCheckForwardTemplate> .Setup(); _list = EntityController.GetTemplateList <CollisionCheckForwardTemplate>(); _del = RunUpdate; }
public PlayerRaycastTargetSystem() { TemplateFilter <PlayerRaycastTargetTemplate> .Setup(); _list = EntityController.GetTemplateList <PlayerRaycastTargetTemplate>(); _del = Update; }
public TurnBasedSystem() { TemplateFilter <TurnBasedCharacterTemplate> .Setup(); _turnTemplates = EntityController.GetTemplateList <TurnBasedCharacterTemplate>(); _findCurrentFastest = FindCurrent; _setupUnitTurns = SetupUnitTurn; }
public FirstPersonAnimationSystem() { TemplateFilter <FirstPersonAnimationTemplate> .Setup(); _animTemplates = EntityController.GetTemplateList <FirstPersonAnimationTemplate>(); EntityController.RegisterReceiver(new EventReceiverFilter(this, new [] { typeof(WeaponModelComponent), typeof(PoseAnimatorComponent) })); }
public static void ListCharacters() { var characterNodes = EntityController.GetTemplateList <CharacterTemplate>(); Console.Log("Character Count " + characterNodes.UsedCount); characterNodes.Run( (ref CharacterTemplate node) => { Console.Log("Character " + node.Entity.DebugId); }); }
public void OnSystemUpdate(float dt, float unscaledDt) { if (_flyingList == null) { _flyingList = EntityController.GetTemplateList <FlyingTemplate>(); } if (_flyingList != null) { _flyingList.Run(_del); } }
public void OnPeriodicUpdate() { if (_occupyTemplates == null) { _occupyTemplates = EntityController.GetTemplateList <UnitOccupyingCellTemplate>(); } if (Game.GameActive && !Game.Paused) { _sensorTemplates.Run(_sensorDel); _unitySensorTemplates.Run(_unitySensorDel); } }
public SensorSystem() { _sensorDel = RunUpdate; _unitySensorDel = RunUpdate; TemplateFilter <SensorDetectingTemplate> .Setup(); _sensorTemplates = EntityController.GetTemplateList <SensorDetectingTemplate>(); TemplateFilter <UnitySensorTemplate> .Setup(); _unitySensorTemplates = EntityController.GetTemplateList <UnitySensorTemplate>(); EntityController.RegisterReceiver(new EventReceiverFilter(this, new[] { typeof(SensorTargetsComponent) })); }
public SpriteRenderingSystem() { TemplateFilter <SpriteRendererTemplate> .Setup(); _rendererList = EntityController.GetTemplateList <SpriteRendererTemplate>(); _rendererDel = RunUpdate; TemplateFilter <SpriteRendererInstancedTemplate> .Setup(); _rendererInstancedList = EntityController.GetTemplateList <SpriteRendererInstancedTemplate>(); _rendererInstancedDel = RunUpdate; _simpleRenderers = EntityController.GetComponentArray <SpriteSimpleRendererComponent>(); _simpleRendererDel = RunUpdate; ItemPool.LoadAsset <Material>(MaterialAddress, (m) => _material = m); }
public MoverSystem() { TemplateFilter <ForwardMoverTemplate> .Setup(); _forwardMovers = EntityController.GetTemplateList <ForwardMoverTemplate>(); _forwardDel = HandleForwardMovement; TemplateFilter <RotateToTemplate> .Setup(); _rotators = EntityController.GetTemplateList <RotateToTemplate>(); _rotateDel = HandleRotation; TemplateFilter <SimpleMoverTemplate> .Setup(); _simpleMovers = EntityController.GetTemplateList <SimpleMoverTemplate>(); _simpleDel = HandleMoveSimple; TemplateFilter <ArcMoverTemplate> .Setup(); _arcMovers = EntityController.GetTemplateList <ArcMoverTemplate>(); _arcDel = HandleArcMovement; }