//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()
//When the Game Awakes void Awake() { bndChk = GetComponent <BoundsChk>(); }//end Awake()