29 lines
919 B
C#
29 lines
919 B
C#
using Cielonos.MainGame.Map;
|
|
using UnityEngine;
|
|
|
|
namespace Cielonos.MainGame.Rewards
|
|
{
|
|
/// <summary>
|
|
/// Combat 奖励解析时的上下文快照。
|
|
/// Resolver、Modifier、Dispatcher 都通过它读取当前 Run、节点和随机数来源。
|
|
/// </summary>
|
|
public readonly struct CombatRewardContext
|
|
{
|
|
public readonly RunState run;
|
|
public readonly RunMapNode node;
|
|
public readonly Vector2Int nodePosition;
|
|
public readonly System.Random rng;
|
|
|
|
public CombatRewardContext(RunState run, RunMapNode node, Vector2Int nodePosition, System.Random rng)
|
|
{
|
|
this.run = run;
|
|
this.node = node;
|
|
this.nodePosition = nodePosition;
|
|
this.rng = rng;
|
|
}
|
|
|
|
public MapNodeType NodeType => node != null ? node.nodeType : MapNodeType.MinorBattle;
|
|
public ZoneData ZoneData => node?.zoneData;
|
|
}
|
|
}
|