public InputEntity ReplaceInput(Assets.Code.Services.IInputService newValue)
    {
        var index     = InputComponentsLookup.Input;
        var component = (Assets.Code.Components.Input)CreateComponent(index, typeof(Assets.Code.Components.Input));

        component.Value = newValue;
        ReplaceComponent(index, component);
        return(this);
    }
    public InputEntity SetInput(Assets.Code.Services.IInputService newValue)
    {
        if (hasInput)
        {
            throw new Entitas.EntitasException("Could not set Input!\n" + this + " already has an entity with Assets.Code.Components.Input!",
                                               "You should check if the context already has a inputEntity before setting it or use context.ReplaceInput().");
        }
        var entity = CreateEntity();

        entity.AddInput(newValue);
        return(entity);
    }
    public void ReplaceInput(Assets.Code.Services.IInputService newValue)
    {
        var entity = inputEntity;

        if (entity == null)
        {
            entity = SetInput(newValue);
        }
        else
        {
            entity.ReplaceInput(newValue);
        }
    }