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. } }
public void MovePushable() { if (currentPushable && currentPushable.Grounded) { currentPushable.Move(moveVector * Time.deltaTime); } }
private void MoveBox(Vector3 movement) { int isRight = playerFaceLeft ? -1 : 1; Vector3 tgtVec = movement; try { pushTGT.Move(tgtVec); } catch (Exception E) { } }