Exemplo n.º 1
0
        public override void Init()
        {
            off        = .5f;
            noiseVecIn = Vector3.zero;
            PNoise     = new ImageTools.Core.PerlinNoise(1);

            populator  = GetComponent <FlockPopulator> ();
            targetLerp = new List <float>();
            targets    = new List <Vector3> ();

            for (int i = 0; i < amount; i++)
            {
                targets.Add(Random.insideUnitSphere * spread);
            }

            populator.Init();

            for (int i = 0; i < amount; i++)
            {
                populator.boids [i].initialPosition = targets[i];
                targets2.Add(targets[i]);
                targetLerp.Add(0);
            }

            //Debug.Log (targets.Count);
        }
Exemplo n.º 2
0
        //*noise


        public override void Init()
        {
            off        = .5f;
            noiseVecIn = Vector3.zero;
            PNoise     = new ImageTools.Core.PerlinNoise(1);

            populator = GetComponent <FlockPopulator> ();

            for (int i = 0; i < amount; i++)
            {
                targets.Add(Random.insideUnitSphere * spread);
            }

            populator.Init();

            for (int i = 0; i < amount; i++)
            {
                populator.boids [i].initialPosition = targets[i];
            }
        }