/// <summary> /// Create the Bindings based on the current configuration and register /// with the indicated mappings so they will be allowed to handle inputs. /// </summary> /// <typeparam name="TOwner">type that owns these bindings, typically a system / manager, /// should usually be typeof(this) - same type as the calling class.</typeparam> /// <param name="registry">mappings to register these bindings with</param> public CommandBinds Register <TOwner>(ICommandBindRegistry registry) { var bindings = Build(); registry.Register <TOwner>(bindings); return(bindings); }
/// <summary> /// Unregisters from the given BindRegistry all bindings currently registered under /// indicated owner type so they will no longer receive / handle inputs. No effect if input system /// no longer exists. /// </summary> /// <typeparam name="TOwner">owner type whose bindings should be unregistered, typically a system / manager, /// should usually be typeof(this) - same type as the calling class.</typeparam> public static void Unregister <TOwner>(ICommandBindRegistry bindRegistry) { bindRegistry.Unregister <TOwner>(); }