Exemplo n.º 1
0
 // Use this for initialization
 void Start()
 {
     GameMan   = GameObject.FindGameObjectWithTag("GameManager").GetComponent <GameManagerComp> ();
     particles = GetComponent <ParticleSystem> ();
     particles.Stop();
     myAudio = GetComponent <AudioSource> ();
 }
Exemplo n.º 2
0
 // Use this for initialization
 void Start()
 {
     gameMan = GameObject.FindGameObjectWithTag("GameManager").GetComponent <GameManagerComp>();
     if (gameMan)
     {
         gameMan.balls.Add(this.gameObject);
     }
 }
Exemplo n.º 3
0
    // 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;
            }
        }
    }