Beispiel #1
0
    void InitParticleList()
    {
        Vector3 position;

        for (int i = 0; i < numFlakes; i++)
        {
            position     = new Vector3(heightRandList[i % maxRandLength], randList[i % maxRandLength].y, randList[(i) % maxRandLength].x);
            flakeList[i] = Instantiate(snowPrefab, position, Quaternion.identity);
            MyParticle flake = flakeList[i].GetComponent <MyParticle>();

            flake.SetInitUnitPosition(position);
            flake.SetCount(Random.Range(0, 100));

            float scale = heightRandList[(i + 4) % maxRandLength] - sky;
        }
        Clear(flakeList);
    }