Пример #1
0
 void OnDeath(Damagable died)
 {
     for (int i = 0; i < this.AmountToDrop; ++i)
     {
         GameObject toSpawn = LootManager.GenerateLootDrop();
         if (toSpawn != null)
         {
             Instantiate(toSpawn, (Vector2)this.transform.position + new Vector2(Random.Range(-this.MaxDistance, this.MaxDistance), Random.Range(-this.MaxDistance, this.MaxDistance)), Quaternion.identity);
         }
     }
 }