Example #1
0
        private void DrawImplementation()
        {
            IRenderService renderService = GameService.GetService <IRenderService>();

            IInputService inputService  = GameService.GetService <IInputService>();
            Vector2       mousePosition = inputService.GetMouseInScreenSpace();

            renderService.AddDeferredCall(_ => GraphicsHelper.DrawSquare(
                                              new Rectangle((int)mousePosition.X, (int)mousePosition.Y, 2, 2),
                                              Color.White,
                                              true)
                                          );

            foreach (IUnit unit in SelectedUnits)
            {
                GraphicsHelper.DrawSquare(unit.SelectableArea, Color.White);
            }
        }