From 9f1b4722b09958147baff559bca2129246e600e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8B=97=E5=BA=86=E5=B8=85?= <9175754+miao-qingshuai@user.noreply.gitee.com> Date: Tue, 17 Jun 2025 20:11:21 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4=E4=BA=86=20PlayerInitState?= =?UTF-8?q?=E7=B1=BB/=E6=96=B0=E5=A2=9E=20RoomWaitState=E7=B1=BB,=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E4=BA=86=20RoomDestoryGameState=E5=92=8CPlayerReloadS?= =?UTF-8?q?tate=E7=B1=BB/=E4=BC=98=E5=8C=96=E4=BA=86=20EventConteroller?= =?UTF-8?q?=E4=B8=AD=E7=9A=84redisGroupMemberRound=E6=96=B9=E6=B3=95/?= =?UTF-8?q?=E6=9B=B4=E6=96=B0=E4=BA=86Global=E7=B1=BB=E4=B8=AD=E7=9A=84log?= =?UTF-8?q?ger=E5=B1=9E=E6=80=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- game_web/.idea/.gitignore | 0 game_web/.idea/modules.xml | 8 + game_web/.idea/runConfigurations.xml | 10 + game_web/.idea/vcs.xml | 6 + game_web/.idea/workspace.xml | 367 ++++++++++++++++++ .../target/test-classes/etty-contexts.xml | 9 + .../game/player/state/PlayerInitState.java | 47 +++ .../classes/config/taurus-permanent.xml | 75 ++++ .../target/classes/game-config.xml | 20 + .../target/classes/log4j.properties | 20 + .../target/classes/taurus-core.xml | 51 +++ .../target/classes/taurus-permanent.xml | 75 ++++ puke/suoha/game_pk_suoha/.idea/.gitignore | 8 + puke/suoha/game_pk_suoha/.idea/compiler.xml | 13 + puke/suoha/game_pk_suoha/.idea/encodings.xml | 6 + .../game_pk_suoha/.idea/jarRepositories.xml | 20 + puke/suoha/game_pk_suoha/.idea/misc.xml | 12 + .../game_pk_suoha/.idea/runConfigurations.xml | 10 + puke/suoha/game_pk_suoha/.idea/vcs.xml | 6 + 19 files changed, 763 insertions(+) create mode 100644 game_web/.idea/.gitignore create mode 100644 game_web/.idea/modules.xml create mode 100644 game_web/.idea/runConfigurations.xml create mode 100644 game_web/.idea/vcs.xml create mode 100644 game_web/.idea/workspace.xml create mode 100644 game_web/web_group/target/test-classes/etty-contexts.xml create mode 100644 libs/game_common/src/main/java/com/game/player/state/PlayerInitState.java create mode 100644 libs/taurus-server/taurus-permanent/target/classes/config/taurus-permanent.xml create mode 100644 libs/taurus-server/taurus-permanent/target/classes/game-config.xml create mode 100644 libs/taurus-server/taurus-permanent/target/classes/log4j.properties create mode 100644 libs/taurus-server/taurus-permanent/target/classes/taurus-core.xml create mode 100644 libs/taurus-server/taurus-permanent/target/classes/taurus-permanent.xml create mode 100644 puke/suoha/game_pk_suoha/.idea/.gitignore create mode 100644 puke/suoha/game_pk_suoha/.idea/compiler.xml create mode 100644 puke/suoha/game_pk_suoha/.idea/encodings.xml create mode 100644 puke/suoha/game_pk_suoha/.idea/jarRepositories.xml create mode 100644 puke/suoha/game_pk_suoha/.idea/misc.xml create mode 100644 puke/suoha/game_pk_suoha/.idea/runConfigurations.xml create mode 100644 puke/suoha/game_pk_suoha/.idea/vcs.xml diff --git a/game_web/.idea/.gitignore b/game_web/.idea/.gitignore new file mode 100644 index 0000000..e69de29 diff --git a/game_web/.idea/modules.xml b/game_web/.idea/modules.xml new file mode 100644 index 0000000..4a6f619 --- /dev/null +++ b/game_web/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/game_web/.idea/runConfigurations.xml b/game_web/.idea/runConfigurations.xml new file mode 100644 index 0000000..797acea --- /dev/null +++ b/game_web/.idea/runConfigurations.xml @@ -0,0 +1,10 @@ + + + + + + \ No newline at end of file diff --git a/game_web/.idea/vcs.xml b/game_web/.idea/vcs.xml new file mode 100644 index 0000000..6c0b863 --- /dev/null +++ b/game_web/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/game_web/.idea/workspace.xml b/game_web/.idea/workspace.xml new file mode 100644 index 0000000..3b15877 --- /dev/null +++ b/game_web/.idea/workspace.xml @@ -0,0 +1,367 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1749709772015 + + + + + + \ No newline at end of file diff --git a/game_web/web_group/target/test-classes/etty-contexts.xml b/game_web/web_group/target/test-classes/etty-contexts.xml new file mode 100644 index 0000000..e8c1814 --- /dev/null +++ b/game_web/web_group/target/test-classes/etty-contexts.xml @@ -0,0 +1,9 @@ + + + + + org.eclipse.jetty.server.webapp.WebInfIncludeJarPattern + .*/.*jsp-api-[^/]\.jar$|./.*jsp-[^/]\.jar$|./.*taglibs[^/]*\.jar$ + + + \ No newline at end of file diff --git a/libs/game_common/src/main/java/com/game/player/state/PlayerInitState.java b/libs/game_common/src/main/java/com/game/player/state/PlayerInitState.java new file mode 100644 index 0000000..319dc05 --- /dev/null +++ b/libs/game_common/src/main/java/com/game/player/state/PlayerInitState.java @@ -0,0 +1,47 @@ +package com.game.player.state; + +import com.game.ActionEvent; +import com.game.Global; +import com.game.data.Player; +import com.game.state.StateBase; + +/** + * 玩家进房间的初始状态 + * + * + */ +public class PlayerInitState extends StateBase { + + @Override + public void enter(Player owner) { + if(owner.room.round==0&&owner.room.kickTime>0) { + owner.startActionTimer(owner.room.kickTime * 1000); + } + } + + @Override + public void exit(Player owner) { + owner.stopActionTimer(); + } + + @Override + public void execute(Player owner, String cmd, int gid, Object param) { + switch (cmd) { + case ActionEvent.EVENT_READY: + Global.gameCtr.ready(owner); + break; + case ActionEvent.EVENT_READY_AND_XIPAI: + Global.gameCtr.readyAndXipai(owner); + break; + case ActionEvent.EVENT_EXIT_ROOM: + if(owner.room.round>0)return; + Global.gameCtr.exitRoom(owner, gid,false); + break; + case ActionEvent.EVENT_TIMER_AUTO: + if(owner.room.round>0)return; + Global.gameCtr.exitRoom(owner, gid,true); + break; + } + } + +} diff --git a/libs/taurus-server/taurus-permanent/target/classes/config/taurus-permanent.xml b/libs/taurus-server/taurus-permanent/target/classes/config/taurus-permanent.xml new file mode 100644 index 0000000..66780a2 --- /dev/null +++ b/libs/taurus-server/taurus-permanent/target/classes/config/taurus-permanent.xml @@ -0,0 +1,75 @@ + + + 2 + + 100 + + Heap + + Heap + + 524288 + + 1024 + + 32768 + + 160 + + + 2 + 3 + 10 + + + true + + 15 + + + + + + + + + + 1.2.3.4 + + + 127.0.0.1 + + 10000 + + + + false +
0.0.0.0
+ 8080 +
+ + + + extension - test + extend.pk.EXMainServer + + + + + Sys + 4 + 16 + 60000 + 20000 + + + + + Ext + 4 + 16 + 60000 + 20000 + + +
\ No newline at end of file diff --git a/libs/taurus-server/taurus-permanent/target/classes/game-config.xml b/libs/taurus-server/taurus-permanent/target/classes/game-config.xml new file mode 100644 index 0000000..6ab3871 --- /dev/null +++ b/libs/taurus-server/taurus-permanent/target/classes/game-config.xml @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + 192.168.1.5 + 192.168.1.5 + 8890 + 8490 + 90 + true + \ No newline at end of file diff --git a/libs/taurus-server/taurus-permanent/target/classes/log4j.properties b/libs/taurus-server/taurus-permanent/target/classes/log4j.properties new file mode 100644 index 0000000..6786dba --- /dev/null +++ b/libs/taurus-server/taurus-permanent/target/classes/log4j.properties @@ -0,0 +1,20 @@ + +log4j.rootLogger = INFO,consoleAppender,fileAppender + +# ConsoleAppender +log4j.appender.consoleAppender=org.apache.log4j.ConsoleAppender +log4j.appender.consoleAppender.layout=org.apache.log4j.PatternLayout +log4j.appender.consoleAppender.layout.ConversionPattern=%d{HH:mm:ss,SSS} %-5p [%t] %c{2} %3x - %m%n + + +# Regular FileAppender +log4j.appender.fileAppender=org.apache.log4j.DailyRollingFileAppender +log4j.appender.fileAppender.layout=org.apache.log4j.PatternLayout +log4j.appender.fileAppender.File=${WORKDIR}/logs/web_main.log +log4j.appender.fileAppender.layout.ConversionPattern=%d{dd MMM yyyy | HH:mm:ss,SSS} | %-5p | %t | %c{3} | %3x | %m%n +log4j.appender.fileAppender.Encoding=UTF-8 +log4j.appender.fileAppender.DatePattern='.'yyyy-MM-dd +log4j.appender.dailyFile.Append=true + +# The file is rolled over very day +log4j.appender.fileAppender.DatePattern ='.'yyyy-MM-dd \ No newline at end of file diff --git a/libs/taurus-server/taurus-permanent/target/classes/taurus-core.xml b/libs/taurus-server/taurus-permanent/target/classes/taurus-core.xml new file mode 100644 index 0000000..6e548c0 --- /dev/null +++ b/libs/taurus-server/taurus-permanent/target/classes/taurus-core.xml @@ -0,0 +1,51 @@ + + + log4j.properties + + + redis + com.taurus.core.plugin.redis.RedisPlugin + + + + 80 + + 20 + + 5 + + -1 + + true + + true + + true + + 100 + + 60000 + + 30000 + + 1800000 + + true + + + + + + + + + + + + + + \ No newline at end of file diff --git a/libs/taurus-server/taurus-permanent/target/classes/taurus-permanent.xml b/libs/taurus-server/taurus-permanent/target/classes/taurus-permanent.xml new file mode 100644 index 0000000..66780a2 --- /dev/null +++ b/libs/taurus-server/taurus-permanent/target/classes/taurus-permanent.xml @@ -0,0 +1,75 @@ + + + 2 + + 100 + + Heap + + Heap + + 524288 + + 1024 + + 32768 + + 160 + + + 2 + 3 + 10 + + + true + + 15 + + + + + + + + + + 1.2.3.4 + + + 127.0.0.1 + + 10000 + + + + false +
0.0.0.0
+ 8080 +
+ + + + extension - test + extend.pk.EXMainServer + + + + + Sys + 4 + 16 + 60000 + 20000 + + + + + Ext + 4 + 16 + 60000 + 20000 + + +
\ No newline at end of file diff --git a/puke/suoha/game_pk_suoha/.idea/.gitignore b/puke/suoha/game_pk_suoha/.idea/.gitignore new file mode 100644 index 0000000..13566b8 --- /dev/null +++ b/puke/suoha/game_pk_suoha/.idea/.gitignore @@ -0,0 +1,8 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Editor-based HTTP Client requests +/httpRequests/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml diff --git a/puke/suoha/game_pk_suoha/.idea/compiler.xml b/puke/suoha/game_pk_suoha/.idea/compiler.xml new file mode 100644 index 0000000..dc5f36b --- /dev/null +++ b/puke/suoha/game_pk_suoha/.idea/compiler.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/puke/suoha/game_pk_suoha/.idea/encodings.xml b/puke/suoha/game_pk_suoha/.idea/encodings.xml new file mode 100644 index 0000000..63e9001 --- /dev/null +++ b/puke/suoha/game_pk_suoha/.idea/encodings.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/puke/suoha/game_pk_suoha/.idea/jarRepositories.xml b/puke/suoha/game_pk_suoha/.idea/jarRepositories.xml new file mode 100644 index 0000000..5a2f139 --- /dev/null +++ b/puke/suoha/game_pk_suoha/.idea/jarRepositories.xml @@ -0,0 +1,20 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/puke/suoha/game_pk_suoha/.idea/misc.xml b/puke/suoha/game_pk_suoha/.idea/misc.xml new file mode 100644 index 0000000..0c1b5d4 --- /dev/null +++ b/puke/suoha/game_pk_suoha/.idea/misc.xml @@ -0,0 +1,12 @@ + + + + + + + + \ No newline at end of file diff --git a/puke/suoha/game_pk_suoha/.idea/runConfigurations.xml b/puke/suoha/game_pk_suoha/.idea/runConfigurations.xml new file mode 100644 index 0000000..797acea --- /dev/null +++ b/puke/suoha/game_pk_suoha/.idea/runConfigurations.xml @@ -0,0 +1,10 @@ + + + + + + \ No newline at end of file diff --git a/puke/suoha/game_pk_suoha/.idea/vcs.xml b/puke/suoha/game_pk_suoha/.idea/vcs.xml new file mode 100644 index 0000000..c2365ab --- /dev/null +++ b/puke/suoha/game_pk_suoha/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file