public void AddSkillToHotKey(string hotKeyName, string skillId) { hotKeyToSkill[hotKeyName] = new HotKeyState() { skillId = skillId }; }
public void UseSkillByHotKey(string hotKeyName) { HotKeyState hotKeyState = null; if (!hotKeyToSkill.TryGetValue(hotKeyName, out hotKeyState)) { return; } if (!hotKeyState.canUse) { return; } UseSkill(hotKeyState.skillId); }
/// <summary> /// Initializes the class with a hot key state. /// </summary> /// <param name="state">The hot key state.</param> public HotKeyActivatedEventArgs(HotKeyState state) { State = state; }