Exemplo n.º 1
0
    //When the Game Awakes
    void Awake()
    {
        S = this;
        //Set bndCheck to reference the BoundsChk xomponwnr on this GameObject
        bndCheck = GetComponent <BoundsChk>();

        //Invoke SpwanEnmey() once (in 2 seconds, based on default values)
        Invoke("SpawnEnemy", 1f / enemySpawnPerSecond);
    }//end Awake()
Exemplo n.º 2
0
 //When the Game Awakes
 void Awake()
 {
     bndChk = GetComponent <BoundsChk>();
 }//end Awake()