Extract Count into Helper class

This commit is contained in:
Denis-Cosmin Nutiu 2019-07-28 19:31:01 +03:00
parent 0b4796e6fa
commit 391af7efb2
3 changed files with 24 additions and 17 deletions

View file

@ -0,0 +1,21 @@
using UnityEngine;
namespace src.Helpers
{
public class Count
{
private readonly int _min;
private readonly int _max;
public Count(int min, int max)
{
_min = min;
_max = max;
}
public int RandomIntRange()
{
return Mathf.FloorToInt(Random.Range(_min, _max));
}
}
}

View file

@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: a2787d1c344641e3a5509f691156eab7
timeCreated: 1564331210

View file

@ -10,23 +10,6 @@ namespace src.Managers
{ {
public class LevelManager : GameplayComponent public class LevelManager : GameplayComponent
{ {
public class Count
{
private readonly int _min;
private readonly int _max;
public Count(int min, int max)
{
_min = min;
_max = max;
}
public int RandomIntRange()
{
return Mathf.FloorToInt(Random.Range(_min, _max));
}
}
public Count DestructibleWallCount public Count DestructibleWallCount
{ {
get => _destructibleWallCount; get => _destructibleWallCount;