public void CreateAxis(string name, string description, MouseButton button) { if (this.axis.ContainsKey(name)) { Debug.LogWarning("Axis named " + name + " already exists."); return; } Axis axis = new MouseAxis(name, description, button); this.axis.Add(name, axis); }
/// <summary> /// This edits the axis to be a mouse button axis /// </summary> /// <param name="name">name of the axis</param> /// <param name="button">keycode for the axis</param> public void EditAxis(string name, MouseButton button) { Axis axis = null; if (this.axis.TryGetValue(name, out axis)) { Axis newAxis = new MouseAxis(name, axis.Description, button); this.axis[name] = newAxis; } else { Debug.LogWarning("There's no axis named " + name + "."); } }