コード例 #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);
        }