// Start is called before the first frame update void Start() { characterGroundedCheck = GetComponentInChildren <CharacterGroundedCheck>(); characterControl = GetComponent <CharacterControl>(); characterAnimationController = GetComponentInChildren <CharacterAnimationController>(); characterLadderClimb = GetComponentInChildren <CharacterLadderClimb>(); InitializeDelegates(); }
void Start() { characterMove = GetComponent <CharacterMovement>(); characterState = GetComponentInParent <CharacterState>(); characterGroundedCheck = GetComponent <CharacterGroundedCheck>(); characterLadderClimb = GetComponent <CharacterLadderClimb>(); wallDetectionCollider = GetComponentInChildren <WallDetectionCollider>(); rb2D = GetComponentInParent <Rigidbody2D>(); InitializeDelegates(); // InvokeRepeating("PrintMessage", 1f , 1f); // ToolBox.instance.InvokeFunctionRepeating(() => print(Time.time), .1f, Time.time, 1f); }
// Start is called before the first frame update void Start() { characterGroundedCheck = GetComponent <CharacterGroundedCheck>(); characterState = GetComponentInParent <CharacterState>(); wallDetectionCollider = transform.parent.GetComponentInChildren <WallDetectionCollider>(); wallDetectionCollider.setTouchingWall += SetIsTouchingWall; wallCheck += WallAheadCheck; characterGroundedCheck.onEnterOverlapCircleDelegate = (collider2D) => { if (characterState.isWallSliding) { characterState.isWallSliding = false; } }; rb2D = GetComponentInParent <Rigidbody2D>(); }