Esempio n. 1
0
    // Use this for initialization
    void Start()
    {
        #region world bound support
        mMainCamera = Camera.main;
        mWorldBound = new Bounds(Vector3.zero, Vector3.one);
        UpdateWorldWindowBound();

        #endregion

        mGameState = GameManager.TheGameState();
        mPauseMenu = GameObject.Find("PauseMenu");
        mContinueMenu = GameObject.Find("ContinueMenu");

        #region initialize enemy spawning
        if (null == mEnemyToSpawn)
            mEnemyToSpawn = Resources.Load("Prefabs/UFO") as GameObject;

        mSpawnedShips = mGameState.NumEnemiesInLevel();
        for(int i = 0; i < mSpawnedShips; i++) {
            GameObject e = (GameObject) Instantiate(mEnemyToSpawn);
        }
        #endregion

        mPauseMenu.SetActive(paused);
        mContinueMenu.SetActive (false);
    }