public EntityDropData[] SuccessLoot()
            {
                float addOneChances = (_maxDropCount - _minDropCount) - Mathf.Floor(_maxDropCount - _minDropCount);
                bool  addOne        = Random.value <= addOneChances;

                EntityDropData[] drops = new EntityDropData[Mathf.FloorToInt(Random.Range(_minDropCount, _maxDropCount)) + (addOne ? 1 : 0)];
                for (int i = 0; i < drops.Length; i++)
                {
                    drops[i] = _drop;
                }

                return(drops);
            }
Beispiel #2
0
 public void FillData(EntityDropData data)
 {
     _data = data;
 }