@@ -26,7 +26,7 @@ using STS2RitsuLib.Scaffolding.Content;
2626
2727namespace Test .Scripts ;
2828
29- // 注册卡牌
29+ // 注册卡牌到指定池(这里是无色)。如果要写自定义池看添加人物的开头
3030 [RegisterCard (typeof (ColorlessCardPool ))]
3131// 注册成人物起始卡,后面是数量。不需要删除即可。
3232// [RegisterCharacterStarterCard(typeof(TestCharacter), 5)]
@@ -46,6 +46,11 @@ public class TestCard : ModCardTemplate
4646 // 卡图资源
4747 public override CardAssetProfile AssetProfile => new (
4848 PortraitPath : $" res://Test/images/cards/{GetType ().Name }.png"
49+ // 卡框等,有需求自己添加。需要自行判断卡牌类型(攻击、技能、能力等)设置,建议写在基类里。
50+ // 如果使用自定义卡池,需要改下material(TODO)
51+ // FramePath: "", // 卡牌背景
52+ // PortraitBorderPath: "", // 边框(状态牌感染使用的)
53+ // BannerTexturePath: "" // 横幅(不同类型)
4954 );
5055
5156 // 卡牌基础数值
@@ -121,7 +126,17 @@ namespace Test.Scripts;
121126public abstract class TestCardModel : ModCardTemplate
122127{
123128 public override CardAssetProfile AssetProfile => new (
124- PortraitPath : $" res://Test/images/cards/{GetType ().Name }.png"
129+ PortraitPath : $" res://RitsuTest/images/cards/{GetType ().Name }.png" ,
130+ // 根据不同类型设置不同卡框
131+ FramePath : type switch
132+ {
133+ CardType .Attack => " res://RitsuTest/images/card_frame_attack.png" ,
134+ CardType .Skill => " res://RitsuTest/images/card_frame_skill.png" ,
135+ CardType .Power => " res://RitsuTest/images/card_frame_power.png" ,
136+ _ => " "
137+ }
138+ // PortraitBorderPath: "",
139+ // BannerTexturePath: ""
125140 );
126141
127142 public TestCardModel (int energyCost , CardType type , CardRarity rarity , TargetType targetType , bool shouldShowInCardLibrary )
0 commit comments