API ››
Parent Previous Next


public class MiniGame_Reward : MonoBehaviour

This class represents a possible outcome of a MiniGame.

e.g. For a PrizeWheel, this are each of the elements distributed in the wheel

e.g. For a TreasureHunt, it is the rewards that are hidden inside the slots


float Probability

(Default: 1) How likely is this reward to be chosen

bool _AttachToCaller

(Default: true) When then selected, should it move into the slot or element's position

bool _EndGame

When selected, it stops the game. (e.g. Treasure Hunt, player is searching for the key, when found, the game stops)

UnityEventTreasureHunt _OnRewarded

Callback used for playing effects/sounds when the reward is selected

Public Methods

void Execute( MiniGame game, Transform parent )

When selected, shows the reward, stops the game if elected and runs effects and sounds by calling _OnRewarded

void Show ( Transform parent )

This is called when the reward is selected and is meant to initialize the reward and move it into the correct location

void Hide ()

Created with the Personal Edition of HelpNDoc: Free help authoring environment