Ejemplo n.º 1
0
    void Start()
    {
        // Grab a reference to the script which performs movement
        vn = GetComponentInParent <VectorNavigation>();

        // During startup, initialize the list of swarms and add this object to the appropriate swarm
        if (swarmList == null)
        {
            swarmList = new List <List <GameObject> >();
        }
        while (swarmList.Count - 1 < swarmNumber)
        {
            swarmList.Add(new List <GameObject>());
        }
        swarmList[swarmNumber].Add(this.gameObject);

        neighbors = new GameObject[NUMNEIGHBORS];
    }
 // Start is called before the first frame update
 void Start()
 {
     vn = GetComponentInParent <VectorNavigation>();
 }
    // Start is called before the first frame update
    void Start()
    {
        vn = GetComponentInParent <VectorNavigation>();

        orbitalPlane = Random.onUnitSphere;
    }