Exemplo n.º 1
0
		protected PhysicsJoint(JointType jointType, PhysicsBody bodyA, PhysicsBody bodyB,
			object[] args)
		{
			JointType = jointType;
			BodyA = bodyA;
			BodyB = bodyB;
			//PhysicsJoint: 'args' presumably populate Properties
			Properties = new Dictionary<PropertyType, object>();
		}
Exemplo n.º 2
0
		protected virtual void OnCollisionEnd(PhysicsBody other)
		{
			if (CollisionEnd != null)
				CollisionEnd(other);
		}
Exemplo n.º 3
0
		//PhysicsBody Collision begin and end
		protected virtual void OnCollisionBegin(PhysicsBody other)
		{
			if (CollisionBegin != null)
				CollisionBegin(other);
		}
Exemplo n.º 4
0
		private static void UpdatePositionAndOrientation(Entity3D entity, PhysicsBody physicsBody)
		{
			entity.Position = physicsBody.Position;
			entity.Orientation = physicsBody.GetOrientation();
		}
Exemplo n.º 5
0
		public abstract PhysicsJoint CreateJoint(JointType jointType, PhysicsBody bodyA,
			PhysicsBody bodyB, object[] args);
Exemplo n.º 6
0
		protected abstract void RemoveBody(PhysicsBody body);
Exemplo n.º 7
0
		protected void AddBody(PhysicsBody body)
		{
			bodies.Add(body);
		}
Exemplo n.º 8
0
 private static void UpdatePositionAndOrientation(Entity3D entity, PhysicsBody physicsBody)
 {
     entity.Position    = physicsBody.Position;
     entity.Orientation = physicsBody.GetOrientation();
 }
Exemplo n.º 9
0
			public PhysicsBodyOrientationIsBrokenMakeSureAllValuesAreSet(PhysicsBody physicsBody)
				: base(physicsBody.ToString()) {}