25 lines
799 B
C#
25 lines
799 B
C#
using UnityEngine;
|
|
|
|
/// <summary>
|
|
/// 阵型数据:阵型编排场景写入,战斗场景读取。
|
|
/// 静态字段在同一个运行会话内跨场景保留;重启游戏会回到「默认阵型」。
|
|
/// </summary>
|
|
public static class FormationData
|
|
{
|
|
/// <summary>出战英雄的 Prefab(按卡位顺序)。</summary>
|
|
public static GameObject[] HeroPrefabs = new GameObject[0];
|
|
|
|
/// <summary>每个英雄所在的格位索引(-1 表示未放置)。</summary>
|
|
public static int[] CellIndices = new int[0];
|
|
|
|
/// <summary>玩家是否手动编排过阵型。</summary>
|
|
public static bool HasCustomFormation;
|
|
|
|
public static void Clear()
|
|
{
|
|
HeroPrefabs = new GameObject[0];
|
|
CellIndices = new int[0];
|
|
HasCustomFormation = false;
|
|
}
|
|
}
|