Last active
August 29, 2015 14:13
-
-
Save lukaspj/61b90c9d65532bc4819d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DynamicSimSet dynInst = (dynamic)new ObjectInstance("SimSet", "TestObject3") | |
{ | |
Dynamics = | |
{ | |
Fish1 = "TestVal" | |
} | |
}; | |
DynamicSimObject dynSim = (dynamic)new SimObjectInstance("TestObject4") | |
{ | |
Dynamics = | |
{ | |
Fish1 = "TestVal2" | |
} | |
}; | |
DynamicSimObject dynSFX = (dynamic) new SFXSourceInstance(_name: "TestObject5", | |
_statusCallback: "Callback") | |
{ | |
Dynamics = | |
{ | |
Fish1 = "TestVal3" | |
} | |
}; | |
dynInst.add(dynSFX.ID); | |
dynamic id = (TorqueID) dynInst.getObject(0); | |
omni.Util._echo(dynInst.Dynamics.Fish1 + " " + dynSim.Dynamics.Fish1 + " " + ((DynamicSimObject)id).Dynamics.Fish1); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SimSet setInst = (dynamic)new ObjectInstance("SimSet", "TestObject1") | |
{ | |
Dynamics = | |
{ | |
Fish1 = "TestVal" | |
} | |
}; | |
SimObject inst = (dynamic)new SimObjectInstance("TestObject2") | |
{ | |
Dynamics = | |
{ | |
Fish1 = "TestVal2" | |
} | |
}; | |
setInst.add(inst); | |
omni.Util._echo(setInst["Fish1"] + " " + inst["Fish1"] + " " + ((SimObject)setInst.getObject(0))["Fish1"]); | |
// Alternative to: | |
ObjectCreator objectCreator1 = new ObjectCreator("SimSet", "TestObject6"); | |
objectCreator1["Fish1"] = "TestVal2"; | |
ObjectCreator objectCreator2 = new ObjectCreator("SimObject", "TestObject7"); | |
objectCreator2["Fosj1"] = "TestVal2"; | |
objectCreator1["#object1"] = objectCreator2; | |
setInst = objectCreator1.Create(); | |
omni.Util._echo(setInst["Fish1"] + " " + ((SimObject)setInst.getObject(0))["Fish1"]); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment