Beispiel #1
0
    public void DeadPerson(CombatPersonModel person)
    {
        var list = new List <CombatPersonModel>(PersonModels);

        list.Remove(person);
        PersonModels = list.ToArray();
    }
Beispiel #2
0
    private ISquadClientModel FindSquadClientModel(CombatPersonModel combatPersonModel)
    {
        ISquadClientModel clickedSquad = null;

        foreach (var combatSquadModel in _squadModels)
        {
            foreach (var personModel in combatSquadModel.PersonModels)
            {
                if (personModel == combatPersonModel)
                {
                    clickedSquad = combatSquadModel;
                    break;
                }
            }

            if (clickedSquad != null)
            {
                break;
            }
        }

        return(clickedSquad);
    }