@@ -33,7 +33,7 @@ using STS2RitsuLib.Scaffolding.Content;
3333
3434namespace Test .Scripts ;
3535
36- // 注册卡牌
36+ // 注册卡牌到指定池(这里是无色)。如果要写自定义池看添加人物的开头
3737 [RegisterCard (typeof (ColorlessCardPool ))]
3838// 注册成人物起始卡,后面是数量。不需要删除即可。
3939// [RegisterCharacterStarterCard(typeof(TestCharacter), 5)]
@@ -53,6 +53,11 @@ public class TestCard : ModCardTemplate
5353 // 卡图资源
5454 public override CardAssetProfile AssetProfile => new (
5555 PortraitPath : $" res://Test/images/cards/{GetType ().Name }.png"
56+ // 卡框等,有需求自己添加。需要自行判断卡牌类型(攻击、技能、能力等)设置,建议写在基类里。
57+ // 如果使用自定义卡池,需要改下material(TODO)
58+ // FramePath: "", // 卡牌背景
59+ // PortraitBorderPath: "", // 边框(状态牌感染使用的)
60+ // BannerTexturePath: "" // 横幅(不同类型)
5661 );
5762
5863 // 卡牌基础数值
@@ -128,7 +133,17 @@ namespace Test.Scripts;
128133public abstract class TestCardModel : ModCardTemplate
129134{
130135 public override CardAssetProfile AssetProfile => new (
131- PortraitPath : $" res://Test/images/cards/{GetType ().Name }.png"
136+ PortraitPath : $" res://RitsuTest/images/cards/{GetType ().Name }.png" ,
137+ // 根据不同类型设置不同卡框
138+ FramePath : type switch
139+ {
140+ CardType .Attack => " res://RitsuTest/images/card_frame_attack.png" ,
141+ CardType .Skill => " res://RitsuTest/images/card_frame_skill.png" ,
142+ CardType .Power => " res://RitsuTest/images/card_frame_power.png" ,
143+ _ => " "
144+ }
145+ // PortraitBorderPath: "",
146+ // BannerTexturePath: ""
132147 );
133148
134149 public TestCardModel (int energyCost , CardType type , CardRarity rarity , TargetType targetType , bool shouldShowInCardLibrary )
0 commit comments