// Use this for initialization void Start() { winnerObject = GameObject.FindGameObjectWithTag("GameController").GetComponent <hasWon>(); playerHealth = GameObject.FindGameObjectWithTag("Player").GetComponent <PlayerMovement>(); //playerHealth2 = GameObject.FindGameObjectWithTag("PlayerWScript").GetComponent<PlayerMovement>(); shooterHealth = GameObject.FindGameObjectWithTag("Enemy").GetComponent <ShooterScript>(); }
// Use this for initialization void Start() { rb = transform.parent.GetComponent <Rigidbody>(); myAnimator = transform.parent.GetComponent <Animator>(); AudioSource[] audioList = GetComponentsInParent <AudioSource>(); fireball = audioList[0]; gotHit = audioList[1]; winnerObject = GameObject.FindGameObjectWithTag("GameController").GetComponent <hasWon>(); endCamera = GameObject.FindGameObjectWithTag("EndCamera"); mainCamera = GameObject.FindGameObjectWithTag("MainCamera"); }
// Use this for initialization void Start() { winnerObject = GameObject.FindGameObjectWithTag("GameController").GetComponent <hasWon>(); }