// Start is called before the first frame update void Start() { cc = GetComponent <AnotherCharacterController>(); if (strikeController == null) { strikeController = transform.GetChild(0).GetComponent <StrikeController>(); } if (strikeController == null) { strikeController = gameObject.GetChild("StrikeCollider").GetComponent <StrikeController>(); } sca = GetComponent <SpineCharacterAnimator>(); }
private Climbable lastClimbable = null; // ultimo climbable in cui sono stato void Awake() { collider = GetComponents <BoxCollider2D>()[0]; // the first collider is the good one normalCollider = collider; rigidbody = GetComponent <Rigidbody2D>(); animator = GetComponent <SpineCharacterAnimator>(); if (animator != null) { animator.DontReloadSameAnimation = true; } var egc = gameObject.GetChild("EdgeGrabCollider"); if (egc != null) { edgeGrabCollider = egc.GetComponent <CharacterEdgeGrab>(); } characterHoldingPoint = gameObject.GetChild("CharacterHoldingPoint").transform; speed = 0; initialGravityScale = rigidbody.gravityScale; IsHoldingSomething = false; }