This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// テクスチャー読み込み (256x256 px) | |
img = new Texture("badlogic.jpg"); | |
// スプライト初期化 | |
sprite = new Sprite( new TextureRegion(img,0,0,256,256)); | |
sprite.setSize(256, 256); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 良くない例:画面いっぱいになってしまうので実際の画面の縦横比に影響されて、縦長or横長になってしまう | |
camera = new OrthographicCamera(); | |
camera.setToOrtho(false, 640, 400); | |
batch.setProjectionMatrix(camera.combined); |
NewerOlder