Esempio n. 1
0
 public GameRenderer(UxContext uxContext, IRenderizable game)
 {
     Game               = game;
     WRenderer          = uxContext.WRenderer;
     RenderOnEndActions = new List <Action>();
     Renderers          = new List <IRenderer>();
     CompRenderers      = new Dictionary <Type, ICompRenderer>();
 }
Esempio n. 2
0
        public InputHandler(
            UxContext uxContext,
            T game,
            IGameRenderer gameRenderer,
            IDictionary<int, int> controlsByKeys,
            int closeWindowControl,
            int toggleMusicControl,
            bool allowRepeats = false
        )
        {
            UxContext = uxContext;
            Game = game;
            GameRenderer = gameRenderer;
            ControlsByKeys = controlsByKeys;
            ControlStates = ControlsByKeys
                .Select(kc => kc.Value)
                .Distinct()
                .ToDictionary(kc => kc, _ => false);

            CloseWindowControl = closeWindowControl;
            ToggleMusicControl = toggleMusicControl;
            AllowRepeats = allowRepeats;
        }
Esempio n. 3
0
 public BufferedGameRenderer(UxContext uxContext, IRenderizable game)
     : base(uxContext, game) =>