public void Setup()
        {
            participant = new ActionParticipant("name");
            var participants = new[] { participant };

            partyViewModel = new PartyViewModel(participants);
            addPartyMemberActionCommand = new AddPartyMemberActionCommand(partyViewModel);
        }
Ejemplo n.º 2
0
        public PartyViewModel(IEnumerable<ActionParticipant> participants)
        {
            allParticipants = new List<ActionParticipant>(participants);
            Party = new ObservableCollection<ActionParticipant>();
            Enemies = new ObservableCollection<ActionParticipant>();
            PartyMemberActions = new ObservableCollection<BattleAction>();
            EnemyActions = new ObservableCollection<BattleAction>();

            
            AddEnemyActionCommand = new AddEnemyActionCommand(this);
            EditEnemyActionCommand = new EditEnemyActionCommand(this);
            RemoveEnemyActionCommand = new RemoveEnemyActionCommand(this);
            EditEnemyCommand = new EditEnemyCommand(this);
            RemoveEnemyCommand = new RemoveEnemyCommand(this);
            EditPartyMemberCommand = new EditPartyMemberCommand(this);
            RemovePartyMemberCommand = new RemovePartyMemberCommand(this);
            AddPartyMemberActionCommand = new AddPartyMemberActionCommand(this);
            EditPartyMemberActionCommand = new EditPartyMemberActionCommand(this);
            RemovePartyMemberActionCommand = new RemovePartyMemberActionCommand(this);

            UpdateParties();
        }