public TextureSet(PhysicsGameObject pgo) { this.pgo = pgo; currentTextureListIndex = -1; textureList = new List <Texture2D>(); scale = new Vector2(1f, 1f); offset = new Vector2(0f, 0f); sourceRect = new Rectangle(0, 0, (int)pgo.width, (int)pgo.height); sourceRectAdjustedForScale = new Rectangle(0, 0, (int)pgo.width, (int)pgo.height); calculateSourceRectAdjustedForScale(); }
public PhysicsGameJoint(PhysicsSimulator physicsSimulator, PhysicsGameObject obj1, PhysicsGameObject obj2) { joint = JointFactory.Instance.CreateRevoluteJoint(physicsSimulator, obj1.boxBody, obj2.boxBody, obj1.boxBody.Position); joint.Softness = 1f; obj1.joints.Add(this); obj2.joints.Add(this); }
/* insert other properties here */ public CubeNode(PhysicsGameObject physicalObject) { this.physicalObject = physicalObject; maxHp = 100; hp = maxHp; }