Ejemplo n.º 1
0
		public Timer(Action callback, float seconds, bool pausable = false)
		{
			Callback = callback;
			ExecuteTime = seconds;
			Pausable = pausable;
			TimePassed = 0;
			Completed = false;

			EventDispatcher = new EventDispatcher(AbstractGameManager.Instance.EventDispatcher);
			EventDispatcher.AddHandler<GameUpdateEvent>(StateEventType.GameUpdate, OnGameUpdate);
		}
Ejemplo n.º 2
0
		public EventDispatcher(EventDispatcher parent = null) : base(parent)
		{
			Parent = parent;
			LastEventIndex = 0;
		}
		protected AbstractGameComponent()
		{
			EventDispatcher = new EventDispatcher(Manager.EventDispatcher);
			Enabled = true;
		}