示例#1
0
 public Card(CardPlayerScriptableObject cardData)
 {
     this.name         = cardData.name;
     this.picture      = cardData.picture;
     this.description  = cardData.description;
     this.type         = cardData.type;
     this.rarity       = cardData.rarity;
     this.manaCost     = cardData.manaCost;
     this.soundForPlay = cardData.soundsForPlay;
     this.abilityStepsWithTargetingData = cardData.abilityStepsWithTargetingData;
     this.onPlayResults = new AbilityStep_Base.OnPlayResult[abilityStepsWithTargetingData.Length];
     this.values        = cardData.values;
 }
示例#2
0
    public Card(CardPlayerScriptableObject unsafeCopy)
    {
        data = ScriptableObject.Instantiate <CardPlayerScriptableObject>(unsafeCopy);

        this.name         = unsafeCopy.name;
        this.image        = unsafeCopy.picture;
        this.description  = unsafeCopy.description;
        this.manaCost     = unsafeCopy.manaCost;
        this.soundForPlay = unsafeCopy.soundsForPlay;
        this.abilityStepsWithTargetingData = unsafeCopy.abilityStepsWithTargetingData;
        this.onPlayResults = new AbilityStep_Base.OnPlayResult[abilityStepsWithTargetingData.Length];
        this.stepValue     = unsafeCopy.stepValue;
        this.tooltip       = unsafeCopy.tooltip;
    }
示例#3
0
 void OnBattleEnd(int goldWon, CardPlayerScriptableObject player1Win, CardPlayerScriptableObject player2Win)
 {
     FindObjectOfType <AudioManager>().PlayAudio(VictorySound);
     StartCoroutine(EndBattle());
 }
 private void OnEnable()
 {
     cardSO = (CardPlayerScriptableObject)target;
 }