void Awake() { player = GameObject.FindGameObjectWithTag("Player"); playerStamina = player.GetComponent<PlayerStamina>(); ground = GameObject.FindGameObjectWithTag("ground"); anim = GetComponent<Animator>(); CameraTurn = GetComponent<CameraTurn>(); ButtonTurn = GetComponent<ButtonTurn>(); }
// Use this for initialization void Start() { ButtonTurn = GetComponent<ButtonTurn>(); CameraTurn = GetComponent<CameraTurn>(); animator = GetComponent<Animator>(); capsule = GetComponent<CapsuleCollider>(); //box = GetComponent<BoxCollider>(); run = false; if(animator.layerCount >= 2) { animator.SetLayerWeight(1, 1); } }