当前位置: 首页>>代码示例>>C#>>正文


C# Lot.GetUnfurnishedCost方法代码示例

本文整理汇总了C#中Lot.GetUnfurnishedCost方法的典型用法代码示例。如果您正苦于以下问题:C# Lot.GetUnfurnishedCost方法的具体用法?C# Lot.GetUnfurnishedCost怎么用?C# Lot.GetUnfurnishedCost使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Lot的用法示例。


在下文中一共展示了Lot.GetUnfurnishedCost方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: GetDetails

        public static string GetDetails(Lot lot, Household me)
        {
            string msg = null;
            if (me != null)
            {
                msg += Common.Localize("StatusHouse:HouseName", false, new object[] { me.Name });
            }

            if (lot != null)
            {
                msg += Common.Localize("StatusHouse:LotName", false, new object[] { lot.Name });
            }

            if (me != null)
            {
                msg += Common.Localize("StatusHouse:Funds", false, new object[] { me.FamilyFunds });

                if (me.RealEstateManager != null)
                {
                    int realEstate = 0;
                    foreach (PropertyData data in me.RealEstateManager.AllProperties)
                    {
                        realEstate += data.TotalValue;
                    }

                    msg += Common.Localize("StatusHouse:RealEstate", false, new object[] { realEstate });
                }


                if (lot != null)
                {
                    int taxes, savings, vacationHome;
                    GetTaxes(me, out taxes, out savings, out vacationHome);
                    msg += Common.Localize("StatusHouse:Taxes", false, new object[] { (taxes - vacationHome) + savings, vacationHome, savings, taxes });
                }
            }

            if (lot == null)
            {
                msg += Common.Localize("StatusHouse:Homeless");
            }
            else
            {
                msg += Common.Localize("StatusHouse:Address", false, new object[] { lot.Address, Lots.GetUnfurnishedCost(lot), lot.Cost - lot.GetUnfurnishedCost(), lot.Cost });

                int iFridges = 0, iCribs = 0, iSingleBeds = 0, iDoubleBeds = 0;

                List<IGameObject> lotObjects = new List<IGameObject>(lot.GetObjects<IGameObject>());
                foreach (IGameObject obj in lotObjects)
                {
                    if (obj is Sims3.Gameplay.Objects.Appliances.Fridge)
                    {
                        iFridges++;
                    }
                    else if (obj is ICrib)
                    {
                        iCribs++;
                    }
                    else if (obj is IBedDouble)
                    {
                        iDoubleBeds++;
                    }
                    else if (obj is IBedSingle)
                    {
                        iSingleBeds++;
                    }
                }

                msg += Common.Localize("StatusHouse:Objects", false, new object[] { iFridges, iCribs, iDoubleBeds, iSingleBeds });
            }

            if ((me != null) && (!SimTypes.IsService(me)))
            {
                int count = 0;
                string occupants = null;

                foreach (SimDescription sim in CommonSpace.Helpers.Households.All(me))
                {
                    occupants += Common.NewLine + sim.FullName;

                    count++;
                    if (count >= 24) break;
                }

                msg += Common.Localize("StatusHouse:Occupants", false, new object[] { occupants });
            }

            return msg;
        }
开发者ID:Robobeurre,项目名称:NRaas,代码行数:89,代码来源:StatusBase.cs

示例2: GetLotCost

        public static int GetLotCost(Lot lot, bool buyFurnished)
        {
            if (Settings.mFreeRealEstate) return 0;

            if ((BinModel.Singleton != null) && (BinModel.Singleton.FreeRealEstate)) return 0;

            if (lot.IsApartmentLot) return 0;

            if (sStoryProgressionGetLotCost.Valid)
            {
                int rentalCost = sStoryProgressionGetLotCost.Invoke<int>(new object[] { lot });

                if (rentalCost != lot.Cost)
                {
                    if (buyFurnished)
                    {
                        return rentalCost;
                    }
                    else
                    {
                        return 0;
                    }
                }
            }
            
            if (buyFurnished)
            {
                return lot.Cost;
            }
            else
            {
                return lot.GetUnfurnishedCost();
            }
        }
开发者ID:Robobeurre,项目名称:NRaas,代码行数:34,代码来源:Mover.cs


注:本文中的Lot.GetUnfurnishedCost方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。