Example #1
0
 public void Load()
 {
     //Units
     XMLDataSerializer.LoadUnits("Assets/Data/Units.xml");
     //Cards
     XMLDataSerializer.LoadCards("Assets/Data/Cards.xml");
     //Todo Abilities
     //XMLDataSerializer.LoadAbilities("Assets/Data/Abilities.xml");
 }
    void CreatCard()
    {
        XMLDataSerializer.LoadCards("Assets/Data/Cards.xml");
        //CardList cl = new CardList("main");

        switch (cardTypeInt)
        {
        case 0:
            Action act = new Action();

            act.type                = NSGameplay.Cards.ECardType.Instant;
            act.cost                = utilityCost;
            act.name                = cardName;
            act.tooltip             = new NSGameplay.Cards.Tooltip();
            act.tooltip.description = cardDescription;
            act.tooltip.title       = cardDescTitle;
            act.tooltip.image_Path  = "path of an image";
            act.damageOut           = damageOut;
            act.damageIn            = damageIn;
            act.healOut             = healOut;
            act.healIn              = healIn;
            act.armorUpIn           = armorUpIn;
            act.armorUpOut          = armorUpOut;
            act.armorDownIn         = armorDownIn;
            act.armorDownOut        = armorDownOut;

            Libraries.instance.Save_Card_Local(act);
            Libraries.instance.Save_Cards_To_File();
            break;

        case 1:
            Minion min = new Minion();

            min.type                = NSGameplay.Cards.ECardType.Minion;
            min.cost                = 2;
            min.name                = cardName;
            min.tooltip             = new NSGameplay.Cards.Tooltip();
            min.tooltip.description = cardDescription;
            min.tooltip.title       = cardDescTitle;
            min.tooltip.image_Path  = "path of an image";
            min.attack              = minionAttack;
            min.baseDefence         = minionBaseDefense;
            min.defence             = minionBaseDefense;
            min.health              = minionHealth;

            Libraries.instance.Save_Card_Local(min);
            Libraries.instance.Save_Cards_To_File();
            break;

        case 2:
            Passive pas = new Passive();


            break;
        }
    }
Example #3
0
 private void LoadCards()
 {
     XMLDataSerializer.LoadCards("Assets/Data/Cards.xml");
 }