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


C# ItemClass.ToString方法代码示例

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


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

示例1: GetName

 private string GetName(ushort buildingId, ItemClass.Zone zone, ItemClass.SubService ss)
 {
     Randomizer randomizer = new Randomizer(Singleton<SimulationManager>.instance.m_metaData.m_gameInstanceIdentifier.GetHashCode() - buildingId);
     if (buildingId % 6 != 0)
     {
         Markov markov = null;
         if (!this.buildingNames.TryGetValue(ss.ToString(), out markov))
         {
             this.buildingNames.TryGetValue(zone.ToString(), out markov);
         }
         if (markov != null)
         {
             return markov.GetText(ref randomizer, 6, 16, true, true);
         }
     }
     return this.buildingName.text;
 }
开发者ID:Knighth,项目名称:Cities-Skyline-Proper-Hardness,代码行数:17,代码来源:BuildingInfoWindow.cs

示例2: EndSession

        public static void EndSession(ItemClass.Availability availability)
        {
            try
            {
                if (Mod.IsEnabled && Helper.HasTelemFlag(Mod.config.TelemetryLevel, Helper.TelemOption.DisableAll) ||
                    Helper.HasTelemFlag(Mod.config.TelemetryLevel, Helper.TelemOption.DisableEndSession))
                {
                    if (Mod.DEBUG_LOG_ON) { Helper.dbgLog("End Session telemetry disabled."); }
                    return;
                }

                TelemetryKH telemetry = new TelemetryKH();
                telemetry.AddEvent("end_session", new Telemetry.Pair[]
                {
                    new Telemetry.Pair("type", availability.ToString())
                });
                telemetry.Push();
            }
            catch (Exception ex)
            {
                CODebugBase<LogChannel>.Warn(LogChannel.HTTP, ex.GetType() + ": Telemetry event failed " + ex.Message);
            }
        }
开发者ID:Knighth,项目名称:Telemetry-Control,代码行数:23,代码来源:TelemetryManagerKH.cs

示例3: GetDescription

 private string GetDescription(string bName, ushort buildingId, ItemClass.Zone zone, ItemClass.SubService ss)
 {
     Randomizer randomizer = new Randomizer(Singleton<SimulationManager>.instance.m_metaData.m_gameInstanceIdentifier.GetHashCode() - buildingId);
     var year = 2015 - buildingId % 200;
     Markov markov = null;
     if (!this.buildingDescriptions.TryGetValue(ss.ToString(), out markov))
     {
         this.buildingDescriptions.TryGetValue(zone.ToString(), out markov);
     }
     if (markov != null)
     {
         var text = markov.GetText(ref randomizer, 100, 200, true);
         var cityName = Singleton<SimulationManager>.instance.m_metaData.m_CityName.Trim();
         text = text.Replace("COMPANY", bName).Replace("DATE", year.ToString()).Replace("SITY", cityName);
         return text;
     }
     return "";
 }
开发者ID:Knighth,项目名称:Cities-Skyline-Proper-Hardness,代码行数:18,代码来源:BuildingInfoWindow.cs

示例4: GenerateName

 public static string GenerateName(ItemClass.SubService subservice, Randomizer randomizer)
 {
     return _generateNameHelper(bnd.BuildingNameDataForSubService(subservice.ToString()), randomizer);
 }
开发者ID:wufire,项目名称:CitiesSkylinesBuildingNameGenerator,代码行数:4,代码来源:BuildingNameGenerator.cs


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