示例#1
0
 public void RemoveJoint(CCPhysicsJointInfo joint)
 {
     foreach (var subjoint in joint.getJoints())
     {
         _space.RemoveConstraint(subjoint);
     }
 }
示例#2
0
		public void AddJoint(CCPhysicsJointInfo joint)
		{
			foreach (cpConstraint subjoint in joint.getJoints())
			{
				_space.AddConstraint(subjoint);
			}
		}
示例#3
0
 public void AddJoint(CCPhysicsJointInfo joint)
 {
     foreach (cpConstraint subjoint in joint.getJoints())
     {
         _space.AddConstraint(subjoint);
     }
 }
示例#4
0
		public CCPhysicsJoint()
		{
			_bodyA = null;
			_bodyB = null;
			_world = null;
			_info = null;
			_enable = false;
			_collisionEnable = true;
			_destoryMark = false;
			_tag = 0;
		}
示例#5
0
 public CCPhysicsJoint()
 {
     _bodyA           = null;
     _bodyB           = null;
     _world           = null;
     _info            = null;
     _enable          = false;
     _collisionEnable = true;
     _destoryMark     = false;
     _tag             = 0;
 }
示例#6
0
        protected bool Init(CCPhysicsBody a, CCPhysicsBody b)
        {
            cp.AssertWarn(a != null && b != null, "the body passed in is nil");
            cp.AssertWarn(a != b, "the two bodies are equal");
            _info = new CCPhysicsJointInfo(this);

            if (_info != null)
            {
                return(false);
            }

            _bodyA = a;
            _bodyA._joints.Add(this);
            _bodyB = b;
            _bodyB._joints.Add(this);

            return(true);
        }
示例#7
0
		public void removeJoint(CCPhysicsJointInfo joint)
		{
			foreach (var subjoint in joint.getJoints())
			{
				_space.RemoveConstraint(subjoint);
			}
		}
示例#8
0
		protected bool Init(CCPhysicsBody a, CCPhysicsBody b)
		{
			cp.AssertWarn(a != null && b != null, "the body passed in is nil");
			cp.AssertWarn(a != b, "the two bodies are equal");
			_info = new CCPhysicsJointInfo(this);

			if (_info != null)
				return false;

			_bodyA = a;
			_bodyA._joints.Add(this);
			_bodyB = b;
			_bodyB._joints.Add(this);

			return true;
		}