Example #1
0
    void OnJoinedRoom()
    {
        isJoinedRoom = true;

        if (sc.map == "1000")
        {
            map = (GameObject)Instantiate(map1000Prefab, new Vector3(0f, -12f, 0f), Quaternion.Euler(270f, 0f, 0f));
        }
        if (sc.map == "awpbase")
        {
            map = (GameObject)Instantiate(mapAwpIndiaPrefab, mapAwpIndiaPrefab.transform.position, mapAwpIndiaPrefab.transform.rotation);
        }

        for (int i = 0; i < 6; i++)
        {
            CTspawnPoints [i] = map.transform.Find("SpawnPoints/CT").GetChild(i).transform;
        }
        for (int i = 0; i < 6; i++)
        {
            TspawnPoints [i] = map.transform.Find("SpawnPoints/T").GetChild(i).transform;
        }
        Debug.Log("DONE");
        connectionText.text = "";
        StartSpawnProcess(0f, false, sc.isPlayerCT, username.text);
        sc.BotInitSpawn();
    }