Пример #1
0
 public void RestoreTorch()
 {
     condition = maxCondition;
     radious   = maxRadious;
     TorchConditionChangeEvent?.Invoke(condition);
     light.pointLightOuterRadius = radious;
 }
Пример #2
0
 void OnTick(int tick)
 {
     if (condition > 0)
     {
         condition--;
         TorchConditionChangeEvent?.Invoke(condition);
         radious = Mathf.Lerp(0.0f, maxRadious, (float)condition / maxCondition);
         light.pointLightOuterRadius = radious;
     }
     else
     {
         character.Think("Oh no! I'm gonna freeze!");
     }
 }