示例#1
0
    // Use this for initialization
    void Start()
    {
        PoliceCarScript pcs = this.GetComponentInParent <PoliceCarScript> ();

        if (pcs.swat == true)
        {
            this.GetComponent <SpriteRenderer> ().sprite = policeVan;
        }
        Destroy(this);
    }
示例#2
0
 bool areAllSwatSpawned()
 {
     foreach (GameObject g in copCarsInWorld)
     {
         PoliceCarScript pcs = g.GetComponent <PoliceCarScript> ();
         if (pcs.swat == true && pcs.spawnedCops == false)
         {
             return(false);
         }
     }
     return(true);
 }