private void Start()
 {
     rb   = GetComponent <Rigidbody>();
     anim = GetComponent <Animator>();
     //Cursor.lockState = CursorLockMode.Locked;
     onPlatformMovement = GetComponent <OnPlatformMovement>();
     inputManager       = GetComponent <InputManager>();
     stateManager       = GetComponent <StateManager>();
 }
Exemple #2
0
    IEnumerator OnPlatformMovementCoroutine()
    {
        while (true)
        {
            yield return(new WaitForSeconds(1f));

            OnPlatformMovement?.Invoke();
        }
    }
Exemple #3
0
 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>();
 }
Exemple #4
0
 private void Start()
 {
     characterMovement  = Player.GetComponent <CharacterMovement>();
     onPlatformMovement = Player.GetComponent <OnPlatformMovement>();
     stateManager       = Player.GetComponent <StateManager>();
 }