private void Start() { if (uiCharacterHotkey == null) { uiCharacterHotkey = GetComponent <UICharacterHotkey>(); } }
private void InitCaches() { if (cacheUICharacterHotkeys == null) { CacheCharacterHotkeySelectionManager.DeselectSelectedUI(); CacheCharacterHotkeySelectionManager.Clear(); int j = 0; cacheUICharacterHotkeys = new Dictionary <string, List <UICharacterHotkey> >(); for (int i = 0; i < uiCharacterHotkeys.Length; ++i) { UICharacterHotkeyPair uiCharacterHotkey = uiCharacterHotkeys[i]; string id = uiCharacterHotkey.hotkeyId; UICharacterHotkey ui = uiCharacterHotkey.ui; if (!string.IsNullOrEmpty(id) && ui != null) { CharacterHotkey characterHotkey = new CharacterHotkey(); characterHotkey.hotkeyId = id; characterHotkey.type = HotkeyType.None; characterHotkey.dataId = 0; ui.Setup(this, characterHotkey, -1); if (!cacheUICharacterHotkeys.ContainsKey(id)) { cacheUICharacterHotkeys.Add(id, new List <UICharacterHotkey>()); } cacheUICharacterHotkeys[id].Add(ui); CacheCharacterHotkeySelectionManager.Add(ui); // Select first UI if (j == 0) { ui.OnClickSelect(); } ++j; } } } }
public void SetupForHotkey(UICharacterHotkey uiCharacterHotkey) { sourceLocation = SourceLocation.Hotkey; this.uiCharacterHotkey = uiCharacterHotkey; }
public void Setup(UICharacterHotkey uiCharacterHotkey) { this.uiCharacterHotkey = uiCharacterHotkey; }