private void Move() { if (modeTime > chosenTravelTime) { StartFiring(); } Vector3 positionBefore = transform.position; base.MoveWithSliding(trajectory * Time.fixedDeltaTime * moveSpeed); Vector3 positionAfter = transform.position; if (positionBefore == positionAfter) { facing = Facing.OppositeFacing(facing); trajectory = Facing.FacingToUnitVector3(facing); } }