Example #1
0
 private void SoChange(string oldValue, string newValue)
 {
     name = newValue;
     so   = ScriptableObject.CreateInstance(newValue) as CardSo;
     Debug.Assert(so != null, nameof(so) + " is null");
     so.Init(gameObject);
     CardEvents.SoChange(gameObject);
 }
Example #2
0
        protected override void SetAsset(CardSo so)
        {
            var c = (SpellCardSo)so;

            _cardName.text   = c.name;
            _sprite.sprite   = c.img;
            _cardEffect.text = c.cardEffectText;
        }
        protected override void SetAsset(CardSo so)
        {
            var c = (MonsterCardSo)so;

            _cardName.text    = c.name;
            _background.color = c.background;
            _sprite.sprite    = c.img;
            _cardEffect.text  = c.cardEffectText;
        }
 protected abstract void SetAsset(CardSo so);