Пример #1
0
 public static void AddOther(this PlaytimeToolComponent tc, PlaytimeToolComponent other, int ind)
 {
     if ((tc != null) && (tc.attachedTools != null))
     {
         tc.attachedTools[ind] = other;
     }
 }
Пример #2
0
 public static void RemoveOther(this PlaytimeToolComponent tc, int ind)
 {
     if ((tc != null) && (tc.attachedTools.Length > ind))
     {
         tc.attachedTools[ind] = null;
     }
 }
Пример #3
0
        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);
        }