private void LoadContent(ShortCutSystem src) { if (System.Object.ReferenceEquals(null, src)) { return; } Shortcut.OnAddItem += OnItemAdd; Shortcut.OnRemoveItem += OnItemRemove; Shortcut.OnItemChange += OnItemChange; List <InteractItem> items = Shortcut.GetAllItems(); foreach (var item in items) { AddItem(item); } }
private void LoadUIContent() { if (!IsUIElementsReady) { return; } SimWood sw = (SimWood)EntityManager.Instance.PlayerEntity; if (!System.Object.ReferenceEquals(null, sw)) { Shortcut = sw.Shortcut; UILord.Instance.CurShortcut = Shortcut; UILord.Instance.CurShortcutUI = this; LoadContent(Shortcut); } }