Class RewardClaimButton
Component that manages displaying an individual Reward Item.
Inherited Members
Namespace: UnityEngine.GameFoundation.Components
Syntax
[AddComponentMenu("Game Foundation/Reward Claim Button", 8)]
[RequireComponent(typeof(RewardClaimManager), typeof(Button))]
public class RewardClaimButton : MonoBehaviour
Properties
rewardDefinitionKey
The definition key of the Reward that the Reward Item being displayed belongs to.
Declaration
public string rewardDefinitionKey { get; }
Property Value
Type | Description |
---|---|
String |
rewardItemDefinition
Declaration
public RewardItemDefinition rewardItemDefinition { get; }
Property Value
Type | Description |
---|---|
RewardItemDefinition |
rewardItemDefinitionKey
The definition key of the Reward Item being displayed.
Declaration
public string rewardItemDefinitionKey { get; }
Property Value
Type | Description |
---|---|
String |
Methods
Claim()
Calls RewardManager.Claim with the RewardItem component has stored.
Declaration
public void Claim()
SetButtonEnabledState(Boolean)
Sets whether the button component attached to RewardClaimButton's parent should be enabled or not. Can be overridden by internal state like whether the button has a valid RewardItem key attached.
Declaration
public void SetButtonEnabledState(bool enableState)
Parameters
Type | Name | Description |
---|---|---|
Boolean | enableState | Whether or not to enable the button. |
SetRewardItemDefinition(RewardItemDefinition)
Sets the RewardItem that will be claimed when Claim method is called.
Declaration
public void SetRewardItemDefinition(RewardItemDefinition definition)
Parameters
Type | Name | Description |
---|---|---|
RewardItemDefinition | definition | The runtime RewardItem that should be claimed when Claim() is called. If null the Claim button will be disabled. |