Example #1
0
    // Use this for initialization
    void Start()
    {
        flockerScripts = new List <FlockerScript>();

        flockers = spawner.SpawnFlocker(flockerNumber);

        foreach (var item in flockers)
        {
            FlockerScript script = item.GetComponent <FlockerScript>();

            if (script != null)
            {
                flockerScripts.Add(script);
            }
        }
    }