SamsonGame/Assets/Scripts/Game/ChestGenerator.cs

18 lines
397 B
C#
Raw Normal View History

2021-12-29 20:50:11 +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();
}
}