Exemplo n.º 1
0
    // Contacts에 Contact 추가
    void AddContact(Contact contact)
    {
        if (contacts.HasValue)
        {
            Contacts contactsValue = contacts.Value;
            contactsValue.contactList.Add(contact);
        }
        else
        {
            List <Contact> contactsList = new List <Contact>();
            contactsList.Add(contact);

            contacts = new Contacts(contactsList);
        }
    }
Exemplo n.º 2
0
    private void Start()
    {
        contacts = FileManager <Contacts> .Load(Constant.kFileName);

        LoadData();
    }
Exemplo n.º 3
0
    private void Start()
    {
        contacts = FileManager <Contacts> .Load("Kname");

        LoadData();
    }
Exemplo n.º 4
0
    //추가
    void AddContact(Contact contact, int k)
    {
        if (contacts.HasValue)
        {
            if (k == 1)
            {
                Contacts playContactList = contacts.Value;
                playContactList.contactList.Add(contact);
                spritesListPlay.Add(contact);
            }
            if (k == 2)
            {
                Contacts killContactList = contacts.Value;
                killContactList.contactList.Add(contact);
                spritesListKill.Add(contact);
            }
            if (k == 3)
            {
                Contacts defenseContactList = contacts.Value;
                defenseContactList.contactList.Add(contact);
                spritesListDefense.Add(contact);
            }
            if (k == 4)
            {
                Contacts stroreContactList = contacts.Value;
                stroreContactList.contactList.Add(contact);
                spritesListStore.Add(contact);
            }
        }
        else
        {
            if (k == 1)
            {
                List <Contact> playContactList = new List <Contact>();
                playContactList.Add(contact);
                spritesListPlay.Add(contact);

                contacts = new Contacts(playContactList);
            }
            if (k == 2)
            {
                List <Contact> killContactList = new List <Contact>();
                killContactList.Add(contact);
                spritesListKill.Add(contact);

                contacts = new Contacts(killContactList);
            }
            if (k == 3)
            {
                List <Contact> defenseContactList = new List <Contact>();
                defenseContactList.Add(contact);
                spritesListDefense.Add(contact);

                contacts = new Contacts(defenseContactList);
            }
            if (k == 4)
            {
                List <Contact> stroreContactList = new List <Contact>();
                stroreContactList.Add(contact);
                spritesListStore.Add(contact);

                contacts = new Contacts(stroreContactList);
            }
        }
    }