本文整理汇总了C#中PlayerInfo.AddLog方法的典型用法代码示例。如果您正苦于以下问题:C# PlayerInfo.AddLog方法的具体用法?C# PlayerInfo.AddLog怎么用?C# PlayerInfo.AddLog使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PlayerInfo
的用法示例。
在下文中一共展示了PlayerInfo.AddLog方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: WriteFile
void WriteFile(PlayerInfo info, string data)
{
if (info.writer != null)
info.writer.WriteLine(data);
else
info.AddLog("debug", "WriteFile: info.writer = null");
}
示例2: CloseFile
void CloseFile(PlayerInfo info)
{
if (info.writer != null)
{
info.writer.WriteLine(info.writer.NewLine);
info.writer.Close();
info.writer = null;
}
else
info.AddLog("debug", "WriteFile: info.writer = null");
}
示例3: OpenFile
void OpenFile(PlayerInfo info, string filename, bool overwrite)
{
#if SERVER_BUILD
if (overwrite == true)
{
string test = info.filePath + "/" + info.userid + "-" + info.sessionid + "-" + filename;
info.writer = System.IO.File.CreateText(test);
info.AddLog("debug", "OpenFile(overwrite:=" + test + ")");
}
else
{
// get extension
string extention = Path.GetExtension(filename);
// make filename
filename = Path.GetFileNameWithoutExtension(filename);
int i = 0;
while (true)
{
string test = info.filePath + "/" + info.userid + "-" + info.sessionid + "-" + filename + "-" + i.ToString() + extention;
if (!File.Exists(test))
{
info.AddLog("debug", "OpenFile(test=" + test + ")");
info.writer = File.CreateText(test);
break;
}
i++;
}
}
#endif
}