void Start() { enemiesSituation = GameObject.FindGameObjectWithTag("EnemyHandler").GetComponent <EnemiesSituation>(); soundAudioSource = GetComponent <AudioSource>(); pauseMusicSource = musicPlayer.GetComponents <AudioSource>()[2]; animatorBackground = menuBackground.GetComponent <Animator> (); animatorButton = gobackButton.GetComponent <Animator> (); }
// Use this for initialization protected void Start() { enemiesSituation = GameObject.FindGameObjectWithTag("EnemyHandler").GetComponent <EnemiesSituation>(); health = GetComponent <Health>(); stateAction = Patrol; patrolPath = GetComponent <PatrolPath>(); pathfinder = GetComponent <EnemyPathfinder>(); }
void Start() { particleSystemPool = GameObject.FindGameObjectWithTag("GameController").GetComponent <ParticleSystemPool>(); audioSource = GetComponent <AudioSource>(); mainCamera = GameObject.FindGameObjectWithTag("MainCamera"); enemiesSituation = GameObject.FindGameObjectWithTag("EnemyHandler").GetComponent <EnemiesSituation>(); animatorModel = playerModel.GetComponent <Animator> (); if (isLocalPlayer) { spawnPoints = FindObjectsOfType <NetworkStartPosition>(); } }