void Start() { if (!rb) { rb = GetComponent <Rigidbody>(); } if (!crouch) { crouch = GetComponent <CrouchScript>(); } if (!controller) { controller = GetComponent <MovementController>(); } if (!charController) { charController = GetComponent <CharacterController>(); } if (!castPoint) { castPoint = controller.groundCheck; } rb.useGravity = false; rb.detectCollisions = false; rb.isKinematic = true; }
private void Awake() { if (!mController) { mController = GetComponent <MovementController>(); } if (!sController) { sController = GetComponent <SlideScript>(); } if (!cController) { cController = GetComponent <CrouchScript>(); } if (!gController) { gController = GetComponent <GlideScript>(); } if (!fController) { fController = GetComponent <FlyScript>(); } }