コード例 #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();
            }
コード例 #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);
 }
コード例 #3
0
        /* insert other properties here */


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