45 lines
1.5 KiB
C#
45 lines
1.5 KiB
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
[System.Serializable]
|
|
public class SkyLadderItem
|
|
{
|
|
[Header("天梯ID")]
|
|
public int Id; // 天梯ID
|
|
public int Rank; // 天梯段级
|
|
public string RankName; // 天梯段名称
|
|
public int Level; // 天梯等级
|
|
public int BeginStar; // 到达等级初始星星
|
|
public int RankDownStar; // 降级时保留星星
|
|
public int MaxStar; // 等级星星上限
|
|
public int WinGetStar; // 胜利获得星星
|
|
public int ExtraGetStar; // 连胜额外星星
|
|
public int LoseLostStar; // 是否失败掉星
|
|
public int LoseRankDown; // 是否失败降级
|
|
public int RankScore; // 启动天梯分数
|
|
public int AITimes; // 等待多久改为对战机器人
|
|
public int AIDeck; // 机器人卡组ID
|
|
public int WaitTime; // 扩大匹配等待时间
|
|
public int MaxWaitTime; // 王者扩大匹配范围的时间
|
|
}
|
|
|
|
[CreateAssetMenu(fileName = "New_SkyLadderData", menuName = "GameData/SkyLadderData")]
|
|
public class SkyLadderData : ScriptableObject
|
|
{
|
|
public SkyLadderItem[] items;
|
|
|
|
public SkyLadderItem GetById(int id)
|
|
{
|
|
foreach (var item in items)
|
|
{
|
|
if (item.Id == id)
|
|
{
|
|
return item;
|
|
}
|
|
}
|
|
|
|
Debug.Log($"找不到天梯数据,ID=【{id}】的数据");
|
|
return null;
|
|
}
|
|
} |