private void Start() { rb = GetComponent <Rigidbody>(); anim = GetComponent <Animator>(); //Cursor.lockState = CursorLockMode.Locked; onPlatformMovement = GetComponent <OnPlatformMovement>(); inputManager = GetComponent <InputManager>(); stateManager = GetComponent <StateManager>(); }
IEnumerator OnPlatformMovementCoroutine() { while (true) { yield return(new WaitForSeconds(1f)); OnPlatformMovement?.Invoke(); } }
private void Start() { characterMovement = Player.GetComponent <CharacterMovement>(); col = GetComponent <Collider>(); Physics.IgnoreLayerCollision(8, 8); rb = this.GetComponent <Rigidbody>(); onPlatformMovement = Player.GetComponent <OnPlatformMovement>(); stateManager = Player.GetComponent <StateManager>(); // Physics.IgnoreCollision(Player.GetComponent<Collider>(), GetComponent<Collider>()); // characterMovement = Player.GetComponent<CharacterMovement>(); }
private void Start() { characterMovement = Player.GetComponent <CharacterMovement>(); onPlatformMovement = Player.GetComponent <OnPlatformMovement>(); stateManager = Player.GetComponent <StateManager>(); }