示例#1
0
 public PerkWrapper(Perk purk, CharacterVM vm)
 {
     VM      = vm;
     perk    = purk;
     Taken   = purk.Taken;
     Takable = purk.Takable;
     Effect  = purk.Effect;
 }
        public CharacterList()
        {
            //Connection connection = new Connection();
            CharacterVM Characters = new CharacterVM();

            //Characters.CharacterList = connection.LoadCharacters();
            //System.Diagnostics.Debug.WriteLine("amount of characters: " + Characters.CharacterList.Count);
            BindingContext = Characters;
            InitializeComponent();
        }
示例#3
0
 public Character(Hero hero1, List <Item> items, List <PerkWrapper> perks, CharacterVM charVM)
 {
     Items         = new ObservableCollection <Item>();
     Perks         = new ObservableCollection <PerkWrapper>();
     this.hero     = hero1;
     myCharacterVM = charVM;
     Name          = hero.Name;
     Gold          = hero.Gold;
     Experience    = hero.Experience;
     HeroID        = hero.HeroID;
     Class         = hero.Class;
     foreach (var item in items)
     {
         Items.Add(item);
     }
     foreach (var perk in perks)
     {
         Perks.Add(perk);
     }
 }