Пример #1
0
 public void Fire()
 {
     if (GMScript.allowedFire)
     {
         GMScript.ClearList();
         GameObject SpawnedObject = Instantiate(SphereSpawning, SpawnPoint.transform.position, this.transform.rotation);
         SpawnedObject.GetComponent <SphereSpawningScript>().direction = this.transform.rotation.z;
         SpawnedObject.GetComponent <SphereSpawningScript>().moving    = true;
         SpawnedObject.GetComponent <SphereSpawningScript>().Spawned   = true;
         int randomMat = Random.Range(0, 3);
         SpawnedObject.GetComponent <SphereSpawningScript>().SetMat = randomMat;
         SpawnedObject.GetComponent <SphereSpawningScript>().GM     = GM;
         GMScript.allowedFire = false;
     }
 }