// Use this for initialization void Start() { becameGrounded = false; isSprinting = false; isCrouching = false; dodge = false; isDodging = false; isLocked = false; pressedLocking = false; jump = false; closestEnemy = null; nearbyEnemies = new Collider[5]; myCamera = GetComponentInChildren <CameraController>(); bodyParts = GetComponent <CharacterBodyCostumization>(); if (bodyParts.ArmsPart != null) { animator = bodyParts.ArmsPart.animator; } rb = GetComponent <Rigidbody>(); col = GetComponent <CapsuleCollider>(); originalColliderCenter = col.center; kinMotor = GetComponent <KinematicMotor>(); kinMotor.LayerMaskCollision = layerMaskCollision; }
// Use this for initialization void Start() { rb = GetComponent <Rigidbody>(); animator = GetComponent <Animator>(); player = new Collider[1]; startPos = transform.position; kinMotor = GetComponent <KinematicMotor>(); kinMotor.LayerMaskCollision = layerMaskCollision; }