示例#1
0
    public ElementCardInstance(string language, JElementCardProperties properties) : base(properties.Element, properties.TargetEffects, properties.PlayerEffects, properties.IsAOE, properties.IsAgainstEnemy)
    {
        this._jElementCardProperties = properties;
        this._title       = new ListenableProperty <string>(null);
        this._description = new ListenableProperty <string>(null);

        // language
        foreach (JCardLocale local in _jElementCardProperties.locales)
        {
            if (language.Equals(local.language))
            {
                this._title.Property       = local.data.Title;
                this._description.Property = local.data.Description;
                break;
            }
        }

        this.Reset();
    }
示例#2
0
    private void PrintCard(JElementCardProperties cardData)
    {
        Debug.Log("Card Title: " + cardData.locales[0].data.Title);
        Debug.Log("Card Description: " + cardData.locales[0].data.Description);
        Debug.Log("Card Element: " + cardData.Element);
        Debug.Log("Card Image: " + cardData.Image);
        Debug.Log("Card Against Enemy: " + cardData.IsAgainstEnemy);
        Debug.Log("IS AOE: " + cardData.IsAOE);
        Debug.Log("Card Cost: " + cardData.Cost);


        foreach (JClassInfo effect in cardData.PlayerEffects)
        {
            PrintJClassInfo(effect);
        }

        foreach (JClassInfo effect in cardData.TargetEffects)
        {
            PrintJClassInfo(effect);
        }
    }