Example #1
0
 public SpriteDrawingSystem(ContentManager contentManager, SpriteBatch spriteBatch)
 {
     _spriteBatch = spriteBatch;
     _debugFont   = contentManager.Load <SpriteFont>("default");
     SystemMessageBroker.AddListener <ComponentAdded <Sprite> >(this);
     SystemMessageBroker.AddListener <ComponentRemoved <Sprite> >(this);
 }
Example #2
0
 public PlayerMovingHandler(IInputMapProvider inputMapProvider)
     : base(PlayerStates.Moving)
 {
     _inputMapProvider = inputMapProvider;
     SystemMessageBroker.AddListener <EntityCreated>(this);
     SystemMessageBroker.AddListener <EntityDestroyed>(this);
 }
Example #3
0
 public PlayerInputHandlingSystem(
     IntentProvider intentProvider,
     ConfigurationService configurationService)
 {
     _intentProvider = intentProvider;
     _tileSize       = configurationService.GetTileSizeInPixels();
     SystemMessageBroker.AddListener <EntityCreated>(this);
 }
Example #4
0
 protected SystemBase()
 {
     SystemMessageBroker.AddListener(this);
 }
Example #5
0
 public EntityRepository()
 {
     SystemMessageBroker.AddListener <EntityCreated>(this);
     SystemMessageBroker.AddListener <EntityDestroyed>(this);
 }
Example #6
0
 public static void RegisterHandler <TEvent>(IGameEventHandler <TEvent> handler) where TEvent : IGameEvent
 {
     SystemMessageBroker.AddListener(handler);
 }
Example #7
0
 public TileEventsSystem()
 {
     GameEventManager.RegisterHandler <PlayerAbandonedTile>(this);
     SystemMessageBroker.AddListener <EntityCreated>(this);
     GameEventManager.RegisterHandler <PlayerEnteredTile>(this);
 }
 public CommandHandlingSystem()
 {
     SystemMessageBroker.AddListener <ComponentAdded <CommandQueue> >(this);
     SystemMessageBroker.AddListener <ComponentRemoved <CommandQueue> >(this);
 }
Example #9
0
 public FsmSystem()
 {
     _handlersDictionary = new Dictionary <string, StateHandlerBase>();
     SystemMessageBroker.AddListener <ComponentAdded <State> >(this);
 }
Example #10
0
 public AnimationSystem(int fps)
 {
     _fps = fps;
     SystemMessageBroker.AddListener <ComponentAdded <Animator> >(this);
     SystemMessageBroker.AddListener <EntityDestroyed>(this);
 }
Example #11
0
 public MoveToScreenPositionSystem()
 {
     SystemMessageBroker.AddListener <ComponentAdded <TargetScreenPosition> >(this);
     SystemMessageBroker.AddListener <ComponentRemoved <TargetScreenPosition> >(this);
 }