protected override void constructed() { rigidBody = Owner.getElement(RigidBodyName) as RigidBody; if (rigidBody == null) { blacklist("Cannot find RigidBody '{0}'.", RigidBodyName); } joint = (Generic6DofConstraintElement)Owner.getElement(JointName); if (joint != null) { jointStartTranslation = joint.getFrameOffsetOriginA(); jointStartRotation = joint.getFrameOffsetBasisA(); rigidBody.raiseCollisionFlag(CollisionFlags.KinematicObject); moveOntoMandible(); } JointLocked = true; }
protected override void constructed() { sceneNodeElement = Owner.getElement(sceneNodeName) as SceneNodeElement; if (sceneNodeElement == null) { blacklist("Could not find SceneNodeElement {0}.", sceneNodeName); } entity = sceneNodeElement.getNodeObject(entityName) as Entity; if (entity == null) { blacklist("Could not find Entity {0}.", entityName); } actorElement = Owner.getElement(actorName) as RigidBody; if (actorElement == null) { blacklist("Could not find Actor {0}.", actorName); } SleepyActorRepository.addSleeper(actorElement); joint = Owner.getElement(jointName) as Generic6DofConstraintElement; if (joint == null) { blacklist("Could not find Joint {0}.", jointName); } startingLocation = joint.getFrameOffsetOriginA(); startingRotation = joint.getFrameOffsetBasisA(); transparency = Owner.getElement(transparencyInterface) as TransparencyInterface; if (transparency == null) { blacklist("Could not find TransparencyInterface {0}", transparencyInterface); } TeethController.addTooth(Owner.Name, this); HighlightColor = Color.White; }