// Use this for initialization void Start() { GameMan = GameObject.FindGameObjectWithTag("GameManager").GetComponent <GameManagerComp> (); particles = GetComponent <ParticleSystem> (); particles.Stop(); myAudio = GetComponent <AudioSource> (); }
// Use this for initialization void Start() { gameMan = GameObject.FindGameObjectWithTag("GameManager").GetComponent <GameManagerComp>(); if (gameMan) { gameMan.balls.Add(this.gameObject); } }
// Use this for initialization void Start() { player = GameObject.FindGameObjectWithTag("Player"); gameMan = GameObject.FindGameObjectWithTag("GameManager").GetComponent <GameManagerComp>(); if (gameMan) { gameMan.enemies.Add(this.gameObject); } charController = GetComponent <CharacterController>(); foreach (GoalBehaviour goal in GameObject.FindObjectsOfType <GoalBehaviour>()) { if (goal.isEnemyGoal) { targetGoal = goal.gameObject; } } }