Пример #1
0
 void AttachPushable(PushableObject pushable)
 {
     pushable.transform.parent = transform;
     attachedPushable          = pushable;
     attachedPushable.GetPlatformTrigger()?.Decrement();
     SetSpeed(moveSpeedWhenPushing);
     base.SpecialAction();
 }
Пример #2
0
    void DetachPushable()
    {
        if (attachedPushable == null)
        {
            return;
        }
        attachedPushable.transform.parent = attachedPushable.GetInitialParent;
        attachedPushable.GetPlatformTrigger()?.Decrement();
        attachedPushable = null;

        SetSpeed(initialmovementSpeed);
    }