示例#1
0
    // Use this for initialization
    void Start()
    {
        mMapNames.Add("Maps/map_one");
        mMapNames.Add("Maps/map_two");
        mMapNames.Add("Maps/map_three");

        mSelectionMenu = new SelectionMenu();
        mGameplayState = new GameplayState();

        SetupWorld();
        SetupPlayerSpawns();

        mSpawningPlayers = false;
        mGameplay        = true;

        WHATEVER = GameObject.FindGameObjectWithTag("MenuScene");
        MenuHandler mh = WHATEVER.GetComponent <MenuHandler>();

        mGameplayState.Start(mh.mTankNames, mSpawnPositions);
        Destroy(WHATEVER);

        GameObject musicGO = (GameObject)Instantiate(Resources.Load("gameplay_music"));

        mAudioSources = musicGO.GetComponents <AudioSource>();

        song = Random.Range(0, 3);

        mAudioSources[song].Play();
    }