本文整理汇总了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;
}
示例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);
}
}
示例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 "";
}
示例4: GenerateName
public static string GenerateName(ItemClass.SubService subservice, Randomizer randomizer)
{
return _generateNameHelper(bnd.BuildingNameDataForSubService(subservice.ToString()), randomizer);
}