Ejemplo n.º 1
0
        public TileMap()
        {
            Grid = new short[GridWidth, GridHeight];
            var drawable = new TileMapRenderComponent(this);

            Components.Add(drawable);
            var physicable = new TileMapPhysicsComponent(this, Grid);

            Components.Add(physicable);
        }
Ejemplo n.º 2
0
 public void RegisterDrawable(RenderComponent drawable)
 {
     if (drawable is TileMapRenderComponent)
     {
         tilemap = (TileMapRenderComponent)drawable;
         return;
     }
     if (!drawable.Tile)
     {
         drawables.Add(drawable.ZIndex, drawable);
     }
 }