Exemplo n.º 1
0
    private UIParty CreateUIParty(MenuPartyData party, DataController data)
    {
        UIParty curParty = new UIParty();

        curParty.partyId   = party.id;
        curParty.partyName = party.name;
        if (data.GetCurrentPlayerParty() == party.id)
        {
            curParty.selected = true;
        }
        return(curParty);
    }
    public void Setup(UIParty currentParty, PartiesMenu currentPartiesMenu, List <UICharacter> characters, MenuPartyData[] menuParties)
    {
        menuPartyData = menuParties;
        foreach (UICharacter character in characters)
        {
            character.partyId = currentParty.partyId;
        }
        foreach (MenuPartyData menuParty in menuPartyData)
        {
            if (currentParty.partyId == menuParty.id)
            {
                party = menuParty;
            }
        }
        RefreshDisplay(characters, party);
        AppendDataToButtons(currentParty.partyId);

        // we have the party ID at this point

        partiesMenu = currentPartiesMenu;
    }
Exemplo n.º 3
0
    public List <UIParty> PartyInfoFormat(DataController data, MenuPartyData[] parties, MenuCharacterData[] characters)
    {
        List <UIParty> returnParties = new List <UIParty>();

        // cycle through parties
        foreach (MenuPartyData curParty in parties)
        {
            int[]              characterIdsArray = { curParty.slotOneCharacterId, curParty.slotTwoCharacterId, curParty.slotThreeCharacterId, curParty.slotFourCharacterId };
            List <int>         characterIds      = FillCharacterSlots(characterIdsArray);
            UIParty            party             = CreateUIParty(curParty, data);
            List <UICharacter> members           = new List <UICharacter>();

            // cycle through characters
            for (int i = 0; i < characterIds.Count; i++)
            {
                members.Add(CreateUICharacter(characters[characterIds[i]], data));
            }
            party.characters = members;
            returnParties.Add(party);
        }
        return(returnParties);
    }
 public void SwapCharacterInParty(UIParty party, int oldCharacterId, int newCharacterId)
 {
 }