// PRIVATE /* KEEP IT JUST IN CASE * private void ConsumeItem() * { * if (_inventory.CurrentItem != null) * { * _inventory.SetCount(_inventory.CurrentItemCount - 1); * GrantBoosts(MergeMode.Shield); * } * else if (_lottery.LotteryStarted) * { * _lottery.StopAllCoroutines(); * _lottery.ResetLottery(); * GrantBoosts(MergeMode.SpeedBoost); * } * } */ private void GrantBoosts(MergeMode mode) { ItemMerging itemMergingEvent = ItemMerging.Create(); itemMergingEvent.Entity = entity; switch (mode) { case MergeMode.Shield: itemMergingEvent.Shield = true; break; case MergeMode.SpeedBoost: itemMergingEvent.Shield = false; _boost.CustomBoostFromBoostSettings(_boostSettings); break; } itemMergingEvent.Send(); }