示例#1
0
        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);
        }
示例#2
0
 // 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>();
 }