Пример #1
0
 void Start()
 {
     spawnChances = new Dictionary <int, int>();
     spawnChances.Add(11, 1000);
     obtainableItem = ItemDatabaseObject.GetComponent <ItemDatabase>().items[11];
     intensity      = transform.GetChild(0).GetComponent <Light>().intensity;
     TimeController = GameObject.Find("TimeManager").GetComponent <TimeEvent>();
     _light         = transform.GetChild(0).gameObject.GetComponent <Light>();
     if (TimeController.isOutside)
     {
         currentIntensity = intensity * TimeController.GetPercentage();
         _light.intensity = currentIntensity;
         TimeController.SubscribeLight(GetComponent <TorchUse>());
     }
     itemID = 11;
 }