补充漏提交以及修改战斗场景数据
This commit is contained in:
45
Assets/TcgEngine/Scripts/Data/SkyLadderData.cs
Normal file
45
Assets/TcgEngine/Scripts/Data/SkyLadderData.cs
Normal file
@@ -0,0 +1,45 @@
|
||||
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;
|
||||
}
|
||||
}
|
||||
11
Assets/TcgEngine/Scripts/Data/SkyLadderData.cs.meta
Normal file
11
Assets/TcgEngine/Scripts/Data/SkyLadderData.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 11d37928b05c300409dce9b21b0413c8
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -59,6 +59,7 @@ namespace TcgEngine.Client
|
||||
if (defaultDeckSprite != null)
|
||||
{
|
||||
deck_render.sprite = defaultDeckSprite;
|
||||
deck_render.transform.localScale = Vector3.one * 0.5f;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user