Пример #1
0
 /// <summary>
 /// Creates three difficulties when created
 /// </summary>
 public MiniGameScriptable()
 {
     for (int i = 0; i < 3; i++)
     {
         miniGameDiffs[i] = new MiniGameDiff((Difficulty)i);
     }
 }
Пример #2
0
 /// <summary>
 /// Triggers when data is cahnged
 /// </summary>
 private void OnValidate()
 {
     //Checks if difficulty count is still 3
     if (miniGameDiffs.Length != 3)
     {
         miniGameDiffs = new MiniGameDiff[3];
         for (int i = 0; i < 3; i++)
         {
             miniGameDiffs[i] = new MiniGameDiff((Difficulty)i);
         }
     }
 }