75 lines
2.2 KiB
C#
75 lines
2.2 KiB
C#
using System;
|
|
using UnityEngine;
|
|
using Sirenix.OdinInspector;
|
|
using System.Collections.Generic;
|
|
|
|
[Serializable]
|
|
public class LegionLevelData
|
|
{
|
|
[ReadOnly] [LabelText("宽")] public int Width;
|
|
|
|
[ReadOnly] [LabelText("高")] public int Height;
|
|
|
|
[ReadOnly] [LabelText("内径")] public float Radius;
|
|
|
|
[HideInInspector] public List<Building> Buildings = new List<Building>();
|
|
|
|
[HideInInspector] [LabelText("出生点A")] public List<int> BornPosA = new List<int>();
|
|
|
|
[HideInInspector] [LabelText("出生点B")] public List<int> BornPosB = new List<int>();
|
|
|
|
[ReadOnly] [LabelText("减速格子")] public List<int> ReduceCells = new List<int>();
|
|
|
|
[LabelText("出生点A区标识位置")] public int BornAFlagPos;
|
|
|
|
[LabelText("出生点B区标识位置")] public int BornBFlagPos;
|
|
|
|
[HideInInspector] [LabelText("轨道")] public List<TrackData> Tracks = new List<TrackData>();
|
|
|
|
[LabelText("建筑对")] public List<LinkBuilding> linkBuildings = new List<LinkBuilding>();
|
|
|
|
[Serializable]
|
|
public class Building
|
|
{
|
|
[LabelText("建筑唯一序号")] public int id;
|
|
|
|
[LabelText("建筑ID")] public int buildingID;
|
|
|
|
[LabelText("位置")] public int position;
|
|
|
|
[LabelText("势力格子")] public List<int> cells = new List<int>();
|
|
}
|
|
|
|
[Serializable]
|
|
public class LinkBuilding
|
|
{
|
|
[LabelText("建筑1")] public int building1;
|
|
[HideInInspector] public int startPos;
|
|
[LabelText("建筑2")] public int building2;
|
|
[HideInInspector] public int endPos;
|
|
}
|
|
|
|
[Serializable]
|
|
public class TrackData
|
|
{
|
|
[LabelText("轨道ID")] public int trackID;
|
|
[LabelText("起点建筑")] public int startBuilding;
|
|
[LabelText("终点建筑")] public int endBuilding;
|
|
[LabelText("运行状态")] public TrackState state;
|
|
}
|
|
|
|
[Serializable]
|
|
public class BezierKnotData
|
|
{
|
|
public Vector3 position; // 关键点位置
|
|
public Vector3 tangentOut; // 指向下一个点的方向
|
|
public Vector3 tangentIn; // 从上一个点来的方向
|
|
public Quaternion rotation; // 旋转
|
|
}
|
|
|
|
public enum TrackState
|
|
{
|
|
Stop, // 停止
|
|
Moving, // 运行
|
|
}
|
|
} |