auto-commit

This commit is contained in:
2025-09-19 08:13:07 +08:00
parent bc144d7929
commit d1bcab99c0
11 changed files with 85 additions and 57 deletions

View File

@@ -1,3 +1,4 @@
{ {
"java.configuration.updateBuildConfiguration": "interactive" "java.configuration.updateBuildConfiguration": "interactive",
"java.debug.settings.onBuildFailureProceed": true
} }

135
pom.xml
View File

@@ -1,56 +1,81 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"> <project xmlns="http://maven.apache.org/POM/4.0.0">
<modelVersion>4.0.0</modelVersion>
<groupId>uno.mloluyu</groupId> <modelVersion>4.0.0</modelVersion>
<artifactId>game</artifactId>
<version>1.0-SNAPSHOT</version> <groupId>uno.mloluyu</groupId>
<packaging>jar</packaging>
<artifactId>game</artifactId>
<dependencies>
<dependency> <version>1.0-SNAPSHOT</version>
<groupId>com.badlogicgames.gdx</groupId>
<artifactId>gdx</artifactId> <packaging>jar</packaging>
<version>1.12.1</version>
</dependency> <dependencies>
<dependency> <dependency>
<groupId>com.badlogicgames.gdx</groupId> <groupId>com.badlogicgames.gdx</groupId>
<artifactId>gdx-backend-lwjgl3</artifactId> <artifactId>gdx</artifactId>
<version>1.12.1</version> <version>${gdx.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.badlogicgames.gdx</groupId> <groupId>com.badlogicgames.gdx</groupId>
<artifactId>gdx-platform</artifactId> <artifactId>gdx-backend-lwjgl3</artifactId>
<version>1.12.1</version> <version>${gdx.version}</version>
<classifier>natives-desktop</classifier> </dependency>
</dependency> <dependency>
</dependencies> <groupId>com.badlogicgames.gdx</groupId>
<artifactId>gdx-platform</artifactId>
<build> <version>${gdx.version}</version>
<plugins> <classifier>natives-desktop</classifier>
<plugin> </dependency>
<groupId>org.apache.maven.plugins</groupId> </dependencies>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.13.0</version> <build>
<configuration> <plugins>
<source>21</source> <plugin>
<target>21</target> <groupId>org.apache.maven.plugins</groupId>
<compilerArgs>--enable-preview</compilerArgs> <artifactId>maven-compiler-plugin</artifactId>
</configuration> <version>3.13.0</version>
</plugin> <configuration>
<plugin> <!-- 建议使用与LibGDX兼容的JDK版本11或17比较合适 -->
<groupId>org.codehaus.mojo</groupId> <source>17</source>
<artifactId>exec-maven-plugin</artifactId> <target>17</target>
<version>3.1.0</version> <!-- 移除不必要的预览特性,除非确实需要 -->
<configuration> </configuration>
<mainClass>uno.mloluyu.desktop.Launcher</mainClass> <!-- 替换为你的桌面启动器完整类名 --> </plugin>
</configuration>
</plugin> <plugin>
</plugins> <groupId>org.codehaus.mojo</groupId>
</build> <artifactId>exec-maven-plugin</artifactId>
<version>3.1.0</version>
<properties> <configuration>
<maven.compiler.source>21</maven.compiler.source> <!-- 确保这个类路径与你实际的Launcher类位置一致 -->
<maven.compiler.target>21</maven.compiler.target> <!-- 例如如果你的类文件在src/main/java/uno/mloluyu/Launcher.java -->
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <mainClass>uno.mloluyu.Launcher</mainClass>
<gdx.version>1.12.1</gdx.version> </configuration>
</properties> </plugin>
</project>
<!-- 添加运行时类路径配置,解决类找不到问题 -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.3.0</version>
<configuration>
<archive>
<manifest>
<addClasspath>true</addClasspath>
<mainClass>uno.mloluyu.Launcher</mainClass>
</manifest>
</archive>
</configuration>
</plugin>
</plugins>
</build>
<properties>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<gdx.version>1.12.1</gdx.version>
</properties>
</project>

View File

@@ -13,7 +13,7 @@ public class GameCore implements ApplicationListener {
@Override @Override
public void create() { public void create() {
batch = new SpriteBatch(); batch = new SpriteBatch();
img = new Texture(Gdx.files.internal("badlogic.jpg")); img = new Texture(Gdx.files.internal(""));
} }
@Override @Override

View File

@@ -13,3 +13,4 @@ public class Launcher {
new Lwjgl3Application(new GameCore(), configuration); new Lwjgl3Application(new GameCore(), configuration);
} }
} }

View File

@@ -23,6 +23,7 @@ public class CreateServer {
public void run() { public void run() {
try { try {
clientSocket = serverSocket.accept(null); clientSocket = serverSocket.accept(null);
System.out.println("玩家连接"+clientSocket);
//连接上后在这里编写进入游戏界面的代码 //连接上后在这里编写进入游戏界面的代码
} catch (Exception e) { } catch (Exception e) {

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.1 MiB

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.