Ejemplo n.º 1
0
        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());
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="simobjectid"></param>
        public tsObject(uint simobjectid)
        {
            _mSimObjectId = simobjectid.AsString();
            dnTorque temp = dnTorque.self;

            _mtst = new TorqueScriptTemplate(ref temp);
        }
Ejemplo n.º 3
0
 public void Push(uint value)
 {
     values.Add(new Value()
     {
         type  = "uint",
         value = value.AsString()
     });
 }
Ejemplo n.º 4
0
        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);
            }
        }
Ejemplo n.º 5
0
        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);
            }
        }
Ejemplo n.º 6
0
        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());
        }
Ejemplo n.º 7
0
        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");
        }
Ejemplo n.º 8
0
 internal virtual void SetUpObject(uint simobjectid)
 {
     _ID  = simobjectid.AsString();
     _iID = simobjectid;
 }
Ejemplo n.º 9
0
        /// <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);
        }
Ejemplo n.º 10
0
 protected virtual void OnReceive(uint value)
 {
     Debug.Log("receive uint: " + value.AsString());
 }
Ejemplo n.º 11
0
 protected void Send(uint value)
 {
     Send(value.AsString(), "uint");
 }