public void MovePushable()
 {
     if (currentPushable && currentPushable.Grounded)       // If in list of pushables and on the ground
     {
         currentPushable.Move(moveVector * Time.deltaTime); // Move pushable the same speed as the player.
     }
 }
示例#2
0
 public void MovePushable()
 {
     if (currentPushable && currentPushable.Grounded)
     {
         currentPushable.Move(moveVector * Time.deltaTime);
     }
 }
示例#3
0
    private void MoveBox(Vector3 movement)
    {
        int     isRight = playerFaceLeft ? -1 : 1;
        Vector3 tgtVec  = movement;

        try
        {
            pushTGT.Move(tgtVec);
        }
        catch (Exception E) { }
    }