Provides an opportunity to conveniently add a wheel of fortune to the game.
- The number of roulette positions is adjusted
- It is possible to make paid and free scrolls
- It is possible to set up first n pseudo-random scrolls
- You can make self realization of specific for project Bonuses.
-
Install package from url "https://github.com/RusyaZamorin/WheelOfLuck.git?path=Assets/WheelOfLuck"
-
look at the samples
-
Implement IWheelMoneyService interface. Here you need to implement one method: BuyScroll(). In it, you need to create in-game purchasing of wheel scroll (by usual or special money).
-
Implement IWheelPresenter interface. This object is used to visualization the wheel. You can use prefab in samples, or create your wheel.
- Realize custom bonuses for your project. For this you need to implement IBonus interface.
- Name - bonus name.
- Description - short description of bonus. May be used for text visualization of bonus.
- Type - Consumable or NonConsumable type of bonus
- Weight - weight for randomizing.
- Activate() - is called after the bonus has been received.
Example:
- Create WheelSettings
- Create LuckWheel:
- Call LuckWheel.Generate() to setaping wheel content
- Call LuckWheel.FreeScroll() to scroll without paid
- Call LuckWheel.PaidScroll(MoneyType) to try paid and scroll