Exemplo n.º 1
0
        public Game(ITimer timer, IGraphics graphics, IMessageBus bus, IGameObjectFactory factory)
        {
            Timer = timer;
            Timer.SubSample(5).Subscribe(t => Bus.SendAll());
            Graphics = graphics;
            Bus = bus;
            Factory = factory;
            Timer.Subscribe(Update);

            Bus.OfType<RequestCloseMessage>().Subscribe(m => Stop());
        }