public void ReplaceBoard(Game.LevelBlueprint newValue)
    {
        var index     = GameComponentsLookup.Board;
        var component = CreateComponent <Game.BoardComponent>(index);

        component.value = newValue;
        ReplaceComponent(index, component);
    }
    public GameEntity SetBoard(Game.LevelBlueprint newValue)
    {
        if (hasBoard)
        {
            throw new Entitas.EntitasException("Could not set Board!\n" + this + " already has an entity with Game.BoardComponent!",
                                               "You should check if the context already has a boardEntity before setting it or use context.ReplaceBoard().");
        }
        var entity = CreateEntity();

        entity.AddBoard(newValue);
        return(entity);
    }
    public void ReplaceBoard(Game.LevelBlueprint newValue)
    {
        var entity = boardEntity;

        if (entity == null)
        {
            entity = SetBoard(newValue);
        }
        else
        {
            entity.ReplaceBoard(newValue);
        }
    }