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; }
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; }
void OnBattleEnd(int goldWon, CardPlayerScriptableObject player1Win, CardPlayerScriptableObject player2Win) { FindObjectOfType <AudioManager>().PlayAudio(VictorySound); StartCoroutine(EndBattle()); }
private void OnEnable() { cardSO = (CardPlayerScriptableObject)target; }