Files
encounter-system/Runtime/Reward.cs
2026-04-19 12:25:49 +02:00

23 lines
1.0 KiB
C#

using UnityEngine;
namespace Jovian.EncounterSystem {
/// <summary>
/// Authored reward asset. Designers create one file per reusable reward ("10 Gold", "Rusty Sword",
/// "Town Unlock: Riverfort") and reference it from <see cref="GiveRewardEvent"/> on dialog options.
/// The <see cref="kind"/> payload chooses the reward type; the enclosing asset carries identity
/// and presentation data shared across all types.
/// </summary>
[CreateAssetMenu(fileName = "Reward", menuName = "Jovian/Encounter System/Reward", order = 3)]
public class Reward : ScriptableObject {
/// <summary>Designer-facing short slug (e.g. "gold_10").</summary>
public string id;
/// <summary>Display name shown to the player when the reward is granted.</summary>
public string displayName;
/// <summary>Type-specific payload (currency, item, experience, ...). Authored via the SubclassSelector drawer.</summary>
[SerializeReference, SubclassSelector]
public IRewardKind kind;
}
}