public static void initialize() { #region SoftBodyData ( PhysFlag ) oc_Newobject1 DatablockCreator oc_Newobject1 = new DatablockCreator("SoftBodyData", " PhysFlag "); oc_Newobject1["category"] = "SoftBody"; oc_Newobject1["shapeFile"] = "art/shapes/flag/Triapko.dts"; oc_Newobject1["mass"] = new Creator.StringNoQuote("5"); oc_Newobject1["poseMatchKoef"] = new Creator.StringNoQuote("0"); oc_Newobject1["scale"] = "1 1 1"; oc_Newobject1["attachedPointsNum"] = new Creator.StringNoQuote("2"); oc_Newobject1["attachedPoints[0]"] = "-10 10 0"; oc_Newobject1["attachedPoints[1]"] = "10 10 0"; oc_Newobject1["onlyOnClient"] = new Creator.StringNoQuote("true"); #endregion oc_Newobject1.Create(); #region SoftBodyData ( PhysSoftSphere ) oc_Newobject2 DatablockCreator oc_Newobject2 = new DatablockCreator("SoftBodyData", " PhysSoftSphere "); oc_Newobject2["category"] = "SoftBody"; oc_Newobject2["shapeFile"] = "art/shapes/ball/ball.dts"; oc_Newobject2["shapeType"] = new Creator.StringNoQuote("$ShapeType::SoftMesh"); oc_Newobject2["mass"] = new Creator.StringNoQuote("3"); oc_Newobject2["scale"] = "0.4 0.4 0.4"; oc_Newobject2["poseMatchKoef"] = new Creator.StringNoQuote("0.2"); oc_Newobject2["slidingThreshold"] = new Creator.StringNoQuote("0.7"); oc_Newobject2["minContactSpeed"] = new Creator.StringNoQuote("1.0"); oc_Newobject2["collisionSoundsCount"] = new Creator.StringNoQuote("1"); oc_Newobject2["collisionSound[0]"] = new Creator.StringNoQuote("boxFall0"); oc_Newobject2["slideSoundsCount"] = new Creator.StringNoQuote("1"); oc_Newobject2["slideSound[0]"] = new Creator.StringNoQuote("stoneRoll0"); oc_Newobject2["onlyOnClient"] = new Creator.StringNoQuote("true"); #endregion oc_Newobject2.Create(); //----------------------------------------------------------------------------- // for Game Mechanics Editor //----------------------------------------------------------------------------- omni.Util.activatePackage("TemplateFunctions"); //TODO FIX //inheritTemplate("PhysFlag", "AbstractRigidBody"); //registerTemplate("PhysFlag", "Physics", "SoftBodyData::create(PhysFlag);"); //inheritTemplate("PhysSoftSphere", "AbstractRigidBody"); //registerTemplate("PhysSoftSphere", "Physics", "SoftBodyData::create(PhysSoftSphere);"); omni.Util.deactivatePackage("TemplateFunctions"); }
public static void initialize() { #region RagDollData (SpaceOrcRagDoll) oc_Newobject1 DatablockCreator oc_Newobject1 = new DatablockCreator("RagDollData", "SpaceOrcRagDoll"); oc_Newobject1["category"] = "RigidBody"; oc_Newobject1["shapeFile"] = "art/shapes/actors/SpaceOrc/SpaceOrc.dts"; oc_Newobject1["minContactSpeed"] = new Creator.StringNoQuote("5.0"); oc_Newobject1["slidingThreshold"] = new Creator.StringNoQuote("0.5"); oc_Newobject1["collisionSoundsCount"] = new Creator.StringNoQuote("1"); oc_Newobject1["collisionSound[0]"] = new Creator.StringNoQuote("bodyFall0"); oc_Newobject1["boneNodeName[0]"] = "Bip01 Pelvis"; oc_Newobject1["boneSize[0]"] = "0.4 0.1 0.0"; oc_Newobject1["boneMass[0]"] = new Creator.StringNoQuote("1"); oc_Newobject1["boneShape[0]"] = new Creator.StringNoQuote("$ShapeType::Capsule"); oc_Newobject1["boneOffset[0]"] = "0 0 0"; oc_Newobject1["boneParentNodeName[1]"] = "Bip01 Pelvis"; oc_Newobject1["boneNodeName[1]"] = "Bip01 Spine2"; oc_Newobject1["boneSize[1]"] = "0.2 0.2 0.0"; oc_Newobject1["boneMass[1]"] = new Creator.StringNoQuote("1"); oc_Newobject1["boneShape[1]"] = new Creator.StringNoQuote("$ShapeType::Capsule"); oc_Newobject1["boneJointType[1]"] = new Creator.StringNoQuote("$JointType::Hinge"); oc_Newobject1["boneOffset[1]"] = "0 0 0"; oc_Newobject1["boneJointParam[1]"] = "0 1.57 0"; oc_Newobject1["boneParentNodeName[2]"] = "Bip01 Spine2"; oc_Newobject1["boneNodeName[2]"] = "Bip01 Head"; oc_Newobject1["boneSize[2]"] = "0.2 0.1 0.0"; oc_Newobject1["boneMass[2]"] = new Creator.StringNoQuote("1"); oc_Newobject1["boneShape[2]"] = new Creator.StringNoQuote("$ShapeType::Capsule"); oc_Newobject1["boneOffset[2]"] = "0 0 0"; oc_Newobject1["boneJointType[2]"] = new Creator.StringNoQuote("$JointType::ConeTwist"); oc_Newobject1["boneJointParam[2]"] = "0.785 0.785 0"; oc_Newobject1["boneParentNodeName[3]"] = "Bip01 Spine2"; oc_Newobject1["boneNodeName[3]"] = "Bip01 L UpperArm"; oc_Newobject1["boneSize[3]"] = "0.2 0.3 0.0"; oc_Newobject1["boneMass[3]"] = new Creator.StringNoQuote("1"); oc_Newobject1["boneShape[3]"] = new Creator.StringNoQuote("$ShapeType::Capsule"); oc_Newobject1["boneOffset[3]"] = "0 0 0"; oc_Newobject1["boneJointType[3]"] = new Creator.StringNoQuote("$JointType::ConeTwist"); oc_Newobject1["boneJointParam[3]"] = "0.785 0.785 0"; oc_Newobject1["boneParentNodeName[4]"] = "Bip01 L UpperArm"; oc_Newobject1["boneNodeName[4]"] = "Bip01 L Forearm"; oc_Newobject1["boneSize[4]"] = "0.2 0.4 0.0"; oc_Newobject1["boneMass[4]"] = new Creator.StringNoQuote("1"); oc_Newobject1["boneShape[4]"] = new Creator.StringNoQuote("$ShapeType::Capsule"); oc_Newobject1["boneOffset[4]"] = "0 0 0"; oc_Newobject1["boneJointType[4]"] = new Creator.StringNoQuote("$JointType::Hinge"); oc_Newobject1["boneJointParam[4]"] = "-1.57 0 0"; oc_Newobject1["boneParentNodeName[5]"] = "Bip01 Spine2"; oc_Newobject1["boneNodeName[5]"] = "Bip01 R UpperArm"; oc_Newobject1["boneSize[5]"] = "0.2 0.3 0.0"; oc_Newobject1["boneMass[5]"] = new Creator.StringNoQuote("1"); oc_Newobject1["boneShape[5]"] = new Creator.StringNoQuote("$ShapeType::Capsule"); oc_Newobject1["boneOffset[5]"] = "0 0 0"; oc_Newobject1["boneJointType[5]"] = new Creator.StringNoQuote("$JointType::ConeTwist"); oc_Newobject1["boneJointParam[5]"] = "0.785 0.785 0"; oc_Newobject1["boneParentNodeName[6]"] = "Bip01 R UpperArm"; oc_Newobject1["boneNodeName[6]"] = "Bip01 R Forearm"; oc_Newobject1["boneSize[6]"] = "0.2 0.4 0.0"; oc_Newobject1["boneMass[6]"] = new Creator.StringNoQuote("1"); oc_Newobject1["boneShape[6]"] = new Creator.StringNoQuote("$ShapeType::Capsule"); oc_Newobject1["boneOffset[6]"] = "0 0 0"; oc_Newobject1["boneJointType[6]"] = new Creator.StringNoQuote("$JointType::Hinge"); oc_Newobject1["boneJointParam[6]"] = "-1.57 0 0"; oc_Newobject1["boneParentNodeName[7]"] = "Bip01 Pelvis"; oc_Newobject1["boneNodeName[7]"] = "Bip01 L Thigh"; oc_Newobject1["boneSize[7]"] = "0.2 0.4 0.0"; oc_Newobject1["boneMass[7]"] = new Creator.StringNoQuote("1"); oc_Newobject1["boneShape[7]"] = new Creator.StringNoQuote("$ShapeType::Capsule"); oc_Newobject1["boneOffset[7]"] = "0 0 0"; oc_Newobject1["boneJointType[7]"] = new Creator.StringNoQuote("$JointType::ConeTwist"); oc_Newobject1["boneJointParam[7]"] = "0.785 0.785 0"; oc_Newobject1["boneParentNodeName[8]"] = "Bip01 L Thigh"; oc_Newobject1["boneNodeName[8]"] = "Bip01 L Calf"; oc_Newobject1["boneSize[8]"] = "0.2 0.4 0.0"; oc_Newobject1["boneMass[8]"] = new Creator.StringNoQuote("1"); oc_Newobject1["boneShape[8]"] = new Creator.StringNoQuote("$ShapeType::Capsule"); oc_Newobject1["boneOffset[8]"] = "0 0 0"; oc_Newobject1["boneJointType[8]"] = new Creator.StringNoQuote("$JointType::Hinge"); oc_Newobject1["boneJointParam[8]"] = "-1.57 0 0"; oc_Newobject1["boneParentNodeName[9]"] = "Bip01 Pelvis"; oc_Newobject1["boneNodeName[9]"] = "Bip01 R Thigh"; oc_Newobject1["boneSize[9]"] = "0.2 0.4 0.0"; oc_Newobject1["boneMass[9]"] = new Creator.StringNoQuote("1"); oc_Newobject1["boneShape[9]"] = new Creator.StringNoQuote("$ShapeType::Capsule"); oc_Newobject1["boneOffset[9]"] = "0 0 0"; oc_Newobject1["boneJointType[9]"] = new Creator.StringNoQuote("$JointType::ConeTwist"); oc_Newobject1["boneJointParam[9]"] = "0.785 0.785 0"; oc_Newobject1["boneParentNodeName[10]"] = "Bip01 R Thigh"; oc_Newobject1["boneNodeName[10]"] = "Bip01 R Calf"; oc_Newobject1["boneSize[10]"] = "0.2 0.4 0.0"; oc_Newobject1["boneMass[10]"] = new Creator.StringNoQuote("1"); oc_Newobject1["boneShape[10]"] = new Creator.StringNoQuote("$ShapeType::Capsule"); oc_Newobject1["boneOffset[10]"] = "0 0 0"; oc_Newobject1["boneJointType[10]"] = new Creator.StringNoQuote("$JointType::Hinge"); oc_Newobject1["boneJointParam[10]"] = "-1.57 0 0"; #endregion oc_Newobject1.Create(); #region RagDollData (ElfRagDoll) oc_Newobject2 DatablockCreator oc_Newobject2 = new DatablockCreator("RagDollData", "ElfRagDoll"); oc_Newobject2["category"] = "RigidBody"; oc_Newobject2["shapeFile"] = "art/shapes/actors/Elf/Elf.dts"; oc_Newobject2["minContactSpeed"] = new Creator.StringNoQuote("2.0"); oc_Newobject2["collisionSoundsCount"] = new Creator.StringNoQuote("1"); oc_Newobject2["collisionSound[0]"] = new Creator.StringNoQuote("bodyFall0"); oc_Newobject2["boneNodeName[0]"] = "Bip01 Pelvis"; oc_Newobject2["boneSize[0]"] = "0.2 0.2 0.7"; oc_Newobject2["boneMass[0]"] = new Creator.StringNoQuote("1"); oc_Newobject2["boneShape[0]"] = new Creator.StringNoQuote("$ShapeType::Capsule"); oc_Newobject2["boneOffset[0]"] = "0 0 0"; oc_Newobject2["boneParentNodeName[1]"] = "Bip01 Pelvis"; oc_Newobject2["boneNodeName[1]"] = "Bip01 Spine2"; oc_Newobject2["boneSize[1]"] = "0.2 0.2 0.7"; oc_Newobject2["boneMass[1]"] = new Creator.StringNoQuote("1"); oc_Newobject2["boneShape[1]"] = new Creator.StringNoQuote("$ShapeType::Capsule"); oc_Newobject2["boneJointType[1]"] = new Creator.StringNoQuote("$JointType::Hinge"); oc_Newobject2["boneOffset[1]"] = "-0.3 0 0"; oc_Newobject2["boneJointParam[1]"] = "0 1.57 0"; oc_Newobject2["boneParentNodeName[2]"] = "Bip01 Spine2"; oc_Newobject2["boneNodeName[2]"] = "Bip01 Head"; oc_Newobject2["boneSize[2]"] = "0.2 0.2 0.2"; oc_Newobject2["boneMass[2]"] = new Creator.StringNoQuote("1"); oc_Newobject2["boneShape[2]"] = new Creator.StringNoQuote("$ShapeType::Capsule"); oc_Newobject2["boneOffset[2]"] = "0 0 0"; oc_Newobject2["boneJointType[2]"] = new Creator.StringNoQuote("$JointType::ConeTwist"); oc_Newobject2["boneJointParam[2]"] = "0.785 0.785 0"; oc_Newobject2["boneParentNodeName[3]"] = "Bip01 Spine2"; oc_Newobject2["boneNodeName[3]"] = "Bip01 L UpperArm"; oc_Newobject2["boneSize[3]"] = "0.1 0.2 0.2"; oc_Newobject2["boneMass[3]"] = new Creator.StringNoQuote("1"); oc_Newobject2["boneShape[3]"] = new Creator.StringNoQuote("$ShapeType::Capsule"); oc_Newobject2["boneOffset[3]"] = "0.1 0 0"; oc_Newobject2["boneJointType[3]"] = new Creator.StringNoQuote("$JointType::ConeTwist"); oc_Newobject2["boneJointParam[3]"] = "0.785 0.785 0"; oc_Newobject2["boneParentNodeName[4]"] = "Bip01 L UpperArm"; oc_Newobject2["boneNodeName[4]"] = "Bip01 L Forearm"; oc_Newobject2["boneSize[4]"] = "0.1 0.2 0.2"; oc_Newobject2["boneMass[4]"] = new Creator.StringNoQuote("1"); oc_Newobject2["boneShape[4]"] = new Creator.StringNoQuote("$ShapeType::Capsule"); oc_Newobject2["boneOffset[4]"] = "0.1 0 0"; oc_Newobject2["boneJointType[4]"] = new Creator.StringNoQuote("$JointType::Hinge"); oc_Newobject2["boneJointParam[4]"] = "-1.57 0 0"; oc_Newobject2["boneParentNodeName[5]"] = "Bip01 Spine2"; oc_Newobject2["boneNodeName[5]"] = "Bip01 R UpperArm"; oc_Newobject2["boneSize[5]"] = "0.1 0.2 0.2"; oc_Newobject2["boneMass[5]"] = new Creator.StringNoQuote("1"); oc_Newobject2["boneShape[5]"] = new Creator.StringNoQuote("$ShapeType::Capsule"); oc_Newobject2["boneOffset[5]"] = "0.1 0 0"; oc_Newobject2["boneJointType[5]"] = new Creator.StringNoQuote("$JointType::ConeTwist"); oc_Newobject2["boneJointParam[5]"] = "0.785 0.785 0"; oc_Newobject2["boneParentNodeName[6]"] = "Bip01 R UpperArm"; oc_Newobject2["boneNodeName[6]"] = "Bip01 R Forearm"; oc_Newobject2["boneSize[6]"] = "0.1 0.2 0.2"; oc_Newobject2["boneMass[6]"] = new Creator.StringNoQuote("1"); oc_Newobject2["boneShape[6]"] = new Creator.StringNoQuote("$ShapeType::Capsule"); oc_Newobject2["boneOffset[6]"] = "0.1 0 0"; oc_Newobject2["boneJointType[6]"] = new Creator.StringNoQuote("$JointType::Hinge"); oc_Newobject2["boneJointParam[6]"] = "-1.57 0 0"; oc_Newobject2["boneParentNodeName[7]"] = "Bip01 Pelvis"; oc_Newobject2["boneNodeName[7]"] = "Bip01 L Thigh"; oc_Newobject2["boneSize[7]"] = "0.15 0.4 0.2"; oc_Newobject2["boneMass[7]"] = new Creator.StringNoQuote("1"); oc_Newobject2["boneShape[7]"] = new Creator.StringNoQuote("$ShapeType::Capsule"); oc_Newobject2["boneOffset[7]"] = "0.0 0 0"; oc_Newobject2["boneJointType[7]"] = new Creator.StringNoQuote("$JointType::ConeTwist"); oc_Newobject2["boneJointParam[7]"] = "0.785 0.785 0"; oc_Newobject2["boneParentNodeName[8]"] = "Bip01 L Thigh"; oc_Newobject2["boneNodeName[8]"] = "Bip01 L Calf"; oc_Newobject2["boneSize[8]"] = "0.15 0.4 0.2"; oc_Newobject2["boneMass[8]"] = new Creator.StringNoQuote("1"); oc_Newobject2["boneShape[8]"] = new Creator.StringNoQuote("$ShapeType::Capsule"); oc_Newobject2["boneOffset[8]"] = "0.0 0 0"; oc_Newobject2["boneJointType[8]"] = new Creator.StringNoQuote("$JointType::Hinge"); oc_Newobject2["boneJointParam[8]"] = "-1.57 0 0"; oc_Newobject2["boneParentNodeName[9]"] = "Bip01 Pelvis"; oc_Newobject2["boneNodeName[9]"] = "Bip01 R Thigh"; oc_Newobject2["boneSize[9]"] = "0.15 0.4 0.2"; oc_Newobject2["boneMass[9]"] = new Creator.StringNoQuote("1"); oc_Newobject2["boneShape[9]"] = new Creator.StringNoQuote("$ShapeType::Capsule"); oc_Newobject2["boneOffset[9]"] = "0.0 0 0"; oc_Newobject2["boneJointType[9]"] = new Creator.StringNoQuote("$JointType::ConeTwist"); oc_Newobject2["boneJointParam[9]"] = "0.785 0.785 0"; oc_Newobject2["boneParentNodeName[10]"] = "Bip01 R Thigh"; oc_Newobject2["boneNodeName[10]"] = "Bip01 R Calf"; oc_Newobject2["boneSize[10]"] = "0.15 0.4 0.2"; oc_Newobject2["boneMass[10]"] = new Creator.StringNoQuote("1"); oc_Newobject2["boneShape[10]"] = new Creator.StringNoQuote("$ShapeType::Capsule"); oc_Newobject2["boneOffset[10]"] = "0.0 0 0"; oc_Newobject2["boneJointType[10]"] = new Creator.StringNoQuote("$JointType::Hinge"); oc_Newobject2["boneJointParam[10]"] = "-1.57 0 0"; #endregion oc_Newobject2.Create(); }
public static void initialize() { #region SFXProfile (boxFall0) oc_Newobject1 DatablockCreator oc_Newobject1 = new DatablockCreator("SFXProfile", "boxFall0"); oc_Newobject1["filename"] = "art/sound/physics/boxFall0"; oc_Newobject1["description"] = new Creator.StringNoQuote("AudioDefault3d"); oc_Newobject1["preload"] = new Creator.StringNoQuote("true"); #endregion oc_Newobject1.Create(); #region SFXProfile (boxFall1) oc_Newobject2 DatablockCreator oc_Newobject2 = new DatablockCreator("SFXProfile", "boxFall1"); oc_Newobject2["filename"] = "art/sound/physics/boxFall1"; oc_Newobject2["description"] = new Creator.StringNoQuote("AudioDefault3d"); oc_Newobject2["preload"] = new Creator.StringNoQuote("true"); #endregion oc_Newobject2.Create(); #region SFXProfile (boxFall2) oc_Newobject3 DatablockCreator oc_Newobject3 = new DatablockCreator("SFXProfile", "boxFall2"); oc_Newobject3["filename"] = "art/sound/physics/boxFall2"; oc_Newobject3["description"] = new Creator.StringNoQuote("AudioDefault3d"); oc_Newobject3["preload"] = new Creator.StringNoQuote("true"); #endregion oc_Newobject3.Create(); #region RigidBodyData ( PhysBox ) oc_Newobject4 DatablockCreator oc_Newobject4 = new DatablockCreator("RigidBodyData", " PhysBox "); oc_Newobject4["category"] = "RigidBody"; oc_Newobject4["shapeFile"] = "art/shapes/crates/crate1.dts"; oc_Newobject4["shapeType"] = new Creator.StringNoQuote("$ShapeType::Box"); oc_Newobject4["mass"] = new Creator.StringNoQuote("2"); oc_Newobject4["scale"] = "0.5 0.5 0.5"; oc_Newobject4["minContactSpeed"] = new Creator.StringNoQuote("1.0"); oc_Newobject4["slidingThreshold"] = new Creator.StringNoQuote("0.1"); oc_Newobject4["collisionSoundsCount"] = new Creator.StringNoQuote("3"); oc_Newobject4["collisionSound[0]"] = new Creator.StringNoQuote("boxFall0"); oc_Newobject4["collisionSound[1]"] = new Creator.StringNoQuote("boxFall1"); oc_Newobject4["collisionSound[2]"] = new Creator.StringNoQuote("boxFall2"); #endregion oc_Newobject4.Create(); #region SFXProfile (stoneRoll0) oc_Newobject5 DatablockCreator oc_Newobject5 = new DatablockCreator("SFXProfile", "stoneRoll0"); oc_Newobject5["filename"] = "art/sound/physics/stoneRoll"; oc_Newobject5["description"] = new Creator.StringNoQuote("AudioClosest3d"); oc_Newobject5["preload"] = new Creator.StringNoQuote("true"); #endregion oc_Newobject5.Create(); #region RigidBodyData ( StatPhysBox ) oc_Newobject6 DatablockCreator oc_Newobject6 = new DatablockCreator("RigidBodyData", " StatPhysBox "); oc_Newobject6["category"] = "RigidBody"; oc_Newobject6["shapeFile"] = "art/shapes/crates/crate1.dts"; oc_Newobject6["shapeType"] = new Creator.StringNoQuote("$ShapeType::Box"); oc_Newobject6["mass"] = new Creator.StringNoQuote("0"); #endregion oc_Newobject6.Create(); #region RigidBodyData ( PhysSphere ) oc_Newobject7 DatablockCreator oc_Newobject7 = new DatablockCreator("RigidBodyData", " PhysSphere "); oc_Newobject7["category"] = "RigidBody"; oc_Newobject7["shapeFile"] = "art/shapes/rocks/boulder.dts"; oc_Newobject7["shapeType"] = new Creator.StringNoQuote("$ShapeType::Sphere"); oc_Newobject7["mass"] = new Creator.StringNoQuote("5"); oc_Newobject7["scale"] = "0.3 0.3 0.3"; oc_Newobject7["slidingThreshold"] = new Creator.StringNoQuote("0.7"); oc_Newobject7["minContactSpeed"] = new Creator.StringNoQuote("1.0"); oc_Newobject7["collisionSoundsCount"] = new Creator.StringNoQuote("1"); oc_Newobject7["collisionSound[0]"] = new Creator.StringNoQuote("boxFall0"); oc_Newobject7["slideSoundsCount"] = new Creator.StringNoQuote("1"); oc_Newobject7["slideSound[0]"] = new Creator.StringNoQuote("stoneRoll0"); #endregion oc_Newobject7.Create(); #region SFXProfile (barrelFall0) oc_Newobject8 DatablockCreator oc_Newobject8 = new DatablockCreator("SFXProfile", "barrelFall0"); oc_Newobject8["filename"] = "art/sound/physics/barrelFall0"; oc_Newobject8["description"] = new Creator.StringNoQuote("AudioDefault3d"); oc_Newobject8["preload"] = new Creator.StringNoQuote("true"); #endregion oc_Newobject8.Create(); #region SFXProfile (barrelFall1) oc_Newobject9 DatablockCreator oc_Newobject9 = new DatablockCreator("SFXProfile", "barrelFall1"); oc_Newobject9["filename"] = "art/sound/physics/barrelFall1"; oc_Newobject9["description"] = new Creator.StringNoQuote("AudioDefault3d"); oc_Newobject9["preload"] = new Creator.StringNoQuote("true"); #endregion oc_Newobject9.Create(); #region SFXProfile (barrelRoll) oc_Newobject10 DatablockCreator oc_Newobject10 = new DatablockCreator("SFXProfile", "barrelRoll"); oc_Newobject10["filename"] = "art/sound/physics/barrelFall1"; oc_Newobject10["description"] = new Creator.StringNoQuote("AudioDefault3d"); oc_Newobject10["preload"] = new Creator.StringNoQuote("true"); #endregion oc_Newobject10.Create(); #region RigidBodyData ( PhysBarrel ) oc_Newobject11 DatablockCreator oc_Newobject11 = new DatablockCreator("RigidBodyData", " PhysBarrel "); oc_Newobject11["category"] = "RigidBody"; oc_Newobject11["shapeFile"] = "art/shapes/steel_barrel_green/steel_barrel_green.dts"; oc_Newobject11["shapeType"] = new Creator.StringNoQuote("$ShapeType::Cylinder"); oc_Newobject11["rotAngles"] = "0 0 0 0"; oc_Newobject11["offset"] = "0 0 0.5 0"; oc_Newobject11["mass"] = new Creator.StringNoQuote("4"); oc_Newobject11["slidingThreshold"] = new Creator.StringNoQuote("0.7"); oc_Newobject11["minContactSpeed"] = new Creator.StringNoQuote("1.0"); oc_Newobject11["collisionSoundsCount"] = new Creator.StringNoQuote("1"); oc_Newobject11["collisionSound[0]"] = new Creator.StringNoQuote("barrelFall0"); oc_Newobject11["collisionSound[1]"] = new Creator.StringNoQuote("barrelFall1"); oc_Newobject11["slideSoundsCount"] = new Creator.StringNoQuote("1"); oc_Newobject11["slideSound[0]"] = new Creator.StringNoQuote("barrelRoll"); #endregion oc_Newobject11.Create(); #region SFXProfile (wheelFall0) oc_Newobject12 DatablockCreator oc_Newobject12 = new DatablockCreator("SFXProfile", "wheelFall0"); oc_Newobject12["filename"] = "art/sound/physics/wheelFall0"; oc_Newobject12["description"] = new Creator.StringNoQuote("AudioDefault3d"); oc_Newobject12["preload"] = new Creator.StringNoQuote("true"); #endregion oc_Newobject12.Create(); #region SFXProfile (wheelFall1) oc_Newobject13 DatablockCreator oc_Newobject13 = new DatablockCreator("SFXProfile", "wheelFall1"); oc_Newobject13["filename"] = "art/sound/physics/wheelFall1"; oc_Newobject13["description"] = new Creator.StringNoQuote("AudioDefault3d"); oc_Newobject13["preload"] = new Creator.StringNoQuote("true"); #endregion oc_Newobject13.Create(); #region SFXProfile (wheelFall2) oc_Newobject14 DatablockCreator oc_Newobject14 = new DatablockCreator("SFXProfile", "wheelFall2"); oc_Newobject14["filename"] = "art/sound/physics/wheelFall2"; oc_Newobject14["description"] = new Creator.StringNoQuote("AudioDefault3d"); oc_Newobject14["preload"] = new Creator.StringNoQuote("true"); #endregion oc_Newobject14.Create(); #region RigidBodyData ( PhysWheel ) oc_Newobject15 DatablockCreator oc_Newobject15 = new DatablockCreator("RigidBodyData", " PhysWheel "); oc_Newobject15["category"] = "RigidBody"; oc_Newobject15["shapeFile"] = "art/shapes/Wheel/Wheel.dts"; oc_Newobject15["shapeType"] = new Creator.StringNoQuote("$ShapeType::Cylinder"); oc_Newobject15["mass"] = new Creator.StringNoQuote("1"); oc_Newobject15["rotAngles"] = "0 90 0 0"; oc_Newobject15["offset"] = "0 0 0 0"; oc_Newobject15["slidingThreshold"] = new Creator.StringNoQuote("0.7"); oc_Newobject15["minContactSpeed"] = new Creator.StringNoQuote("1.0"); oc_Newobject15["collisionSoundsCount"] = new Creator.StringNoQuote("1"); oc_Newobject15["collisionSound[0]"] = new Creator.StringNoQuote("wheelFall0"); oc_Newobject15["collisionSound[1]"] = new Creator.StringNoQuote("wheelFall1"); oc_Newobject15["collisionSound[2]"] = new Creator.StringNoQuote("wheelFall2"); oc_Newobject15["slideSoundsCount"] = new Creator.StringNoQuote("1"); oc_Newobject15["slideSound[0]"] = new Creator.StringNoQuote("wheelFall0"); #endregion oc_Newobject15.Create(); }
public void createEmitter() { ParticleEditor ParticleEditor = "ParticleEditor"; ParticleParticleEditor.PE_ParticleEditor PE_ParticleEditor = "PE_ParticleEditor"; // Create a new emitter. string emitter = Util.getUniqueName("newEmitter"); DatablockCreator oc = new DatablockCreator("ParticleEmitterData", emitter + " : DefaultEmitter", typeof (ParticleEmitterData)); SimObject emitterNode = oc.Create(); // Submit undo. ParticleEditorUndo.ActionCreateNewEmitter action = ParticleEditor.createUndo<ParticleEditorUndo.ActionCreateNewEmitter>("Create New Emitter"); action["prevEmitter"] = this.currEmitter; action["emitter"] = emitterNode; action["emitterName"] = emitter; ParticleEditor.submitUndo(action); // Execute action. action.redo(); PE_ParticleEditor.createParticle(""); }