本文整理汇总了C#中Library.IsLit方法的典型用法代码示例。如果您正苦于以下问题:C# Library.IsLit方法的具体用法?C# Library.IsLit怎么用?C# Library.IsLit使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Library
的用法示例。
在下文中一共展示了Library.IsLit方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Parse
public IList<String> Parse(string input, bool showOutput)
{
Context.Parser = this;
Context.Object = null;
Context.IndirectObject = null;
parserResults = new List<string>();
Library L = new Library();
bool wasLit = L.IsLit();
var userInput = new UserInput();
var inputResult = userInput.Parse(input);
isAll = inputResult.IsAll;
if (inputResult.HasError)
{
parserResults.Add(inputResult.Error);
}
else
{
HandleInputResult(inputResult);
}
if (!wasLit && L.IsLit())
L.Look(true);
return GetResults(showOutput);
}
示例2: ExamineObject
public bool ExamineObject()
{
Library L = new Library();
if (!L.IsLit())
{
Print("Darkness, noun. An absence of light to see by.");
return true;
}
if (Object.IsScenery && string.IsNullOrEmpty(Object.Description))
{
Print("You see nothing special about the {0}.", Object.Name);
}
else if (Object is Room)
{
Print("That's not something you need to refer to in the course of this game.");
}
else if (Object.Describe != null)
{
string result = Object.Describe();
if (!String.IsNullOrEmpty(result))
Print(result);
else
Print(Object.Description);
}
else if (!string.IsNullOrEmpty(Object.Description))
{
Print(Object.Description);
}
else
{
Print("That's not something you need to refer to in the course of this game.");
}
return true;
}