/// <summary> /// Move player to the node in the specified _dir /// </summary> /// <param name="_dir"></param> /// <returns></returns> bool Jump(NODE_DIRECTION _dir) { if (levelManager.CurrentNode.GetLink(_dir) != null && levelManager.CurrentNode.GetLink(_dir).gameObject.activeSelf) { levelManager.Jump(_dir); sfx.PlaySoundRandomPitch(SoundManager.SOUNDS.JUMP); jumping = true; animationController.SetJumpPose(_dir); animationController.SetWaiting(false); animationController.ResetIdleTimer(); distanceFromNextRock = Vector2.Distance(transform.position, levelManager.CurrentNode.transform.position); return(true); } return(false); }