hellbound/Assets/Scripts/Game/ChestGenerator.cs

18 lines
397 B
C#
Raw Permalink Normal View History

2021-11-26 11:16:25 +03:00
using System.Collections.Generic;
public class ChestsGenerator
{
public List<int> Rewards { get; private set; }
private readonly int[] _avaibles = { 50, 150, 300 };
public ChestsGenerator()
{
Rewards = new List<int>(9);
for (int i = Rewards.Capacity; i > 0; i--)
Rewards.Add(_avaibles[i % 3]);
Rewards.Shuffle();
}
}