本文整理汇总了C#中Util.getWithin方法的典型用法代码示例。如果您正苦于以下问题:C# Util.getWithin方法的具体用法?C# Util.getWithin怎么用?C# Util.getWithin使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Util
的用法示例。
在下文中一共展示了Util.getWithin方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: logObj
public static string logObj(string when, string id, string spellname)
{
GameObject g = ObjectManager.FindById(id);
// Object id, type/name, position, ground height at position, is on fire
bool flaming = false;
if (g.GetComponent<Flamable>())
flaming = g.GetComponent<Flamable>().isIgnited();
TraceLogger.LogKV("object"+when, spellname+", "+id+", "+g.name+", "+g.transform.position+", "+Terrain.activeTerrain.SampleHeight(g.transform.position)+", "+flaming);
Util util = new Util();
if (when.Equals("end") && g.name.Equals("Flag(Clone)")) {
util.getWithin(id);
// foreach (string i in util.getWithin(id).Split(new char[] {';'}, StringSplitOptions.RemoveEmptyEntries)) {
// GameObject gobj = ObjectManager.FindById(i);
//
// // Object id, type/name, position, ground height at position, is on fire
// flaming = false;
// if (gobj.GetComponent<Flamable>())
// flaming = gobj.GetComponent<Flamable>().isIgnited();
// TraceLogger.LogKV("object"+when, spellname+", "+i+", "+gobj.name+", "+gobj.transform.position+", "+Terrain.activeTerrain.SampleHeight(gobj.transform.position)+", "+flaming);
// }
}
return g.name;
}
示例2: logObj
// log information about each object used in a spell
public static string logObj(string when, string id, string spellname)
{
GameObject g = ObjectManager.FindById(id);
// Object id, type/name, position, ground height at position, is on fire
bool flaming = false;
if (g.GetComponent<Flamable>())
flaming = g.GetComponent<Flamable>().isIgnited();
TraceLogger.LogKV("object"+when, spellname+", "+id+", "+g.name+", "+g.transform.position+", "+Terrain.activeTerrain.SampleHeight(g.transform.position)+", "+flaming);
Util util = new Util();
if (when.Equals("end") && g.name.Equals("Flag(Clone)")) {
util.getWithin(id);
}
return g.name;
}