Card爆改!
This commit is contained in:
@@ -8,7 +8,7 @@ namespace Continentis.MainGame.Card
|
||||
{
|
||||
public abstract class CardBuffSubmodule : BuffSubmodule
|
||||
{
|
||||
public CardLogicBase card => (buff as CardBuffBase)?.attachedCard;
|
||||
public CardInstance card => (buff as CardBuffBase)?.attachedCard;
|
||||
|
||||
protected CardBuffSubmodule(CardBuffBase buff) : base(buff)
|
||||
{
|
||||
|
||||
@@ -3,9 +3,9 @@ using UnityEngine;
|
||||
|
||||
namespace Continentis.MainGame.Card
|
||||
{
|
||||
public abstract partial class CardBuffBase : BuffBase<CardLogicBase>
|
||||
public abstract partial class CardBuffBase : BuffBase<CardInstance>
|
||||
{
|
||||
public CardLogicBase attachedCard;
|
||||
public CardInstance attachedCard;
|
||||
public CharacterBase sourceCharacter;
|
||||
|
||||
public UsageSubmodule usageSubmodule;
|
||||
@@ -18,11 +18,11 @@ namespace Continentis.MainGame.Card
|
||||
|
||||
public partial class CardBuffBase
|
||||
{
|
||||
public override void Apply(CardLogicBase attached)
|
||||
public override void Apply(CardInstance attached)
|
||||
{
|
||||
this.Apply(attached, null);
|
||||
}
|
||||
|
||||
public abstract void Apply(CardLogicBase attachedCard, CharacterBase sourceCharacter = null);
|
||||
public abstract void Apply(CardInstance attachedCard, CharacterBase sourceCharacter = null);
|
||||
}
|
||||
}
|
||||
@@ -16,7 +16,7 @@ namespace Continentis.MainGame.Card
|
||||
|
||||
public partial class CardCombatBuffBase
|
||||
{
|
||||
public sealed override bool OnBuffApply(out BuffBase<CardLogicBase> existingBuff)
|
||||
public sealed override bool OnBuffApply(out BuffBase<CardInstance> existingBuff)
|
||||
{
|
||||
throw new System.NotImplementedException("请使用类型约束更强的OnBuffApply方法");
|
||||
}
|
||||
@@ -70,12 +70,12 @@ namespace Continentis.MainGame.Card
|
||||
return base.FindExistingSameBuff(out existingBuff, attachedCard.combatBuffSubmodule.buffList);
|
||||
}
|
||||
|
||||
public override void Apply(CardLogicBase attachedCard, CharacterBase sourceCharacter = null)
|
||||
public override void Apply(CardInstance attachedCard, CharacterBase sourceCharacter = null)
|
||||
{
|
||||
this.Apply(attachedCard, sourceCharacter, null);
|
||||
}
|
||||
|
||||
public void Apply(CardLogicBase attachedCard, CharacterBase sourceCharacter = null, CardLogicBase sourceCard = null)
|
||||
public void Apply(CardInstance attachedCard, CharacterBase sourceCharacter = null, CardLogicBase sourceCard = null)
|
||||
{
|
||||
this.attachedCard = attachedCard;
|
||||
this.sourceCharacter = sourceCharacter;
|
||||
|
||||
Reference in New Issue
Block a user