public void UpdateData(IPlayerCharacterData characterData) { InitCaches(); var characterHotkeys = characterData.Hotkeys; for (var i = 0; i < characterHotkeys.Count; ++i) { var characterHotkey = characterHotkeys[i]; List <UICharacterHotkey> uis; if (!string.IsNullOrEmpty(characterHotkey.hotkeyId) && CacheUICharacterHotkeys.TryGetValue(characterHotkey.hotkeyId, out uis)) { foreach (var ui in uis) { ui.Setup(characterHotkey, i); ui.Show(); } } } }
public void UpdateData(IPlayerCharacterData character) { this.character = character; InitCaches(); IList <CharacterHotkey> characterHotkeys = character.Hotkeys; for (int i = 0; i < characterHotkeys.Count; ++i) { CharacterHotkey characterHotkey = characterHotkeys[i]; List <UICharacterHotkey> uis; if (!string.IsNullOrEmpty(characterHotkey.hotkeyId) && CacheUICharacterHotkeys.TryGetValue(characterHotkey.hotkeyId, out uis)) { foreach (UICharacterHotkey ui in uis) { ui.Setup(this, characterHotkey, i); ui.Show(); } } } }