コード例 #1
0
ファイル: GameData.cs プロジェクト: ScopatGames/Spectrum
    public void Setup()
    {
        colorDictionary = new ColorDictionary(colorListTextAsset);

        //parse face and vertex data from input files
        parsedTerrainFaces = ParseFaces(textInputFaces);
        parsedTerrainVertices = ParseVertices(textInputVertices);

        //Create and pool terrain defenses
        GameObject temp = new GameObject("Defense Pool");
        temp.transform.parent = transform;
        temp.transform.position = new Vector3(1000f, 0f, 0f);
        defensePool = temp.AddComponent<Pool>();
        defensePool.poolObjectPrefab = defensePrefab;
        defensePool.InstantiatePoolObjects(defenseNumber);

        StartCoroutine("RegenerateTerrain", terrainType);
    }