示例#1
0
        protected override void constructed()
        {
            multiProp = Owner.getElement(multiPropName) as MultiProp;

            if (multiProp == null)
            {
                blacklist("Cannot find MultiProp '{0}'", multiPropName);
            }

            woot1 = multiProp.addSection(new MultiPropSection("Woot1", "Box016.mesh", "Box016", new Vector3(-1, 0, 0), Quaternion.Identity, Vector3.ScaleIdentity));
            woot2 = multiProp.addSection(new MultiPropSection("Woot2", "Box016.mesh", "Box016", new Vector3(1, 0, 0), Quaternion.Identity, Vector3.ScaleIdentity));
            woot3 = multiProp.addSection(new MultiPropSection("Woot3", "PerfTooth01.mesh", "Tooth1collision", new Vector3(0, 0, 1), Quaternion.Identity, Vector3.ScaleIdentity));

            base.constructed();
        }
示例#2
0
        protected override void constructed()
        {
            this.addToDebugDrawing();

            multiProp = Owner.getElement(multiPropName) as MultiProp;

            if (multiProp == null)
            {
                blacklist("Cannot find MultiProp '{0}'", multiPropName);
            }

            multiProp.beginUpdates();

            using (var stream = VirtualFileSystem.Instance.openStream("Plugins/SplintProps/PartModels/SplintSpace.positions", Engine.Resources.FileMode.Open))
            {
                PositionCollection positions = new PositionCollection(stream);

                for (int i = StartIndex; i < EndIndex; ++i)
                {
                    var position = positions.getPosition(String.Format("BaseSplint{0}", i));
                    multiProp.addSection(new MultiPropSection(String.Format("SplintSection{0}", i), String.Format("BaseSplint{0}.mesh", i), String.Format("BaseSplintCol{0}", i), position.Translation, position.Rotation, new Vector3(1f, 0.2f, 1f)));
                }
            }

            multiProp.finishUpdates();

            base.constructed();
        }