void Awake() //las referencias de las variables se suelen hacer siempre en el awake { klAudioSource = GetComponent <KLAudioSource>(); klAudioSource.SetFloatVar(krillVar, 0); lineRenderer = GetComponent <LineRenderer>(); gunLight = GetComponent <Light>(); }
void Awake() { klAudioSource = GetComponent <KLAudioSource>(); enemyManager = GameObject.FindGameObjectWithTag("EnemyManager").GetComponent <EnemyManager>(); anim = GetComponent <Animator>(); //capsuleCollider = GetComponent<CapsuleCollider>(); currentHealth = startingHealth; scoreManager = GameObject.FindGameObjectWithTag("GameManager").GetComponent <ScoreManager>(); }
private void Awake() { klAudioSource = GetComponent <KLAudioSource>(); anim = GetComponent <Animator>(); playerMovement = GetComponent <PlayerMovement>(); playerShooting = GetComponentInChildren <PlayerShooting>(); currentHealth = startingHealth; }
private void OnEnable() { m_target = target as KLAudioSource; rList = new ReorderableList(serializedObject, serializedObject.FindProperty("m_tags"), true, true, true, true); rList.drawHeaderCallback = DrawListHeader; rList.drawElementCallback = DrawListElement; rList.onAddDropdownCallback = OnAddDropdownCallback; rList.elementHeightCallback = ElementHeightCallback; }