コード例 #1
0
 public void PlaceWrong(PickUpAbleElement pickup)
 {
     if (pickup)
     {
         pickup.OnPickDown();
     }
 }
コード例 #2
0
 public void PlaceWrong(PickUpAbleElement pickup)
 {
     if (pickup)
     {
         pickup.NormalUnInstall();
     }
 }
コード例 #3
0
        public virtual PickUpAbleElement Detach()
        {
            PickUpAbleElement old = obj;

            old.onInstallOkEvent   -= OnInstallComplete;
            old.onUnInstallOkEvent -= OnUnInstallComplete;
            obj = default(PickUpAbleElement);
            return(old);
        }
コード例 #4
0
        public virtual void Attach(PickUpAbleElement obj)
        {
            if (this.obj != null)
            {
                Debug.LogError(this + "allready attached");
            }

            this.obj                = obj;
            obj.onInstallOkEvent   += OnInstallComplete;
            obj.onUnInstallOkEvent += OnUnInstallComplete;
        }
コード例 #5
0
        protected override void OnBeforeEnd(bool force)
        {
            base.OnBeforeEnd(force);

            if (!AlreadyPlaced)
            {
                PickUpAbleElement obj = GetUnInstalledObj(Name);
                Attach(obj);
                obj.QuickInstall(this);
                obj.StepComplete();
            }
        }
コード例 #6
0
 public void RemoveElement(PickUpAbleElement item)
 {
     foreach (var objItem in objectList)
     {
         if (item.Name == objItem.Key)
         {
             if (objItem.Value.Contains(item))
             {
                 objItem.Value.Remove(item);
             }
         }
     }
 }
コード例 #7
0
 /// <summary>
 /// 外部添加Element
 /// </summary>
 public void RegistElement(PickUpAbleElement item)
 {
     if (objectList.ContainsKey((string)item.Name))
     {
         objectList[(string)item.Name].Add((PickUpAbleElement)item);
     }
     else
     {
         objectList[(string)item.Name] = new System.Collections.Generic.List <PickUpAbleElement>()
         {
             item
         };
     }
 }
コード例 #8
0
        protected override void OnAutoInstall()
        {
            PickUpAbleElement obj = GetUnInstalledObj(Name);

            Attach(obj);
            obj.StepActive();
            if (Config.quickMoveElement && !ignorePass)
            {
                obj.QuickInstall(this);
            }
            else
            {
                obj.NormalInstall(this);
            }
        }
コード例 #9
0
 public void PlaceWrong(PickUpAbleElement pickup)
 {
     current.PlaceWrong(pickup);
 }
コード例 #10
0
 public void PlaceObject(PlaceObj pos, PickUpAbleElement pickup)
 {
     current.PlaceObject(pos, pickup);
 }
コード例 #11
0
 public void PlaceObject(PlaceObj pos, PickUpAbleElement pickup)
 {
     pos.Attach(placeCtrl.pickedUpObj);
     placeCtrl.pickedUpObj.QuickInstall(pos, false, false);
 }
コード例 #12
0
 public void PlaceObject(PlaceObj pos, PickUpAbleElement pickup)
 {
     pos.Attach(pickup);
     pickup.QuickInstall(pos);
     pickup.PickUpAble = false;
 }