Beispiel #1
0
 private void SpawnItem()
 {
     if (itemSpawnPoints != null)
     {
         Vector3 position = itemSpawnPoints[randomPointNumber].
                            transform.position;
         position   += new Vector3(0, 1f, 0);
         currentItem = Instantiate(item,
                                   position, Quaternion.identity) as GameObject;
         ItemScript itemScript = currentItem.GetComponent <ItemScript>();
         if (itemScript != null)
         {
             itemScript.ChooseRandomState();
         }
     }
 }