Exemple #1
0
 // Use this for initialization
 void Start()
 {
     leadermovement = leader.GetComponent <LeadVehicleMovement>();
     vehicles       = new List <GameObject>();
     for (int i = 0; i < vehAry.Length; i++)
     {
         vehicles.Add(vehAry[i]);
     }
 }
Exemple #2
0
    // Use this for initialization
    void Start()
    {
        leadermovement = leader.GetComponent <LeadVehicleMovement>();
        spawns         = spawnArea.GetComponent <SpawnLocations>();

        for (int i = 0; i < numberToSpawnAtStart; i++)
        {
            Vector3    pos     = spawns.getSpawnLocation();
            Quaternion rot     = transform.rotation;        //new Quaternion(0f,0f,0f,0f);
            GameObject tempobj = Instantiate(Resources.Load("prefabs/pickup"), pos, rot) as GameObject;
        }
    }