public void findAllTerrains() { GuiListBoxCtrl TerrainSelectListBox = "TerrainSelectListBox"; TerrainSelectListBox.clearItems(); if ("MegaTerrain".isObject()) { TerrainSelectListBox.addItem("MegaTerrain", ""); } // Find all of the terrain files Util.initContainerTypeSearch((uint)SceneObjectTypesAsUint.TerrainObjectType, false); string terrainObject = Util.containerSearchNext(false); while (terrainObject != "0") { uint terrainID = terrainObject.getUID(); string terrainName = terrainObject.getName(); if (terrainName == "") { terrainName = "Unnamed (" + terrainID + ")"; } TerrainSelectListBox.addItem(terrainName, terrainID.AsString()); } }
/// <summary> /// /// </summary> /// <param name="simobjectid"></param> public tsObject(uint simobjectid) { _mSimObjectId = simobjectid.AsString(); dnTorque temp = dnTorque.self; _mtst = new TorqueScriptTemplate(ref temp); }
public void Push(uint value) { values.Add(new Value() { type = "uint", value = value.AsString() }); }
public virtual void MoveToNode(uint index) { this["currentNode"] = index.AsString(); ((SimSet)this["path"]).getObject(index); Marker node = ((SimSet)this["path"]).getObject(index); if (this.getMoveDestination() != node.getTransform().GetPosition()) { this.setMoveDestination(node.getTransform().GetPosition(), false); } }
public void AiPlayerMoveToNode(coAIPlayer npc, uint index) { npc["currentNode"] = index.AsString(); ((coSimSet)npc["path"]).getObject(index); coMarker node = ((coSimSet)npc["path"]).getObject(index); if (npc.getMoveDestination() != node.getTransform().MPosition) { npc.setMoveDestination(node.getTransform().MPosition, false); } }
public static void DbgRemoveBreakPoint(string file, uint line) { DebuggerFileView DebuggerFileView = "DebuggerFileView"; DebuggerBreakPoints DebuggerBreakPoints = "DebuggerBreakPoints"; TCPDebugger TCPDebugger = "TCPDebugger"; if (file == omni.sGlobal["$DebuggerFile"]) { DebuggerFileView.removeBreak(line); } TCPDebugger.send("BRKCLR " + file + " " + line + "\r\n"); DebuggerBreakPoints.removeBreak(file, line.AsString()); }
public static void DbgSetBreakPoint(string file, uint line, bool clear, string passct, string expr) { DebuggerFileView DebuggerFileView = "DebuggerFileView"; DebuggerBreakPoints DebuggerBreakPoints = "DebuggerBreakPoints"; TCPDebugger TCPDebugger = "TCPDebugger"; if (!clear) { if (file == omni.sGlobal["$DebuggerFile"]) { DebuggerFileView.setBreak(line); } } DebuggerBreakPoints.addBreak(file, line.AsString(), clear, passct, expr); TCPDebugger.send("BRKSET " + file + " " + line + " " + clear + " " + passct + " " + expr + "\r\n"); }
internal virtual void SetUpObject(uint simobjectid) { _ID = simobjectid.AsString(); _iID = simobjectid; }
/// <summary> /// Fetches a proxy from the proxy array. /// </summary> /// <param name="simobjectid"></param> /// <param name="type"></param> /// <returns></returns> public ModelBase getSimObject(uint simobjectid, Type type) { int cindex = GetVar(simobjectid + ".WLE_OMNI_ARRAY_POSTION").AsInt(); if (cindex != 0) { return(_msimdict[cindex]); } string torqueClassName = _mlNameSpaceUserObjectsProxyObjects + fn_SimObject_getClassName(simobjectid.AsString()).ToLower(); string overrideClassNamespace = (GetVar(simobjectid + ".WLE_OVERRIDE_PROXY_CLASSTYPE")).ToLower(); ModelBase proxyobject = null; if (MCustomClassDef.ContainsKey(overrideClassNamespace)) { proxyobject = (ModelBase)CreateObject(MCustomClassDef[overrideClassNamespace].mType); proxyobject.SetUpObject(simobjectid); InsertRecordIntoSimDictionary(proxyobject); return(proxyobject); } if (MCustomClassDef.ContainsKey(torqueClassName)) { proxyobject = (ModelBase)CreateObject(MCustomClassDef[torqueClassName].mType); proxyobject.SetUpObject(simobjectid); InsertRecordIntoSimDictionary(proxyobject); return(proxyobject); } proxyobject = (ModelBase)CreateObject(type); proxyobject.SetUpObject(simobjectid); if (proxyobject.isObject()) { InsertRecordIntoSimDictionary(proxyobject); } return(proxyobject); }
protected virtual void OnReceive(uint value) { Debug.Log("receive uint: " + value.AsString()); }
protected void Send(uint value) { Send(value.AsString(), "uint"); }