コード例 #1
0
        public static void ClearDictionaries()
        {
            States.Clear();
            Continents.Clear();
            PopTypes.Clear();
            Goods.Clear();
            CountryTags.Clear();
            Religions.Clear();
            Cultures.Clear();
            CultureGroups.Clear();
            Ideologies.Clear();
            Buildings.Clear();
            PolicyGroups.Clear();
            SubPolicies.Clear();
            Schools.Clear();
            Techs.Clear();
            Inventions.Clear();
            Units.Clear();
            Governments.Clear();
            Crimes.Clear();
            EventModifiers.Clear();
            NationalValues.Clear();
            Terrain.Clear();

            States         = null;
            Continents     = null;
            PopTypes       = null;
            Goods          = null;
            CountryTags    = null;
            Religions      = null;
            Cultures       = null;
            CultureGroups  = null;
            Ideologies     = null;
            Buildings      = null;
            PolicyGroups   = null;
            SubPolicies    = null;
            Schools        = null;
            Techs          = null;
            Inventions     = null;
            Units          = null;
            Governments    = null;
            Crimes         = null;
            EventModifiers = null;
            NationalValues = null;
            Terrain        = null;
        }
コード例 #2
0
    public PopType(PopTypes itype, Storage iproduces, string iname)
    {
        type            = itype;
        name            = iname;
        basicProduction = iproduces;
        allPopTypes.Add(this);
        switch (itype)
        {
        case PopTypes.Tribemen:
            tribeMen = this;
            lifeNeeds.Set(new Storage(Product.Food, 1));
            everyDayNeeds.Set(new Storage(Product.Food, 2));
            luxuryNeeds.Set(new Storage(Product.Food, 3));
            break;

        case PopTypes.Aristocrats:
            aristocrats = this;
            lifeNeeds.Set(new Storage(Product.Food, 1));

            everyDayNeeds.Set(new Storage(Product.Fruit, 1));


            luxuryNeeds.Set(new Storage(Product.Clothes, 1));
            luxuryNeeds.Set(new Storage(Product.Furniture, 1));

            luxuryNeeds.Set(new Storage(Product.Wine, 2));
            luxuryNeeds.Set(new Storage(Product.Metal, 1));
            luxuryNeeds.Set(new Storage(Product.Cement, 0.5f));
            break;

        case PopTypes.Capitalists:
            capitalists = this;
            lifeNeeds.Set(new Storage(Product.Food, 1));

            luxuryNeeds.Set(new Storage(Product.Fruit, 1));

            everyDayNeeds.Set(new Storage(Product.Clothes, 1));
            everyDayNeeds.Set(new Storage(Product.Furniture, 1));

            everyDayNeeds.Set(new Storage(Product.Wine, 2));
            everyDayNeeds.Set(new Storage(Product.Metal, 1));
            everyDayNeeds.Set(new Storage(Product.Cement, 0.5f));
            break;

        case PopTypes.Farmers:
            farmers = this;
            lifeNeeds.Set(new Storage(Product.Food, 1f));

            //everyDayNeeds.Set(new Storage(Product.Fruit, 1));
            everyDayNeeds.Set(new Storage(Product.Stone, 1));
            everyDayNeeds.Set(new Storage(Product.Wood, 1));
            everyDayNeeds.Set(new Storage(Product.Wool, 1));
            everyDayNeeds.Set(new Storage(Product.Lumber, 1));
            everyDayNeeds.Set(new Storage(Product.MetallOre, 1));

            luxuryNeeds.Set(new Storage(Product.Clothes, 1));
            luxuryNeeds.Set(new Storage(Product.Furniture, 1));

            luxuryNeeds.Set(new Storage(Product.Wine, 2));
            luxuryNeeds.Set(new Storage(Product.Metal, 1));
            luxuryNeeds.Set(new Storage(Product.Cement, 0.5f));

            break;

        case PopTypes.Artisans:
            artisans = this;
            break;

        case PopTypes.Soldiers:
            soldiers = this;
            break;

        case PopTypes.Workers:
            workers = this;
            lifeNeeds.Set(new Storage(Product.Food, 1));

            everyDayNeeds.Set(new Storage(Product.Fruit, 1));

            everyDayNeeds.Set(new Storage(Product.Clothes, 1));
            everyDayNeeds.Set(new Storage(Product.Furniture, 1));

            luxuryNeeds.Set(new Storage(Product.Wine, 2));
            everyDayNeeds.Set(new Storage(Product.Metal, 1));


            break;

        default:
            Debug.Log("Unnown PopType");
            break;
        }
    }