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

            old.onInstallOkEvent   -= OnInstallComplete;
            old.onUnInstallOkEvent -= OnUnInstallComplete;
            obj = default(PlaceElement);
            return(old);
        }
Example #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;
        }
        protected override void OnBeforeEnd(bool force)
        {
            base.OnBeforeEnd(force);

            if (!AlreadyPlaced)
            {
                PlaceElement obj = GetUnInstalledObj(Name);
                Attach(obj);
                obj.QuickInstall(this);
                obj.StepComplete();
            }
        }
        protected override void OnAutoInstall()
        {
            PlaceElement obj = GetUnInstalledObj(Name);

            Attach(obj);
            obj.StepActive();
            if (Config.quickMoveElement && !ignorePass)
            {
                obj.QuickInstall(this);
            }
            else
            {
                obj.NormalInstall(this);
            }
        }
Example #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;
 }
Example #9
0
 public void PlaceWrong(PlaceElement pickup)
 {
     current.PlaceWrong(pickup);
 }
Example #10
0
 public void PlaceObject(PlaceObj pos, PlaceElement pickup)
 {
     current.PlaceObject(pos, pickup);
 }