Ejemplo n.º 1
0
            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();
            }
Ejemplo n.º 2
0
 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);
 }
Ejemplo n.º 3
0
        /* insert other properties here */


        public CubeNode(PhysicsGameObject physicalObject)
        {
            this.physicalObject = physicalObject;
            maxHp = 100;
            hp    = maxHp;
        }