public LangtonsAntIterationCellGenerator(LangtonsAnt game, Grid <LangtonsAntCellMetadata> grid, IGridRenderer <LangtonsAntCellMetadata> gridRenderer, Coordinates2D antCoordinates, Direction2D antDirection)
 {
     _game          = game;
     _grid          = grid;
     _gridRenderer  = gridRenderer;
     AntCoordinates = antCoordinates;
     AntDirection   = antDirection;
 }
        public void AddRenderer(IGridRenderer gridPartRenderer, RendererType rendererPosition = RendererType.InsideTag)
        {
            switch (rendererPosition)
            {
            case RendererType.AfterTag:
                gridPartRenderersAfter.Add(gridPartRenderer);
                break;

            case RendererType.BeforeTag:
                gridPartRenderersBefore.Add(gridPartRenderer);
                break;

            case RendererType.InsideTag:
                gridPartRenderers.Add(gridPartRenderer);
                break;
            }
        }
예제 #3
0
        public ShipEditorEntity(
            IAssetManagerProvider assetManagerProvider,
            I2DRenderUtilities twoRenderUtilities,
            I3DRenderUtilities threeRenderUtilities,
            IGridRenderer gridRenderer, 
            ICollision collision,
            Ship ship)
        {
            this.m_DefaultFont = assetManagerProvider.GetAssetManager().Get<FontAsset>("font.Default");
            this.m_2DRenderUtilities = twoRenderUtilities;
            this.m_3DRenderUtilities = threeRenderUtilities;
            this.m_GridRenderer = gridRenderer;
            this.m_Collision = collision;
            this.m_Ship = ship;

            this.m_PreviewRotation = 0;

            this.HorizontalRange = 30;
            this.VerticalRange = 30;
            this.VerticalSelection = 3;

            this.UpdateShipVisibilityCull();
        }
 public GameOfLifeIterationCellGenerator(GameOfLife game, Grid <GameOfLifeCellMetadata> grid, IGridRenderer <GameOfLifeCellMetadata> gridRenderer)
 {
     _game         = game;
     _grid         = grid;
     _gridRenderer = gridRenderer;
 }
예제 #5
0
 public IGridWithOptions <T> RenderUsing(IGridRenderer <T> renderer)
 {
     _gridModel.Renderer = renderer;
     return(this);
 }
 public override IGridRenderer AddRenderer(IGridRenderer gridPartRenderer, RendererType rendererPosition = RendererType.InsideTag)
 => this.gridPartRenderer.AddRenderer(gridPartRenderer, rendererPosition);
 public GridMesurablePartRenderer(IGridRenderer gridPartRenderer, ILogger <GridMesurablePartRenderer> logger)
 {
     this.gridPartRenderer = gridPartRenderer ?? throw new ArgumentNullException(nameof(gridPartRenderer));
     this.logger           = logger ?? throw new ArgumentNullException(nameof(logger));
     this.stopwatch        = new Stopwatch();
 }
예제 #8
0
 public DayAndNight(IGridRenderer <DayAndNightCellMetadata> gridRenderer)
     : base(int.MaxValue)
 {
     _gridRenderer = gridRenderer;
 }
예제 #9
0
 /// <summary>
 /// Specifies the Renderer to use with this grid. If omitted, the HtmlTableGridRenderer will be used.
 /// </summary>
 /// <param name="renderer">The Renderer to use</param>
 public void RenderUsing(IGridRenderer <T> renderer)
 {
     _renderer = renderer;
 }
예제 #10
0
 public DayAndNightIterationCellGenerator(DayAndNight game, Grid <DayAndNightCellMetadata> grid, IGridRenderer <DayAndNightCellMetadata> gridRenderer)
 {
     _game         = game;
     _grid         = grid;
     _gridRenderer = gridRenderer;
 }
예제 #11
0
 public GameOfLife(IGridRenderer <GameOfLifeCellMetadata> gridRenderer, GameOfLifeConfiguration configuration)
     : base(int.MaxValue)
 {
     _gridRenderer  = gridRenderer;
     _configuration = configuration;
 }
예제 #12
0
 public IGridRenderer AddRenderer(IGridRenderer gridPartRenderer, RendererType rendererPosition)
 {
     throw new NotImplementedException();
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="FlexiGridSettings&lt;T&gt;"/> class.
 /// </summary>
 public FlexiGridSettings()
 {
     this._columns  = new FlexiGridColumnCollection <T>();
     this._renderer = new FlexiGridRenderer <T>();
 }