public static void Init(JewelScriptable jewel) { if (window != null) { window.ShowNotification(new GUIContent("please close this template editor \n before editing template")); window.Repaint(); return; } template = jewel; window = ScriptableObject.CreateInstance <JewelTemplate>(); window.position = new Rect(Screen.width / 2, Screen.height / 2, 400, 500); window.titleContent.text = "Jewel Editor"; window.ShowUtility(); }
public Sprite GetJewelSprite(JewelScriptable.Type type) { JewelScriptable jewel = list.Find(j => j.type == type); return(jewel == null ? null : Resources.Load <Sprite>(jewel.spritePath)); }
internal void Remove(JewelScriptable item) { list.Remove(item); }