Beispiel #1
0
 // Start is called before the first frame update
 void Start()
 {
     transform.position = new Vector3(Mathf.RoundToInt(transform.position.x), transform.position.y, Mathf.RoundToInt(transform.position.z));
     inSphere           = Physics.OverlapSphere(transform.position, 1.2f, 1 << 8);
     foreach (var obj in inSphere)
     {
         ChangeMaterial change = obj.GetComponent <ChangeMaterial>();
         change.ChangeToNewMat();
     }
     StartCoroutine(Explode());
 }