auto-commit
This commit is contained in:
3
.vscode/settings.json
vendored
3
.vscode/settings.json
vendored
@@ -1,3 +1,4 @@
|
||||
{
|
||||
"java.configuration.updateBuildConfiguration": "interactive"
|
||||
"java.configuration.updateBuildConfiguration": "interactive",
|
||||
"java.debug.settings.onBuildFailureProceed": true
|
||||
}
|
||||
127
pom.xml
127
pom.xml
@@ -1,56 +1,81 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>uno.mloluyu</groupId>
|
||||
<artifactId>game</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.badlogicgames.gdx</groupId>
|
||||
<artifactId>gdx</artifactId>
|
||||
<version>1.12.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.badlogicgames.gdx</groupId>
|
||||
<artifactId>gdx-backend-lwjgl3</artifactId>
|
||||
<version>1.12.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.badlogicgames.gdx</groupId>
|
||||
<artifactId>gdx-platform</artifactId>
|
||||
<version>1.12.1</version>
|
||||
<classifier>natives-desktop</classifier>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>3.13.0</version>
|
||||
<configuration>
|
||||
<source>21</source>
|
||||
<target>21</target>
|
||||
<compilerArgs>--enable-preview</compilerArgs>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>exec-maven-plugin</artifactId>
|
||||
<version>3.1.0</version>
|
||||
<configuration>
|
||||
<mainClass>uno.mloluyu.desktop.Launcher</mainClass> <!-- 替换为你的桌面启动器完整类名 -->
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
<groupId>uno.mloluyu</groupId>
|
||||
|
||||
<properties>
|
||||
<maven.compiler.source>21</maven.compiler.source>
|
||||
<maven.compiler.target>21</maven.compiler.target>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<gdx.version>1.12.1</gdx.version>
|
||||
</properties>
|
||||
<artifactId>game</artifactId>
|
||||
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.badlogicgames.gdx</groupId>
|
||||
<artifactId>gdx</artifactId>
|
||||
<version>${gdx.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.badlogicgames.gdx</groupId>
|
||||
<artifactId>gdx-backend-lwjgl3</artifactId>
|
||||
<version>${gdx.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.badlogicgames.gdx</groupId>
|
||||
<artifactId>gdx-platform</artifactId>
|
||||
<version>${gdx.version}</version>
|
||||
<classifier>natives-desktop</classifier>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>3.13.0</version>
|
||||
<configuration>
|
||||
<!-- 建议使用与LibGDX兼容的JDK版本,11或17比较合适 -->
|
||||
<source>17</source>
|
||||
<target>17</target>
|
||||
<!-- 移除不必要的预览特性,除非确实需要 -->
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>exec-maven-plugin</artifactId>
|
||||
<version>3.1.0</version>
|
||||
<configuration>
|
||||
<!-- 确保这个类路径与你实际的Launcher类位置一致 -->
|
||||
<!-- 例如:如果你的类文件在src/main/java/uno/mloluyu/Launcher.java -->
|
||||
<mainClass>uno.mloluyu.Launcher</mainClass>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
<!-- 添加运行时类路径配置,解决类找不到问题 -->
|
||||
<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>
|
||||
@@ -13,7 +13,7 @@ public class GameCore implements ApplicationListener {
|
||||
@Override
|
||||
public void create() {
|
||||
batch = new SpriteBatch();
|
||||
img = new Texture(Gdx.files.internal("badlogic.jpg"));
|
||||
img = new Texture(Gdx.files.internal(""));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -13,3 +13,4 @@ public class Launcher {
|
||||
new Lwjgl3Application(new GameCore(), configuration);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -23,6 +23,7 @@ public class CreateServer {
|
||||
public void run() {
|
||||
try {
|
||||
clientSocket = serverSocket.accept(null);
|
||||
System.out.println("玩家连接"+clientSocket);
|
||||
//连接上后在这里编写进入游戏界面的代码
|
||||
} catch (Exception e) {
|
||||
|
||||
|
||||
BIN
target/classes/assets/badlogic.jpg
Normal file
BIN
target/classes/assets/badlogic.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 7.1 MiB |
BIN
target/classes/uno/mloluyu/desktop/GameCore.class
Normal file
BIN
target/classes/uno/mloluyu/desktop/GameCore.class
Normal file
Binary file not shown.
BIN
target/classes/uno/mloluyu/desktop/Launcher.class
Normal file
BIN
target/classes/uno/mloluyu/desktop/Launcher.class
Normal file
Binary file not shown.
BIN
target/classes/uno/mloluyu/network/ConnectServer.class
Normal file
BIN
target/classes/uno/mloluyu/network/ConnectServer.class
Normal file
Binary file not shown.
BIN
target/classes/uno/mloluyu/network/CreateServer$1.class
Normal file
BIN
target/classes/uno/mloluyu/network/CreateServer$1.class
Normal file
Binary file not shown.
BIN
target/classes/uno/mloluyu/network/CreateServer.class
Normal file
BIN
target/classes/uno/mloluyu/network/CreateServer.class
Normal file
Binary file not shown.
Reference in New Issue
Block a user