public static InputBindConfiguration Default() { var config = new InputBindConfiguration(); config.AddBind(GlobalVariables.ACTION_HIDE_ACTOR, KeyId.Escape); return(config); }
public InputBindConfigurationTest() { _test = new InputBindConfiguration(); var actions = new string[] { GlobalVariables.ACTION_HIDE_ACTOR, }; foreach (var action in actions) { foreach (var value in Enum.GetValues(typeof(KeyId))) { _test.AddBind(action, (KeyId)value); } } _test.RemoveBind(KeyId.A, actions[0]); Debug.Log("Remove Bind 'A' " + _test); _test.RemoveBinds(KeyId.D); Debug.Log("Remove Binds 'D' " + _test); Profiler.BeginSample("Get Binds"); var binds = _test.GetBinds(actions[0]); Profiler.EndSample(); var bindString = ""; foreach (var inputBind in binds) { bindString += inputBind + "\n"; } Debug.Log("ToString " + _test); }