예제 #1
0
    private void Start()
    {
        joint = GetComponent <LampJoint>();
        otherJoint.Rotated += OnOtherJointRotated;

        Assert.AreNotEqual(joint, otherJoint, "Failed assertions (" + name + "): Other Joint cannot be attached to this game object.");
    }
예제 #2
0
 private void OnOtherJointRotated(LampJoint otherJoint, int deltaAngle)
 {
     // Rotate the joint in the opposite direction of "otherJoint"
     joint.Rotate(-deltaAngle);
 }