Added the system from trail

This commit is contained in:
Sebastian Bularca
2026-04-19 12:25:49 +02:00
parent 47ee77f272
commit 89e36b4df9
57 changed files with 2160 additions and 15 deletions

22
Runtime/Reward.cs Normal file
View File

@@ -0,0 +1,22 @@
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;
}
}