// =========================================================== // Constructors // =========================================================== public BaseTextureRegion(Texture pTexture, int pTexturePositionX, int pTexturePositionY, int pWidth, int pHeight) { this.mTexture = pTexture; this.mTexturePositionX = pTexturePositionX; this.mTexturePositionY = pTexturePositionY; this.mWidth = pWidth; this.mHeight = pHeight; this.mTextureRegionBuffer = this.OnCreateTextureRegionBuffer(); BufferObjectManager.GetActiveInstance().LoadBufferObject(this.mTextureRegionBuffer); this.InitTextureBuffer(); }
// =========================================================== // Constructors // =========================================================== public RectangularShape(/* final */ float pX, /* final */ float pY, /* final */ float pWidth, /* final */ float pHeight, /* final */ VertexBuffer pVertexBuffer) : base(pX, pY) { this.mBaseWidth = pWidth; this.mBaseHeight = pHeight; this.mWidth = pWidth; this.mHeight = pHeight; this.mVertexBuffer = pVertexBuffer; BufferObjectManager.GetActiveInstance().LoadBufferObject(this.mVertexBuffer); this.mRotationCenterX = pWidth * 0.5f; this.mRotationCenterY = pHeight * 0.5f; this.mScaleCenterX = this.mRotationCenterX; this.mScaleCenterY = this.mRotationCenterY; }