示例#1
0
 public void PlaceWrong(PlaceElement pickup)
 {
     if (pickup)
     {
         pickup.OnPickDown();
     }
 }
 public void PlaceWrong(PlaceElement pickup)
 {
     if (pickup)
     {
         pickup.NormalUnInstall();
     }
 }
示例#3
0
        public virtual PlaceElement Detach()
        {
            PlaceElement old = obj;

            old.onInstallOkEvent   -= OnInstallComplete;
            old.onUnInstallOkEvent -= OnUnInstallComplete;
            obj = default(PlaceElement);
            return(old);
        }
示例#4
0
        public virtual void Attach(PlaceElement 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)
            {
                PlaceElement obj = GetUnInstalledObj(Name);
                Attach(obj);
                obj.QuickInstall(this);
                obj.StepComplete();
            }
        }
示例#6
0
        protected override void OnAutoInstall()
        {
            PlaceElement obj = GetUnInstalledObj(Name);

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