Exemplo n.º 1
0
    void Start()
    {
        // Random Number
        randomNumber = Random.Range(0f,3.0f);

        // Get Path
        if(randomNumber <= 1f){
            pathPoint = GameObject.Find("Path_1");
        }

         	if(randomNumber >= 1.0f && randomNumber <= 2.0f){
            pathPoint = GameObject.Find("Path_2");
        }

        if(randomNumber > 2.0f){
            pathPoint = GameObject.Find("Path_3");
        }

        // Load GameObjects
        spawner = GameObject.FindGameObjectWithTag("Spawner");
        view = GameObject.FindGameObjectWithTag("View");

        // Load Scripts
        viewScript = view.GetComponent<ViewScript>();
        wave = spawner.gameObject.GetComponent<WaveSysteem>();
        varW = pathPoint.gameObject.GetComponent<WaypointPath>();
    }
Exemplo n.º 2
0
    void Start()
    {
        // Load GameObjects
        spawner	= 	GameObject.Find("Spawner");

        // Load Scripts
        wave 	= 	spawner.gameObject.GetComponent<WaveSysteem>();
        enemyN 	= 	enemy.gameObject.GetComponent<EnemyMovement> ();
        enemyD 	= 	dream.gameObject.GetComponent<EnemyMovement> ();
    }
Exemplo n.º 3
0
    void Start()
    {
        // Load GameObjects
        orbit 		=	GameObject.Find("CenterObject");
        controll 	=	GameObject.Find("GameControl");
        spawner 	=	GameObject.FindGameObjectWithTag("Spawner");

        // Load Scripts
        lifeP 		= 	orbit.gameObject.GetComponent<LifeScript>();
        wave		= 	spawner.gameObject.GetComponent<WaveSysteem>();
        score 		= 	controll.gameObject.GetComponent<Score>();
        combo 		= 	controll.gameObject.GetComponent<ComboScript> ();
    }
Exemplo n.º 4
0
 void Start()
 {
     spawner = GameObject.FindGameObjectWithTag("Spawner");
     wave = spawner.GetComponent<WaveSysteem>();
 }