Example #1
0
        protected PartyMember(String id, PartyMemberPowerSet powerSet, PartyMemberStats stats, PartyMemberBattleLogic battleLogic, 
            PartyMemberEquipmentLayout equipmentLayout)
            : base(id, stats, battleLogic)
        {
            PowerSet = powerSet;
            EquipmentLayout = equipmentLayout;

            PortraitSource = ResourceUtility.GetCharacterFaceResourceLocation(id);

            //wire up the available gifts property
            var availableGiftsBinding = new MultiBinding { Converter = new PartyMemberAvailableGiftsConverter() };
            availableGiftsBinding.Bindings.Add(new Binding("PowerSet") { Source = this });
            availableGiftsBinding.Bindings.Add(new Binding("CurrentGiftTypeExperienceById") { Source = this });
            availableGiftsBinding.Bindings.Add(new Binding("GiftSortOrder") { Source = SettingsModel.Instance });
            BindingOperations.SetBinding(this, AvailableGiftsProperty, availableGiftsBinding);

            //wire up the gift rows property
            var giftRowsBinding = new Binding("AvailableGifts") { Source = this, Converter = new MenuGiftRowsConverter() };
            BindingOperations.SetBinding(this, GiftRowsProperty, giftRowsBinding);
        }
Example #2
0
 //TODO: A method (or event) that handles when a party member uses a gift, to track gift type experience
 //      (in/out of battle?)
 public static PartyMember New(String id, PartyMemberPowerSet powerSet, PartyMemberStats stats, PartyMemberBattleLogic battleLogic, PartyMemberEquipmentLayout equipmentLayout)
 {
     return new PartyMember(id, powerSet, stats, battleLogic, equipmentLayout);
 }