Esempio n. 1
0
    private void UpdateSurplusBulidIcon()
    {
        AllyType type   = VATownGenerator.Instance.GetAllyType(m_AllianceID);
        int      iconID = -1;

        switch (type)
        {
        case AllyType.Npc:
        case AllyType.Player:
            iconID = MapIcon.AdventureCamp;
            break;

        case AllyType.Puja:
            iconID = MapIcon.PujaBase;
            break;

        case AllyType.Paja:
            iconID = MapIcon.PajaBase;
            break;
        }
        if (iconID != -1)
        {
            PeMap.MapIcon mapIcon = PeMap.MapIcon.Mgr.Instance.iconList.Find(itr => (itr.id == iconID));
            m_SurplusSpr.spriteName = mapIcon != null ? mapIcon.iconName : "Null";
            m_SurplusSpr.MakePixelPerfect();
        }
    }
Esempio n. 2
0
            public void Load()
            {
                iconList = new List <MapIcon>();
                SqliteDataReader reader = LocalDatabase.Instance.ReadFullTable("Icon");

                while (reader.Read())
                {
                    MapIcon fIcon = new MapIcon();
                    fIcon.id       = Convert.ToInt32(reader.GetString(0));
                    fIcon.iconName = reader.GetString(1);
                    fIcon.iconType = (EMapIcon)Convert.ToInt32(reader.GetString(2));
                    iconList.Add(fIcon);
                }
            }