Beispiel #1
0
        // ===========================================================
        // Methods
        // ===========================================================

        public void CenterShapeInCamera(Shape pShape)
        {
            Camera camera = this.mCamera;

            //pShape.setPosition((camera.getWidth() - pShape.getWidth()) * 0.5f, (camera.getHeight() - pShape.getHeight()) * 0.5f);
            pShape.SetPosition((camera.Width - pShape.GetWidth()) * 0.5f, (camera.Height - pShape.GetHeight()) * 0.5f);
        }
 public void centerShapeInCameraVertically(Shape pShape)
 {
     //pShape.setPosition(pShape.getX(), (this.mCamera.getHeight() - pShape.getHeight()) * 0.5f);
     pShape.SetPosition(pShape.X, (this.mCamera.Height - pShape.GetHeight()) * 0.5f);
     pShape.SetPosition(pShape.X, (this.mCamera.Height - pShape.GetHeight()) * 0.5f);
 }
 public void centerShapeInCameraHorizontally(Shape pShape)
 {
     //pShape.setPosition((this.mCamera.getWidth() - pShape.getWidth()) * 0.5f, pShape.getY());
     pShape.SetPosition((this.mCamera.Width - pShape.GetWidth()) * 0.5f, pShape.Y);
 }
        // ===========================================================
        // Methods
        // ===========================================================

        public void CenterShapeInCamera(Shape pShape)
        {
            Camera camera = this.mCamera;
            //pShape.setPosition((camera.getWidth() - pShape.getWidth()) * 0.5f, (camera.getHeight() - pShape.getHeight()) * 0.5f);
            pShape.SetPosition((camera.Width - pShape.GetWidth()) * 0.5f, (camera.Height - pShape.GetHeight()) * 0.5f);
        }
Beispiel #5
0
 public void centerShapeInCameraVertically(Shape pShape)
 {
     //pShape.setPosition(pShape.getX(), (this.mCamera.getHeight() - pShape.getHeight()) * 0.5f);
     pShape.SetPosition(pShape.X, (this.mCamera.Height - pShape.GetHeight()) * 0.5f);
     pShape.SetPosition(pShape.X, (this.mCamera.Height - pShape.GetHeight()) * 0.5f);
 }
Beispiel #6
0
 public void centerShapeInCameraHorizontally(Shape pShape)
 {
     //pShape.setPosition((this.mCamera.getWidth() - pShape.getWidth()) * 0.5f, pShape.getY());
     pShape.SetPosition((this.mCamera.Width - pShape.GetWidth()) * 0.5f, pShape.Y);
 }