public static void AddOther(this PlaytimeToolComponent tc, PlaytimeToolComponent other, int ind) { if ((tc != null) && (tc.attachedTools != null)) { tc.attachedTools[ind] = other; } }
public static void RemoveOther(this PlaytimeToolComponent tc, int ind) { if ((tc != null) && (tc.attachedTools.Length > ind)) { tc.attachedTools[ind] = null; } }
public bool ToolManagementPEGI() { bool changed = false; if (!IsCurrentTool()) { if (pegi.Click(icon.Off.getIcon(), "Click to Enable Tool", 35)) { enabledTool = this.GetType(); changed = true; } pegi.newLine(); } else { selectedInPlaytime = this; if (pegi.Click(icon.On.getIcon(), "Click to Disable Tool", 35)) { enabledTool = null; } changed = true; } if ((changed) && (!IsCurrentTool())) { windowPosition.collapse(); } return(changed); }