Compare commits
2 Commits
5ccd0cbfa9
...
dae9b8a2c6
| Author | SHA1 | Date | |
|---|---|---|---|
| dae9b8a2c6 | |||
| 558c42e71d |
4
pom.xml
4
pom.xml
@@ -51,7 +51,7 @@
|
||||
<configuration>
|
||||
<!-- 确保这个类路径与你实际的Launcher类位置一致 -->
|
||||
<!-- 例如:如果你的类文件在src/main/java/uno/mloluyu/Launcher.java -->
|
||||
<mainClass>uno.mloluyu.Launcher</mainClass>
|
||||
<mainClass>uno.mloluyu.desktop.Launcher</mainClass>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
<archive>
|
||||
<manifest>
|
||||
<addClasspath>true</addClasspath>
|
||||
<mainClass>uno.mloluyu.Launcher</mainClass>
|
||||
<mainClass>uno.mloluyu.desktop.Launcher</mainClass>
|
||||
</manifest>
|
||||
</archive>
|
||||
</configuration>
|
||||
|
||||
@@ -13,7 +13,7 @@ public class GameCore implements ApplicationListener {
|
||||
@Override
|
||||
public void create() {
|
||||
batch = new SpriteBatch();
|
||||
img = new Texture(Gdx.files.internal("src\\main\\resources\\assets\\badlogic.jpg"));
|
||||
img = new Texture(Gdx.files.internal("src\\main\\resources\\assets\\backgrounds\\bg.png"));
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -21,8 +21,13 @@ public class GameCore implements ApplicationListener {
|
||||
Gdx.gl.glClearColor(0.15f, 0.15f, 0.2f, 1);
|
||||
Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT);
|
||||
|
||||
float screenWidth = Gdx.graphics.getWidth();
|
||||
float screenHeight = Gdx.graphics.getHeight();
|
||||
float scaleX = screenWidth / img.getWidth();
|
||||
float scaleY = screenHeight / img.getHeight();
|
||||
|
||||
batch.begin();
|
||||
batch.draw(img, 0, 0);
|
||||
batch.draw(img, 0, 0, scaleX, scaleY);
|
||||
batch.end();
|
||||
}
|
||||
|
||||
|
||||
BIN
src/main/resources/assets/backgrounds/bg.png
Normal file
BIN
src/main/resources/assets/backgrounds/bg.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.2 MiB |
67
src/main/resources/assets/backgrounds/inner/innerbg.atlas
Normal file
67
src/main/resources/assets/backgrounds/inner/innerbg.atlas
Normal file
@@ -0,0 +1,67 @@
|
||||
innerbg.png
|
||||
size:1536,1024
|
||||
repeat:none
|
||||
0000_00
|
||||
bounds:0,0,256,256
|
||||
0000_01
|
||||
bounds:256,0,256,256
|
||||
0000_02
|
||||
bounds:512,0,256,256
|
||||
0000_03
|
||||
bounds:768,0,256,256
|
||||
0000_04
|
||||
bounds:1024,0,256,256
|
||||
0000_05
|
||||
bounds:1280,0,120,256
|
||||
0000_06
|
||||
bounds:0,256,256,256
|
||||
0000_07
|
||||
bounds:256,256,256,256
|
||||
0000_08
|
||||
bounds:512,256,256,256
|
||||
0000_09
|
||||
bounds:768,256,256,256
|
||||
0000_10
|
||||
bounds:1024,256,256,256
|
||||
0000_11
|
||||
bounds:1280,256,120,256
|
||||
0000_12
|
||||
bounds:0,512,256,256
|
||||
0000_13
|
||||
bounds:256,512,256,256
|
||||
0000_14
|
||||
bounds:512,512,256,256
|
||||
0000_15
|
||||
bounds:768,512,256,256
|
||||
0000_16
|
||||
bounds:1024,512,256,256
|
||||
0000_17
|
||||
bounds:1280,512,120,256
|
||||
0000_18
|
||||
bounds:0,768,256,256
|
||||
0000_19
|
||||
bounds:256,768,256,256
|
||||
0000_20
|
||||
bounds:512,768,256,256
|
||||
0000_21
|
||||
bounds:768,768,256,256
|
||||
0000_22
|
||||
bounds:1024,768,256,256
|
||||
0000_23
|
||||
bounds:1280,768,120,256
|
||||
|
||||
innerbg2.png
|
||||
size:1536,256
|
||||
repeat:none
|
||||
0000_24
|
||||
bounds:0,0,256,176
|
||||
0000_25
|
||||
bounds:256,0,256,176
|
||||
0000_26
|
||||
bounds:512,0,256,176
|
||||
0000_27
|
||||
bounds:768,0,256,176
|
||||
0000_28
|
||||
bounds:1024,0,256,176
|
||||
0000_29
|
||||
bounds:1280,0,120,176
|
||||
BIN
src/main/resources/assets/backgrounds/inner/innerbg.png
Normal file
BIN
src/main/resources/assets/backgrounds/inner/innerbg.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.8 MiB |
BIN
src/main/resources/assets/backgrounds/inner/innerbg2.png
Normal file
BIN
src/main/resources/assets/backgrounds/inner/innerbg2.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 249 KiB |
BIN
target/classes/assets/backgrounds/bg.png
Normal file
BIN
target/classes/assets/backgrounds/bg.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.2 MiB |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user