Compare commits
142 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
16e1d8a913 | ||
|
04b033be7e | ||
|
7fd96b335a | ||
|
8cd5f1d475 | ||
|
21806a3754 | ||
|
e213fdfb04 | ||
|
b9827f8430 | ||
|
91d16b1cc4 | ||
|
b19868920a | ||
|
be5200663c | ||
|
7b878ff947 | ||
|
c78c480f99 | ||
|
b50874f5c4 | ||
|
f1db2972fd | ||
|
16c27b0ce0 | ||
|
a44535cad2 | ||
|
8b5a96e825 | ||
|
618531f5c6 | ||
|
8345d55e76 | ||
|
a48e2f3cc0 | ||
|
83419a6f23 | ||
|
b19549b0a8 | ||
|
60866674b5 | ||
|
a4941c1273 | ||
|
2b304eaa75 | ||
|
c6b98855af | ||
|
4e0928cb1b | ||
|
fb42533f55 | ||
|
9dff989e02 | ||
|
5b7f35b874 | ||
|
2d179d0cdf | ||
|
f4b303eb91 | ||
|
5d92b339f6 | ||
|
642adff919 | ||
|
62c51b1838 | ||
|
2751569e0c | ||
|
d623916b3c | ||
|
efd070a11b | ||
|
d111de0a7a | ||
|
c2fa251e69 | ||
|
de16e8e8de | ||
|
365177a3af | ||
|
b79e2dc935 | ||
|
7b0c807496 | ||
|
5c611b626d | ||
|
38149279bd | ||
|
a762c563d9 | ||
|
6a0d729dee | ||
|
f10389bf55 | ||
|
6b3d1ed49a | ||
|
d25bb5ff10 | ||
|
d38d4b4ec9 | ||
|
03828db6ff | ||
|
917fca2bcd | ||
|
680e4f1f59 | ||
|
f367609276 | ||
|
70ae4a4c92 | ||
|
6f561bea87 | ||
|
70a86c27b0 | ||
|
b0f37d2237 | ||
|
09376b827d | ||
|
d560392c79 | ||
|
c75f642011 | ||
|
5cfcac6cf6 | ||
|
d37ebd4c33 | ||
|
1d138b17c3 | ||
|
851678e2f3 | ||
|
2fb6fd6bea | ||
|
e3440a2a06 | ||
|
8de2d6e4e7 | ||
|
ba2dd0b22e | ||
|
754610d31b | ||
|
a35de9b83c | ||
|
2b6cb57050 | ||
|
677e76179c | ||
|
c65c122f45 | ||
|
b5530b352b | ||
|
4e638fb2ec | ||
|
7c454130db | ||
|
5863f88435 | ||
|
bbf07fe518 | ||
|
26660d75d2 | ||
|
76cdbc8f1f | ||
|
4097a8da75 | ||
|
e7bf6ec16b | ||
|
7ab983949c | ||
|
2028f8277d | ||
|
60bb74169e | ||
|
8536521136 | ||
|
5df545e168 | ||
|
6bc3feab58 | ||
|
e21e1b840f | ||
|
ef345e0e48 | ||
|
0168e2182e | ||
|
58b06f6a10 | ||
|
58e60a789f | ||
|
b5b43bb596 | ||
|
59767c1ed5 | ||
|
1c6ad5c8f8 | ||
|
34e0893eb8 | ||
|
cc7524becd | ||
|
d06cb18a08 | ||
|
00816fb636 | ||
|
ff24bea055 | ||
|
56d66a128a | ||
|
2f097dfec5 | ||
|
ff48b47ecc | ||
|
7a0127b17d | ||
|
59c8427c70 | ||
|
c357ebad3b | ||
|
b2e1f7c2a6 | ||
|
9a8c32197e | ||
|
a82a238ce9 | ||
|
5b76c5bbfb | ||
|
b81c470135 | ||
|
48074d48af | ||
|
342efc623c | ||
|
b8e757064d | ||
|
71b9e72592 | ||
|
21b48b7c0d | ||
|
fbfca965e6 | ||
|
b27b567c77 | ||
|
e9119530f1 | ||
|
e6a4295773 | ||
|
aa14529bf8 | ||
|
84af0d1572 | ||
|
16fb23c376 | ||
|
d1f8a58154 | ||
|
89c31e8944 | ||
|
45380d170f | ||
|
dd9c03404e | ||
|
29e402ea71 | ||
|
b1e3d6525c | ||
|
845282db50 | ||
|
71a5a7b727 | ||
|
934a495d47 | ||
|
9725fb9df2 | ||
|
7d922aab0b | ||
|
823624d95d | ||
|
ab122a7bc8 | ||
|
5b9b3a0b55 | ||
|
24e980c17f |
2
.gitignore
vendored
@@ -1,3 +1,5 @@
|
||||
.vs
|
||||
**/.vs
|
||||
battle_srv/test_cases/test_cases
|
||||
battle_srv/test_cases/tests
|
||||
*.pid
|
||||
|
@@ -47,3 +47,46 @@ renderFrameId | toApplyInputFrameId
|
||||
..., ..., ..., 368 | 90
|
||||
369, 370, 371, 372 | 91
|
||||
373, 374, 375, ... | 92
|
||||
|
||||
# Would using UDP instead of TCP yield better synchronization performance?
|
||||
Yes, but with non-trivial efforts.
|
||||
|
||||
## Neat advantage using UDP
|
||||
Let's check an actual use case. As soon as an inputFrame becomes all-confirmed, the server should downsync it to all active players -- and upon reception loss of the packet containing this "all-confirmed downsync inputFrame" to a certain player, the server MUST retransmit another packet containing the same inputFrame to that player.
|
||||
|
||||
To apply UDP on this use case, additional `ack & retransmission mechanism` would be required, which is a moderately difficult task -- don't just pick a 3rd party lib using TCP flow-control alike `sliding window mechanism`, e.g. [RUDP](https://www.geeksforgeeks.org/reliable-user-datagram-protocol-rudp/)! Here's why.
|
||||
|
||||
Assume that the server is downsyncing `sequence of packets[#1, #2, #3, #4, #5, #6, #7, #8, #9, #10]`, when using TCP we get the advantage that each active player is guaranteed to receive that same sequence in the same order -- however in a bad, lossy network when `packet#2` got lost several times for a certain player whose reception window size is just 5, it has to wait for the arrival of `packet#2` at `[_, #3, #4, #5, #6]`, thus unable to process `[#7, #8, #9, #10]` which could contain `unpredictable inputFrame` while `#2` being `correct prediction` for that player.
|
||||
|
||||
That's so neat but still an advantage for using UDP! Yet if the TCP flow-control alike `sliding window mechanism` is employed on UDP, such advantage'd be compromised.
|
||||
|
||||
To summarize, if UDP is used we need
|
||||
- an `ack & retransmission mechanism` built on top of it to guarantee reception of critical packets for active players, and
|
||||
- reception order is not necessary to be reserved (mimic [markConfirmationIfApplicable](https://github.com/genxium/DelayNoMore/blob/v0.9.14/battle_srv/models/room.go#L1085) to maintain `lastAllConfirmedInputFrameId`), but
|
||||
- TCP flow-control alike `sliding window mechanism` should be avoided to gain advantage over TCP.
|
||||
|
||||
## Additional hassles to care about using UDP
|
||||
When using UDP, it's also necessary to verify authorization of each incoming packet, e.g. by simple time limited symmetric key, due to being connectionless.
|
||||
|
||||
## Why not hybrid?
|
||||
Instead of replacing all use of TCP by UDP, it's more reasonable to keep using TCP for login and the "all-confirmed downsync inputFrames" from server to players (and possibly "upsync inputFrames" from player to server, but tradeoff on that remains to be discussed), while using a `UDP secondary session` for broadcasting inputFrames of each individual player asap (either using p2p or not) just for **better prediction performance**!
|
||||
|
||||
## How do you actually implement the `UDP secondary session`?
|
||||
It's not a global consensus, but in practice many UDP communications are platform specific due to their paired asynchronous I/O choices, e.g. epoll in Linux and kqueue in BSD-ish. Of course there're many 3rd party higher level encapsulated tools for cross-platform use but that introduces extra debugging when things go wrong.
|
||||
|
||||
Therefore, the following plan doesn't assume use of any specific 3rd party encapsulation of UDP communication.
|
||||

|
||||
|
||||
# Would using WebRTC for all frontends be a `UDP for all` solution?
|
||||
Theoretically yes.
|
||||
|
||||
## Plan to integrate WebRTC
|
||||
The actual integration of WebRTC to enable `browser v.s. native app w/ WebRTC` requires detailed planning :)
|
||||
|
||||
In my current implementation, there's only 1 backend process and it's responsible for all of the following things. The plan for integrating/migrating each item is written respectively.
|
||||
- TURN for UDP tunneling/relay
|
||||
- Some minor modification to [Room.PlayerSecondaryDownsyncSessionDict](https://github.com/genxium/DelayNoMore/blob/365177a3af6033f1cd629a4a4d59beb4557cc311/battle_srv/models/room.go#L126) should be enough to yield a WebRTC API friendly TURN. It's interesting that [though UDP based in transport layer, a WebRTC session is stateful and more similar to WebSocket in terms of API](https://developer.mozilla.org/en-US/docs/Web/API/WebRTC_API).
|
||||
- STUN for UDP holepunching
|
||||
- Some minor modification to [Player.UdpAddr](https://github.com/genxium/DelayNoMore/blob/365177a3af6033f1cd629a4a4d59beb4557cc311/battle_srv/models/player.go#L56) should be enough to yield a WebRTC API friendly STUN.
|
||||
- reconnection recovery
|
||||
- Not sure whether or not I should separate this feature from STUN and TURN, but if I were to do so, [both `Room.RenderFrameBuffer` and `Room.InputsBuffer`](https://github.com/genxium/DelayNoMore/blob/365177a3af6033f1cd629a4a4d59beb4557cc311/battle_srv/models/room.go) should be moved to a shared fast I/O storage (e.g. using Redis) to achieve the same level of `High Availability` in design as STUN and TURN.
|
||||
|
96
README.md
@@ -1,17 +1,26 @@
|
||||
# Preface
|
||||
|
||||
This project is a demo for a websocket-based rollback netcode inspired by [GGPO](https://github.com/pond3r/ggpo/blob/master/doc/README.md).
|
||||
This project is a demo for a websocket-based rollback netcode inspired by [GGPO](https://github.com/pond3r/ggpo/blob/master/doc/README.md).
|
||||
|
||||
_(the following gif is sped up to ~1.5x for file size reduction, kindly note that animations are resumed from a partial progress)_
|
||||
[Demo recorded over INTERNET (Phone-Wifi v.s. PC-Wifi UDP holepunched) using an input delay of 6 frames](https://pan.baidu.com/s/1UArwqDShLoPjYppjjqsTqQ?pwd=10wc), and it feels SMOOTH when playing!
|
||||
|
||||

|
||||

|
||||
|
||||
Please also checkout [this demo video](https://pan.baidu.com/s/1Lmot9cb0pYylfUvC8G4fDg?pwd=ia97) to see how this demo carries out a full 60fps synchronization with the help of _batched input upsync/downsync_ for satisfying network I/O performance.
|
||||
(battle between 2 celluar 4G users using Android phones, [original video here](https://pan.baidu.com/s/1RL-9M-cK8cFS_Q8afMTrJA?pwd=ryzv))
|
||||
|
||||
The video mainly shows the following features.
|
||||
- The backend receives inputs from frontend peers and broadcasts back for synchronization.
|
||||
- The game is recovered for a player upon reconnection.
|
||||
- Both backend(Golang) and frontend(JavaScript) execute collision detection and handle collision contacts by the same algorithm. The backend dynamics is togglable by [Room.BackendDynamicsEnabled](https://github.com/genxium/DelayNoMore/blob/v0.5.2/battle_srv/models/room.go#L813), but **when turned off the game couldn't support recovery upon reconnection**.
|
||||

|
||||
|
||||
As lots of feedbacks ask for a discussion on using UDP instead, I tried to summarize my personal opinion about it in [ConcerningEdgeCases](./ConcerningEdgeCases.md) -- **since v0.9.25, the project is actually equipped with UDP capabilities as follows**.
|
||||
- When using the so called `native apps` on `Android` and `Windows` (I'm working casually hard to support `iOS` next), the frontends will try to use UDP hole-punching w/ the help of backend as a registry. If UDP hole-punching is working, the rollback is often less than `turn-around frames to recover` and thus not noticeable, being much better than using websocket alone. This video shows how the UDP holepunched p2p performs for [Phone-Wifi v.s. PC-Wifi (viewed by PC side)](https://pan.baidu.com/s/1K6704bJKlrSBTVqGcXhajA?pwd=l7ok).
|
||||
- If UDP hole-punching is not working, e.g. for Symmetric NAT like in 4G/5G cellular network, the frontends will use backend as a UDP tunnel (or relay, whatever you like to call it). This video shows how the UDP tunnel performs for [Phone-4G v.s. PC-Wifi (merged view@v0.9.34, excellent synchronization)](https://pan.baidu.com/s/1yeIrN5TSf6_av_8-N3vdVg?pwd=7tzw).
|
||||
- Browser vs `native app` is possible but in that case only websocket is used. For WebRTC integration plan please see [ConcerningEdgeCases](./ConcerningEdgeCases.md). You might also be interested in visiting [netplayjs](https://github.com/rameshvarun/netplayjs) to see how others use WebRTC for browser game synchronization as well.
|
||||
|
||||
|
||||
# Notable Features
|
||||
- Backend dynamics toggle via [Room.BackendDynamicsEnabled](https://github.com/genxium/DelayNoMore/blob/v0.9.14/battle_srv/models/room.go#L786)
|
||||
- Recovery upon reconnection (only if backend dynamics is ON)
|
||||
- Automatically correction for "slow ticker", especially "active slow ticker" which is well-known to be a headache for input synchronization
|
||||
- Frame data logging toggle for both frontend & backend, useful for debugging out of sync entities when developing new features
|
||||
|
||||
_(how input delay roughly works)_
|
||||
|
||||
@@ -19,7 +28,10 @@ _(how input delay roughly works)_
|
||||
|
||||
_(how rollback-and-chase in this project roughly works)_
|
||||
|
||||

|
||||

|
||||
|
||||
(By use of [GopherJs](https://github.com/gopherjs/gopherjs), the frontend codes for dynamics are now automatically generated)
|
||||

|
||||
|
||||
# 1. Building & running
|
||||
@@ -27,7 +39,8 @@ _(how rollback-and-chase in this project roughly works)_
|
||||
## 1.1 Tools to install
|
||||
### Backend
|
||||
- [Command Line Tools for Xcode](https://developer.apple.com/download/all/?q=command%20line%20tools) (on OSX) or [TDM-GCC](https://jmeubank.github.io/tdm-gcc/download/) (on Windows) (a `make` executable mandatory)
|
||||
- [Golang1.18.6](https://golang.org/dl/) (brought down to 1.18 for GopherJs support, mandatory, in China please try a mirror site like [that of ustc](https://mirrors.ustc.edu.cn/golang/))
|
||||
- [Golang1.18.6](https://golang.org/dl/) (brought down to 1.18 for _GopherJs_ support, mandatory, in China please try a mirror site like [that of ustc](https://mirrors.ustc.edu.cn/golang/))
|
||||
- [GopherJs1.18.0-beta1](https://github.com/gopherjs/gopherjs/tree/v1.18.0-beta1) (optional, only for developemnt)
|
||||
- [MySQL 5.7](https://dev.mysql.com/downloads/windows/installer/5.7.html) (mandatory, for OSX not all versions of 5.7 can be found thus 5.7.24 is recommended)
|
||||
- [Redis 3.0.503 or above](https://redis.io/download/) (mandatory)
|
||||
- [skeema](https://www.skeema.io/) (optional, only for convenient MySQL schema provisioning)
|
||||
@@ -60,7 +73,7 @@ user@proj-root/battle_srv/configs> cp -r ./configs.template ./configs
|
||||
user@proj-root/frontend/assets/plugin_scripts> cp ./conf.js.template ./conf.js
|
||||
```
|
||||
|
||||
## 1.2 Actual building & running
|
||||
## 1.3 Actual building & running
|
||||
### Backend
|
||||
```
|
||||
### The following command runs mysql-server in foreground, it's almost NEVER run in such a way, please find a proper way to run it for yourself
|
||||
@@ -89,3 +102,66 @@ ErrFatal {"err": "MISCONF Redis is configured to save RDB snapshots, but
|
||||
```
|
||||
|
||||
Just restart your `redis-server` process.
|
||||
|
||||
### 2.2 Why not show "PING value" on frontend display?
|
||||
The most important reason for not showing "PING value" is simple: in most games the "PING value" is collected by a dedicated kernel thread which doesn't interfere the UI thread or the primary networking thread. As this demo primarily runs on browser by far, I don't have this capability easily.
|
||||
|
||||
Moreover, in practice I found that to spot sync anomalies, the following tools are much more useful than the "PING VALUE".
|
||||
- Detection of [prediction mismatch on the frontend](https://github.com/genxium/DelayNoMore/blob/v0.9.19/frontend/assets/scripts/Map.js#L842).
|
||||
- Detection of [type#1 forceConfirmation on the backend](https://github.com/genxium/DelayNoMore/blob/v0.9.19/battle_srv/models/room.go#L1246).
|
||||
- Detection of [type#2 forceConfirmation on the backend](https://github.com/genxium/DelayNoMore/blob/v0.9.19/battle_srv/models/room.go#L1259).
|
||||
|
||||
There's also some useful information displayed on the frontend when `true == Map.showNetworkDoctorInfo`.
|
||||

|
||||
|
||||
### 2.3 WIN32 platform tool versioning
|
||||

|
||||
When building for native platforms, it's much more convenient to trigger the CocosCreator project forming frmo CLI, e.g.
|
||||
```
|
||||
shell> cd <proj-root>
|
||||
shell> /path/to/CocosCreator.exe --path ./frontend --build "platform=win32;debug=true"
|
||||
shell> cd ./frontend/build/jsb-link/frameworks/runtime-src/proj.win32 && MSBUILD DelayNoMore.vcxproj -property:Configuration=Debug
|
||||
```
|
||||
or
|
||||
```
|
||||
shell> cd <proj-root>
|
||||
shell> /path/to/CocosCreator.exe --path ./frontend --build "platform=win32;debug=false"
|
||||
shell> cd ./frontend/build/jsb-link/frameworks/runtime-src/proj.win32 && MSBUILD DelayNoMore.vcxproj -property:Configuration=Release
|
||||
```
|
||||
|
||||
for release.
|
||||
|
||||
If `MSBUILD` command is not yet added to `PATH`, Use `Get-Command MSBUILD` in `Developer Command Prompt for VS 2017/2019` to see where the command should come from and add it to `PATH`.
|
||||
|
||||
Similarly for Android release build
|
||||
```
|
||||
shell> cd <proj-root>
|
||||
shell> /path/to/CocosCreator.exe --path ./frontend --build "platform=android;debug=false"
|
||||
shell> cd ./frontend/build/jsb-link/frameworks/runtime-src/proj.android-studio && ./gradlew assembleRelease
|
||||
```
|
||||
|
||||
### 2.4 CococCreator native build reloading
|
||||
CocosCreator doesn't have perfect file cache management during native project building, use "Developer Tools > Reload" to reset the IDE status upon mysterious errors.
|
||||

|
||||
|
||||
Another issue is with the package name, see the screenshot below, kindly note that after successfully building with a blank package name, you can then re-fill the desired package name and build again!
|
||||

|
||||
|
||||
### 2.5 Checking UDP port binding result
|
||||
__*nix__
|
||||
```
|
||||
netstat -anp | grep <your_port>
|
||||
```
|
||||
|
||||
__Windows__
|
||||
```
|
||||
netstat -ano | grep <your_port>
|
||||
```
|
||||
|
||||
### 2.6 Checking native code crash on non-rooted Android phone
|
||||
```
|
||||
DeveloperOs> adb bugreport ./logs.zip
|
||||
# The file "logs.zip" will be automatically pulled to current folder of the DeveloperOS, copy "logs/FS/data/tomestones" out of the zip, then use the binary "$NDK_ROOT/ndk-stack" to analyze whichever tombstone you're interested in, for example, I often use the following
|
||||
DeveloperOs> ${NDK_ROOT}/ndk-stack.cmd -sym \path\to\DelayNoMore\frontend\build\jsb-link\frameworks\runtime-src\proj.android-studio\app\build\intermediates\ndkBuild\debug\obj\local\arm64-v8a -dump \path\to\tombstones\tombstone_03
|
||||
# The param "-sym \path\to\objs" tells "ndk-stack" to decode "tombstone_03" with symbols provided by all the files inside that "\path\to\objs".
|
||||
```
|
||||
|
@@ -4,9 +4,24 @@ ROOT_DIR=.
|
||||
GOPROXY=https://goproxy.io
|
||||
all: help
|
||||
|
||||
# To install `gojson` executable
|
||||
# ```
|
||||
# go install github.com/ChimeraCoder/gojson/gojson@latest
|
||||
# ```
|
||||
#
|
||||
# OS detection reference https://stackoverflow.com/a/12099167
|
||||
gen-constants:
|
||||
gojson -pkg common -name constants -input common/constants.json -o common/constants_struct.go
|
||||
ifeq ($(OS),Windows_NT)
|
||||
sed -i 's/int64/int/g' common/constants_struct.go
|
||||
else
|
||||
UNAME_S := $(shell uname -s)
|
||||
ifeq ($(UNAME_S),Darwin)
|
||||
sed -i '' -e 's/int64/int/g' common/constants_struct.go
|
||||
else
|
||||
sed -i 's/int64/int/g' common/constants_struct.go
|
||||
endif
|
||||
endif
|
||||
|
||||
run-test: build
|
||||
ServerEnv=TEST ./$(PROJECTNAME)
|
||||
|
@@ -85,7 +85,6 @@ func (p *playerController) SMSCaptchaGet(c *gin.Context) {
|
||||
c.Set(api.RET, Constants.RetCode.SmsCaptchaRequestedTooFrequently)
|
||||
return
|
||||
}
|
||||
Logger.Info("A new SmsCaptcha record is needed for: ", zap.String("key", redisKey))
|
||||
pass := false
|
||||
var succRet int
|
||||
if Conf.General.ServerEnv == SERVER_ENV_TEST {
|
||||
@@ -93,32 +92,28 @@ func (p *playerController) SMSCaptchaGet(c *gin.Context) {
|
||||
if nil == err && nil != player {
|
||||
pass = true
|
||||
succRet = Constants.RetCode.IsTestAcc
|
||||
Logger.Info("A new SmsCaptcha record is needed for: ", zap.String("key", redisKey), zap.Any("player", player))
|
||||
}
|
||||
}
|
||||
|
||||
if !pass {
|
||||
player, err := models.GetPlayerByName(req.Num)
|
||||
if nil == err && nil != player {
|
||||
pass = true
|
||||
succRet = Constants.RetCode.IsBotAcc
|
||||
}
|
||||
}
|
||||
|
||||
if !pass {
|
||||
if RE_PHONE_NUM.MatchString(req.Num) {
|
||||
succRet = Constants.RetCode.Ok
|
||||
pass = true
|
||||
}
|
||||
if req.CountryCode == "86" {
|
||||
if RE_CHINA_PHONE_NUM.MatchString(req.Num) {
|
||||
succRet = Constants.RetCode.Ok
|
||||
pass = true
|
||||
} else {
|
||||
succRet = Constants.RetCode.InvalidRequestParam
|
||||
pass = false
|
||||
/*
|
||||
// Real phonenum is not supported yet!
|
||||
if !pass {
|
||||
if RE_PHONE_NUM.MatchString(req.Num) {
|
||||
succRet = Constants.RetCode.Ok
|
||||
pass = true
|
||||
}
|
||||
if req.CountryCode == "86" {
|
||||
if RE_CHINA_PHONE_NUM.MatchString(req.Num) {
|
||||
succRet = Constants.RetCode.Ok
|
||||
pass = true
|
||||
} else {
|
||||
succRet = Constants.RetCode.InvalidRequestParam
|
||||
pass = false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
if !pass {
|
||||
c.Set(api.RET, Constants.RetCode.InvalidRequestParam)
|
||||
return
|
||||
@@ -481,16 +476,6 @@ func (p *playerController) maybeCreateNewPlayer(req smsCaptchaReq) (*models.Play
|
||||
Logger.Info("Got a test env player:", zap.Any("phonenum", req.Num), zap.Any("playerId", player.Id))
|
||||
return player, nil
|
||||
}
|
||||
} else {
|
||||
botPlayer, err := models.GetPlayerByName(req.Num)
|
||||
if err != nil {
|
||||
Logger.Error("Seeking bot player error:", zap.Error(err))
|
||||
return nil, err
|
||||
}
|
||||
if botPlayer != nil {
|
||||
Logger.Info("Got a bot player:", zap.Any("phonenum", req.Num), zap.Any("playerId", botPlayer.Id))
|
||||
return botPlayer, nil
|
||||
}
|
||||
}
|
||||
|
||||
bind, err := models.GetPlayerAuthBinding(Constants.AuthChannel.Sms, extAuthID)
|
||||
|
@@ -74,7 +74,7 @@ func Test_SMSCaptchaGet_illegalPhone(t *testing.T) {
|
||||
|
||||
func Test_SMSCaptchaGet_testAcc(t *testing.T) {
|
||||
player, err := getTestPlayer()
|
||||
if err == nil && player != nil {
|
||||
if nil == err && nil != player {
|
||||
resp := mustDoSmsCaptchaGetReq(fakeSMSCaptchReq(player.Name), t)
|
||||
if resp.Ret != Constants.RetCode.IsTestAcc {
|
||||
t.Fail()
|
||||
|
@@ -37,6 +37,8 @@ type mysqlConf struct {
|
||||
|
||||
type sioConf struct {
|
||||
HostAndPort string `json:"hostAndPort"`
|
||||
UdpHost string `json:"udpHost"`
|
||||
UdpPort int `json:"udpPort"`
|
||||
}
|
||||
|
||||
type botServerConf struct {
|
||||
|
@@ -44,10 +44,10 @@
|
||||
"PASSWORD_RESET_CODE_GENERATION_PER_EMAIL_TOO_FREQUENTLY": 2020,
|
||||
"TRADE_CREATION_TOO_FREQUENTLY": 2021,
|
||||
"MAP_NOT_UNLOCKED": 2022,
|
||||
|
||||
"GET_SMS_CAPTCHA_RESP_ERROR_CODE": 2023,
|
||||
"SMS_CAPTCHA_REQUESTED_TOO_FREQUENTLY": 2024,
|
||||
"SMS_CAPTCHA_NOT_MATCH": 2025,
|
||||
"SAME_PLAYER_ALREADY_IN_SAME_ROOM": 2026,
|
||||
|
||||
"NOT_IMPLEMENTED_YET": 65535
|
||||
},
|
||||
|
@@ -17,6 +17,7 @@ type constants struct {
|
||||
RetCode struct {
|
||||
ActiveWatchdog int `json:"ACTIVE_WATCHDOG"`
|
||||
BattleStopped int `json:"BATTLE_STOPPED"`
|
||||
ClientMismatchedRenderFrame int `json:"CLIENT_MISMATCHED_RENDER_FRAME"`
|
||||
Duplicated int `json:"DUPLICATED"`
|
||||
FailedToCreate int `json:"FAILED_TO_CREATE"`
|
||||
FailedToDelete int `json:"FAILED_TO_DELETE"`
|
||||
@@ -51,6 +52,7 @@ type constants struct {
|
||||
PlayerNotAddableToRoom int `json:"PLAYER_NOT_ADDABLE_TO_ROOM"`
|
||||
PlayerNotFound int `json:"PLAYER_NOT_FOUND"`
|
||||
PlayerNotReaddableToRoom int `json:"PLAYER_NOT_READDABLE_TO_ROOM"`
|
||||
SamePlayerAlreadyInSameRoom int `json:"SAME_PLAYER_ALREADY_IN_SAME_ROOM"`
|
||||
SendEmailTimeout int `json:"SEND_EMAIL_TIMEOUT"`
|
||||
SmsCaptchaNotMatch int `json:"SMS_CAPTCHA_NOT_MATCH"`
|
||||
SmsCaptchaRequestedTooFrequently int `json:"SMS_CAPTCHA_REQUESTED_TOO_FREQUENTLY"`
|
||||
|
@@ -1,3 +1,5 @@
|
||||
{
|
||||
"hostAndPort": "0.0.0.0:9992"
|
||||
"hostAndPort": "0.0.0.0:9992",
|
||||
"udpHost": "0.0.0.0",
|
||||
"udpPort": 3000
|
||||
}
|
||||
|
@@ -3,6 +3,7 @@ module battle_srv
|
||||
go 1.18
|
||||
|
||||
require (
|
||||
dnmshared v0.0.0
|
||||
github.com/Masterminds/squirrel v0.0.0-20180815162352-8a7e65843414
|
||||
github.com/davecgh/go-spew v1.1.1
|
||||
github.com/gin-contrib/cors v0.0.0-20180514151808-6f0a820f94be
|
||||
@@ -19,14 +20,12 @@ require (
|
||||
github.com/thoas/go-funk v0.0.0-20180716193722-1060394a7713
|
||||
go.uber.org/zap v1.9.1
|
||||
google.golang.org/protobuf v1.28.1
|
||||
|
||||
dnmshared v0.0.0
|
||||
jsexport v0.0.0
|
||||
resolv v0.0.0
|
||||
jsexport v0.0.0
|
||||
resolv v0.0.0
|
||||
)
|
||||
|
||||
require (
|
||||
github.com/ChimeraCoder/gojson v1.0.0 // indirect
|
||||
github.com/ChimeraCoder/gojson v1.1.0 // indirect
|
||||
github.com/fatih/color v1.7.0 // indirect
|
||||
github.com/gin-contrib/sse v0.0.0-20170109093832-22d885f9ecc7 // indirect
|
||||
github.com/githubnemo/CompileDaemon v1.0.0 // indirect
|
||||
@@ -44,11 +43,11 @@ require (
|
||||
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 // indirect
|
||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 // indirect
|
||||
gopkg.in/go-playground/validator.v8 v8.18.2 // indirect
|
||||
gopkg.in/yaml.v2 v2.2.1 // indirect
|
||||
gopkg.in/yaml.v2 v2.4.0 // indirect
|
||||
)
|
||||
|
||||
replace (
|
||||
dnmshared => ../dnmshared
|
||||
jsexport => ../jsexport
|
||||
resolv => ../resolv_tailored
|
||||
jsexport => ../jsexport
|
||||
resolv => ../resolv_tailored
|
||||
)
|
||||
|
@@ -2,6 +2,8 @@ github.com/ByteArena/box2d v1.0.2 h1:f7f9KEQWhCs1n516DMLzi5w6u0MeeE78Mes4fWMcj9k
|
||||
github.com/ByteArena/box2d v1.0.2/go.mod h1:LzEuxY9iCz+tskfWCY3o0ywYBRafDDugdSj+/YGI6sE=
|
||||
github.com/ChimeraCoder/gojson v1.0.0 h1:gAYKGTV+xfQ4+l/4C/nazPbiQDUidG0G3ukAJnE7LNE=
|
||||
github.com/ChimeraCoder/gojson v1.0.0/go.mod h1:nYbTQlu6hv8PETM15J927yM0zGj3njIldp72UT1MqSw=
|
||||
github.com/ChimeraCoder/gojson v1.1.0 h1:/6S8djl/jColpJGTYniA3xrqJWuKeyEozzPtpr5L4Pw=
|
||||
github.com/ChimeraCoder/gojson v1.1.0/go.mod h1:nYbTQlu6hv8PETM15J927yM0zGj3njIldp72UT1MqSw=
|
||||
github.com/Masterminds/squirrel v0.0.0-20180815162352-8a7e65843414 h1:VHdYPA0V0YgL97gdjHevN6IVPRX+fOoNMqcYvUAzwNU=
|
||||
github.com/Masterminds/squirrel v0.0.0-20180815162352-8a7e65843414/go.mod h1:xnKTFzjGUiZtiOagBsfnvomW+nJg2usB1ZpordQWqNM=
|
||||
github.com/Pallinder/go-randomdata v0.0.0-20180616180521-15df0648130a h1:0OnS8GR4uI3nau+f/juCZlAq+zCrsHXRJlENrUQ4eU8=
|
||||
@@ -92,3 +94,5 @@ gopkg.in/go-playground/validator.v8 v8.18.2 h1:lFB4DoMU6B626w8ny76MV7VX6W2VHct2G
|
||||
gopkg.in/go-playground/validator.v8 v8.18.2/go.mod h1:RX2a/7Ha8BgOhfk7j780h4/u/RRjR0eouCJSH80/M2Y=
|
||||
gopkg.in/yaml.v2 v2.2.1 h1:mUhvW9EsL+naU5Q3cakzfE91YhliOondGd6ZrsDBHQE=
|
||||
gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
|
||||
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
|
||||
|
@@ -23,9 +23,18 @@ import (
|
||||
"github.com/gin-gonic/gin"
|
||||
"github.com/robfig/cron"
|
||||
"go.uber.org/zap"
|
||||
|
||||
"net"
|
||||
// _ "net/http/pprof"
|
||||
)
|
||||
|
||||
func main() {
|
||||
/*
|
||||
// Only used for profiling
|
||||
go func() {
|
||||
http.ListenAndServe("0.0.0.0:6060", nil)
|
||||
}()
|
||||
*/
|
||||
MustParseConfig()
|
||||
MustParseConstants()
|
||||
storage.Init()
|
||||
@@ -34,7 +43,7 @@ func main() {
|
||||
env_tools.MergeTestPlayerAccounts()
|
||||
}
|
||||
models.InitRoomHeapManager()
|
||||
startScheduler()
|
||||
// startScheduler()
|
||||
router := gin.Default()
|
||||
setRouter(router)
|
||||
|
||||
@@ -54,6 +63,7 @@ func main() {
|
||||
}
|
||||
Logger.Info("Listening and serving HTTP on", zap.Any("Conf.Sio.HostAndPort", Conf.Sio.HostAndPort))
|
||||
}()
|
||||
go startGrandUdpServer()
|
||||
var gracefulStop = make(chan os.Signal)
|
||||
signal.Notify(gracefulStop, syscall.SIGTERM)
|
||||
signal.Notify(gracefulStop, syscall.SIGINT)
|
||||
@@ -89,6 +99,7 @@ func setRouter(router *gin.Engine) {
|
||||
router.StaticFS("/asset", http.Dir(filepath.Join(Conf.General.AppRoot, "asset")))
|
||||
router.GET("/ping", f)
|
||||
router.GET("/tsrht", ws.Serve)
|
||||
router.GET("/tsrhtSecondary", ws.HandleSecondaryWsSessionForPlayer)
|
||||
|
||||
apiRouter := router.Group("/api")
|
||||
{
|
||||
@@ -113,3 +124,33 @@ func startScheduler() {
|
||||
//c.AddFunc("*/1 * * * * *", FuncName)
|
||||
c.Start()
|
||||
}
|
||||
|
||||
func startGrandUdpServer() {
|
||||
conn, err := net.ListenUDP("udp", &net.UDPAddr{
|
||||
Port: Conf.Sio.UdpPort,
|
||||
IP: net.ParseIP(Conf.Sio.UdpHost),
|
||||
})
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
defer func() {
|
||||
conn.Close()
|
||||
if r := recover(); r != nil {
|
||||
Logger.Error("`GrandUdpServer`, recovery spot#1, recovered from: ", zap.Any("panic", r))
|
||||
}
|
||||
Logger.Info(fmt.Sprintf("The `GrandUdpServer` is stopped"))
|
||||
}()
|
||||
|
||||
Logger.Info(fmt.Sprintf("`GrandUdpServer` started at %s", conn.LocalAddr().String()))
|
||||
|
||||
for {
|
||||
message := make([]byte, 2046)
|
||||
rlen, remote, err := conn.ReadFromUDP(message[:])
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
Logger.Info(fmt.Sprintf("`GrandUdpServer` received: %d bytes from %s\n", rlen, remote))
|
||||
ws.HandleUdpHolePunchingForPlayer(message[0:rlen], remote)
|
||||
}
|
||||
}
|
||||
|
@@ -12,7 +12,9 @@ func toPbRoomDownsyncFrame(rdf *battle.RoomDownsyncFrame) *pb.RoomDownsyncFrame
|
||||
ret := &pb.RoomDownsyncFrame{
|
||||
Id: rdf.Id,
|
||||
PlayersArr: make([]*pb.PlayerDownsync, len(rdf.PlayersArr), len(rdf.PlayersArr)),
|
||||
BulletLocalIdCounter: rdf.BulletLocalIdCounter,
|
||||
MeleeBullets: make([]*pb.MeleeBullet, len(rdf.MeleeBullets), len(rdf.MeleeBullets)),
|
||||
FireballBullets: make([]*pb.FireballBullet, len(rdf.FireballBullets), len(rdf.FireballBullets)),
|
||||
CountdownNanos: rdf.CountdownNanos,
|
||||
BackendUnconfirmedMask: rdf.BackendUnconfirmedMask,
|
||||
ShouldForceResync: rdf.ShouldForceResync,
|
||||
@@ -20,61 +22,122 @@ func toPbRoomDownsyncFrame(rdf *battle.RoomDownsyncFrame) *pb.RoomDownsyncFrame
|
||||
|
||||
for i, last := range rdf.PlayersArr {
|
||||
pbPlayer := &pb.PlayerDownsync{
|
||||
Id: last.Id,
|
||||
VirtualGridX: last.VirtualGridX,
|
||||
VirtualGridY: last.VirtualGridY,
|
||||
DirX: last.DirX,
|
||||
DirY: last.DirY,
|
||||
VelX: last.VelX,
|
||||
VelY: last.VelY,
|
||||
FramesToRecover: last.FramesToRecover,
|
||||
FramesInChState: last.FramesInChState,
|
||||
ActiveSkillId: last.ActiveSkillId,
|
||||
ActiveSkillHit: last.ActiveSkillHit,
|
||||
FramesInvinsible: last.FramesInvinsible,
|
||||
Speed: last.Speed,
|
||||
BattleState: last.BattleState,
|
||||
CharacterState: last.CharacterState,
|
||||
InAir: last.InAir,
|
||||
JoinIndex: last.JoinIndex,
|
||||
Hp: last.Hp,
|
||||
MaxHp: last.MaxHp,
|
||||
ColliderRadius: last.ColliderRadius,
|
||||
Score: last.Score,
|
||||
Removed: last.Removed,
|
||||
Id: last.Id,
|
||||
VirtualGridX: last.VirtualGridX,
|
||||
VirtualGridY: last.VirtualGridY,
|
||||
DirX: last.DirX,
|
||||
DirY: last.DirY,
|
||||
VelX: last.VelX,
|
||||
VelY: last.VelY,
|
||||
FramesToRecover: last.FramesToRecover,
|
||||
FramesInChState: last.FramesInChState,
|
||||
ActiveSkillId: last.ActiveSkillId,
|
||||
ActiveSkillHit: last.ActiveSkillHit,
|
||||
FramesInvinsible: last.FramesInvinsible,
|
||||
Speed: last.Speed,
|
||||
BattleState: last.BattleState,
|
||||
CharacterState: last.CharacterState,
|
||||
InAir: last.InAir,
|
||||
OnWall: last.OnWall,
|
||||
OnWallNormX: last.OnWallNormX,
|
||||
OnWallNormY: last.OnWallNormY,
|
||||
CapturedByInertia: last.CapturedByInertia,
|
||||
JoinIndex: last.JoinIndex,
|
||||
BulletTeamId: last.BulletTeamId,
|
||||
ChCollisionTeamId: last.ChCollisionTeamId,
|
||||
Hp: last.Hp,
|
||||
MaxHp: last.MaxHp,
|
||||
RevivalVirtualGridX: last.RevivalVirtualGridX,
|
||||
RevivalVirtualGridY: last.RevivalVirtualGridY,
|
||||
ColliderRadius: last.ColliderRadius,
|
||||
Score: last.Score,
|
||||
Removed: last.Removed,
|
||||
}
|
||||
ret.PlayersArr[i] = pbPlayer
|
||||
}
|
||||
|
||||
for i, last := range rdf.MeleeBullets {
|
||||
pbBullet := &pb.MeleeBullet{
|
||||
OriginatedRenderFrameId: last.OriginatedRenderFrameId,
|
||||
OffenderJoinIndex: last.OffenderJoinIndex,
|
||||
BulletLocalId: last.BattleAttr.BulletLocalId,
|
||||
OriginatedRenderFrameId: last.BattleAttr.OriginatedRenderFrameId,
|
||||
OffenderJoinIndex: last.BattleAttr.OffenderJoinIndex,
|
||||
TeamId: last.BattleAttr.TeamId,
|
||||
|
||||
StartupFrames: last.StartupFrames,
|
||||
CancellableStFrame: last.CancellableStFrame,
|
||||
CancellableEdFrame: last.CancellableEdFrame,
|
||||
ActiveFrames: last.ActiveFrames,
|
||||
StartupFrames: last.Bullet.StartupFrames,
|
||||
CancellableStFrame: last.Bullet.CancellableStFrame,
|
||||
CancellableEdFrame: last.Bullet.CancellableEdFrame,
|
||||
ActiveFrames: last.Bullet.ActiveFrames,
|
||||
|
||||
HitStunFrames: last.HitStunFrames,
|
||||
BlockStunFrames: last.BlockStunFrames,
|
||||
PushbackVelX: last.PushbackVelX,
|
||||
PushbackVelY: last.PushbackVelY,
|
||||
Damage: last.Damage,
|
||||
HitStunFrames: last.Bullet.HitStunFrames,
|
||||
BlockStunFrames: last.Bullet.BlockStunFrames,
|
||||
PushbackVelX: last.Bullet.PushbackVelX,
|
||||
PushbackVelY: last.Bullet.PushbackVelY,
|
||||
Damage: last.Bullet.Damage,
|
||||
|
||||
SelfLockVelX: last.SelfLockVelX,
|
||||
SelfLockVelY: last.SelfLockVelY,
|
||||
SelfLockVelX: last.Bullet.SelfLockVelX,
|
||||
SelfLockVelY: last.Bullet.SelfLockVelY,
|
||||
|
||||
HitboxOffsetX: last.HitboxOffsetX,
|
||||
HitboxOffsetY: last.HitboxOffsetY,
|
||||
HitboxSizeX: last.HitboxSizeX,
|
||||
HitboxSizeY: last.HitboxSizeY,
|
||||
HitboxOffsetX: last.Bullet.HitboxOffsetX,
|
||||
HitboxOffsetY: last.Bullet.HitboxOffsetY,
|
||||
HitboxSizeX: last.Bullet.HitboxSizeX,
|
||||
HitboxSizeY: last.Bullet.HitboxSizeY,
|
||||
|
||||
BlowUp: last.BlowUp,
|
||||
BlowUp: last.Bullet.BlowUp,
|
||||
|
||||
SpeciesId: last.Bullet.SpeciesId,
|
||||
ExplosionFrames: last.Bullet.ExplosionFrames,
|
||||
|
||||
BlState: last.BlState,
|
||||
FramesInBlState: last.FramesInBlState,
|
||||
}
|
||||
ret.MeleeBullets[i] = pbBullet
|
||||
}
|
||||
|
||||
for i, last := range rdf.FireballBullets {
|
||||
pbBullet := &pb.FireballBullet{
|
||||
BulletLocalId: last.BattleAttr.BulletLocalId,
|
||||
OriginatedRenderFrameId: last.BattleAttr.OriginatedRenderFrameId,
|
||||
OffenderJoinIndex: last.BattleAttr.OffenderJoinIndex,
|
||||
TeamId: last.BattleAttr.TeamId,
|
||||
|
||||
StartupFrames: last.Bullet.StartupFrames,
|
||||
CancellableStFrame: last.Bullet.CancellableStFrame,
|
||||
CancellableEdFrame: last.Bullet.CancellableEdFrame,
|
||||
ActiveFrames: last.Bullet.ActiveFrames,
|
||||
|
||||
HitStunFrames: last.Bullet.HitStunFrames,
|
||||
BlockStunFrames: last.Bullet.BlockStunFrames,
|
||||
PushbackVelX: last.Bullet.PushbackVelX,
|
||||
PushbackVelY: last.Bullet.PushbackVelY,
|
||||
Damage: last.Bullet.Damage,
|
||||
|
||||
SelfLockVelX: last.Bullet.SelfLockVelX,
|
||||
SelfLockVelY: last.Bullet.SelfLockVelY,
|
||||
|
||||
HitboxOffsetX: last.Bullet.HitboxOffsetX,
|
||||
HitboxOffsetY: last.Bullet.HitboxOffsetY,
|
||||
HitboxSizeX: last.Bullet.HitboxSizeX,
|
||||
HitboxSizeY: last.Bullet.HitboxSizeY,
|
||||
|
||||
BlowUp: last.Bullet.BlowUp,
|
||||
|
||||
SpeciesId: last.Bullet.SpeciesId,
|
||||
ExplosionFrames: last.Bullet.ExplosionFrames,
|
||||
|
||||
BlState: last.BlState,
|
||||
FramesInBlState: last.FramesInBlState,
|
||||
|
||||
VirtualGridX: last.VirtualGridX,
|
||||
VirtualGridY: last.VirtualGridY,
|
||||
DirX: last.DirX,
|
||||
DirY: last.DirY,
|
||||
VelX: last.VelX,
|
||||
VelY: last.VelY,
|
||||
Speed: last.Speed,
|
||||
}
|
||||
ret.FireballBullets[i] = pbBullet
|
||||
}
|
||||
|
||||
return ret
|
||||
}
|
||||
|
||||
@@ -86,26 +149,36 @@ func toPbPlayers(modelInstances map[int32]*Player, withMetaInfo bool) []*pb.Play
|
||||
|
||||
for _, last := range modelInstances {
|
||||
pbPlayer := &pb.PlayerDownsync{
|
||||
Id: last.Id,
|
||||
VirtualGridX: last.VirtualGridX,
|
||||
VirtualGridY: last.VirtualGridY,
|
||||
DirX: last.DirX,
|
||||
DirY: last.DirY,
|
||||
VelX: last.VelX,
|
||||
VelY: last.VelY,
|
||||
FramesToRecover: last.FramesToRecover,
|
||||
FramesInChState: last.FramesInChState,
|
||||
ActiveSkillId: last.ActiveSkillId,
|
||||
ActiveSkillHit: last.ActiveSkillHit,
|
||||
FramesInvinsible: last.FramesInvinsible,
|
||||
Speed: last.Speed,
|
||||
BattleState: last.BattleState,
|
||||
CharacterState: last.CharacterState,
|
||||
InAir: last.InAir,
|
||||
JoinIndex: last.JoinIndex,
|
||||
ColliderRadius: last.ColliderRadius,
|
||||
Score: last.Score,
|
||||
Removed: last.Removed,
|
||||
Id: last.Id,
|
||||
VirtualGridX: last.VirtualGridX,
|
||||
VirtualGridY: last.VirtualGridY,
|
||||
DirX: last.DirX,
|
||||
DirY: last.DirY,
|
||||
VelX: last.VelX,
|
||||
VelY: last.VelY,
|
||||
FramesToRecover: last.FramesToRecover,
|
||||
FramesInChState: last.FramesInChState,
|
||||
ActiveSkillId: last.ActiveSkillId,
|
||||
ActiveSkillHit: last.ActiveSkillHit,
|
||||
FramesInvinsible: last.FramesInvinsible,
|
||||
Speed: last.Speed,
|
||||
BattleState: last.BattleState,
|
||||
CharacterState: last.CharacterState,
|
||||
InAir: last.InAir,
|
||||
OnWall: last.OnWall,
|
||||
OnWallNormX: last.OnWallNormX,
|
||||
OnWallNormY: last.OnWallNormY,
|
||||
CapturedByInertia: last.CapturedByInertia,
|
||||
JoinIndex: last.JoinIndex,
|
||||
BulletTeamId: last.BulletTeamId,
|
||||
ChCollisionTeamId: last.ChCollisionTeamId,
|
||||
Hp: last.Hp,
|
||||
MaxHp: last.MaxHp,
|
||||
RevivalVirtualGridX: last.RevivalVirtualGridX,
|
||||
RevivalVirtualGridY: last.RevivalVirtualGridY,
|
||||
ColliderRadius: last.ColliderRadius,
|
||||
Score: last.Score,
|
||||
Removed: last.Removed,
|
||||
}
|
||||
if withMetaInfo {
|
||||
pbPlayer.Name = last.Name
|
||||
@@ -126,28 +199,36 @@ func toJsPlayers(modelInstances map[int32]*Player) []*battle.PlayerDownsync {
|
||||
|
||||
for _, last := range modelInstances {
|
||||
toRet[last.JoinIndex-1] = &battle.PlayerDownsync{
|
||||
Id: last.Id,
|
||||
VirtualGridX: last.VirtualGridX,
|
||||
VirtualGridY: last.VirtualGridY,
|
||||
DirX: last.DirX,
|
||||
DirY: last.DirY,
|
||||
VelX: last.VelX,
|
||||
VelY: last.VelY,
|
||||
FramesToRecover: last.FramesToRecover,
|
||||
FramesInChState: last.FramesInChState,
|
||||
ActiveSkillId: last.ActiveSkillId,
|
||||
ActiveSkillHit: last.ActiveSkillHit,
|
||||
FramesInvinsible: last.FramesInvinsible,
|
||||
Speed: last.Speed,
|
||||
BattleState: last.BattleState,
|
||||
CharacterState: last.CharacterState,
|
||||
JoinIndex: last.JoinIndex,
|
||||
Hp: last.Hp,
|
||||
MaxHp: last.MaxHp,
|
||||
ColliderRadius: last.ColliderRadius,
|
||||
InAir: last.InAir,
|
||||
Score: last.Score,
|
||||
Removed: last.Removed,
|
||||
Id: last.Id,
|
||||
VirtualGridX: last.VirtualGridX,
|
||||
VirtualGridY: last.VirtualGridY,
|
||||
DirX: last.DirX,
|
||||
DirY: last.DirY,
|
||||
VelX: last.VelX,
|
||||
VelY: last.VelY,
|
||||
FramesToRecover: last.FramesToRecover,
|
||||
FramesInChState: last.FramesInChState,
|
||||
ActiveSkillId: last.ActiveSkillId,
|
||||
ActiveSkillHit: last.ActiveSkillHit,
|
||||
FramesInvinsible: last.FramesInvinsible,
|
||||
Speed: last.Speed,
|
||||
BattleState: last.BattleState,
|
||||
CharacterState: last.CharacterState,
|
||||
JoinIndex: last.JoinIndex,
|
||||
BulletTeamId: last.BulletTeamId,
|
||||
ChCollisionTeamId: last.ChCollisionTeamId,
|
||||
Hp: last.Hp,
|
||||
MaxHp: last.MaxHp,
|
||||
RevivalVirtualGridX: last.RevivalVirtualGridX,
|
||||
RevivalVirtualGridY: last.RevivalVirtualGridY,
|
||||
ColliderRadius: last.ColliderRadius,
|
||||
InAir: last.InAir,
|
||||
OnWall: last.OnWall,
|
||||
OnWallNormX: last.OnWallNormX,
|
||||
OnWallNormY: last.OnWallNormY,
|
||||
CapturedByInertia: last.CapturedByInertia,
|
||||
Score: last.Score,
|
||||
Removed: last.Removed,
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -8,6 +8,7 @@ import (
|
||||
sq "github.com/Masterminds/squirrel"
|
||||
"github.com/jmoiron/sqlx"
|
||||
"go.uber.org/zap"
|
||||
"net"
|
||||
)
|
||||
|
||||
type PlayerBattleState struct {
|
||||
@@ -46,10 +47,14 @@ type Player struct {
|
||||
TutorialStage int `db:"tutorial_stage"`
|
||||
|
||||
// other in-battle info fields
|
||||
LastReceivedInputFrameId int32
|
||||
LastSentInputFrameId int32
|
||||
AckingFrameId int32
|
||||
AckingInputFrameId int32
|
||||
LastConsecutiveRecvInputFrameId int32
|
||||
LastSentInputFrameId int32
|
||||
AckingFrameId int32
|
||||
AckingInputFrameId int32
|
||||
|
||||
UdpAddr *PeerUdpAddr
|
||||
BattleUdpTunnelAddr *net.UDPAddr // This addr is used by backend only, not visible to frontend
|
||||
BattleUdpTunnelAuthKey int32
|
||||
}
|
||||
|
||||
func ExistPlayerByName(name string) (bool, error) {
|
||||
@@ -72,13 +77,14 @@ func getPlayer(cond sq.Eq) (*Player, error) {
|
||||
return nil, err
|
||||
}
|
||||
rows, err := storage.MySQLManagerIns.Queryx(query, args...)
|
||||
if err != nil {
|
||||
if nil != err {
|
||||
return nil, err
|
||||
}
|
||||
cols, err := rows.Columns()
|
||||
if nil != err {
|
||||
panic(err)
|
||||
}
|
||||
cnt := 0
|
||||
for rows.Next() {
|
||||
// TODO: Do it more elegantly, but by now I don't have time to learn reflection of Golang
|
||||
vals := rowValues(rows, cols)
|
||||
@@ -100,9 +106,14 @@ func getPlayer(cond sq.Eq) (*Player, error) {
|
||||
}
|
||||
}
|
||||
Logger.Debug("Queried player from db", zap.Any("cond", cond), zap.Any("p", p), zap.Any("pd", pd), zap.Any("cols", cols), zap.Any("rowValues", vals))
|
||||
cnt++
|
||||
}
|
||||
if 0 < cnt {
|
||||
p.PlayerDownsync = pd
|
||||
return &p, nil
|
||||
} else {
|
||||
return nil, nil
|
||||
}
|
||||
p.PlayerDownsync = pd
|
||||
return &p, nil
|
||||
}
|
||||
|
||||
func (p *Player) Insert(tx *sqlx.Tx) error {
|
||||
|
@@ -13,6 +13,7 @@ import (
|
||||
"io/ioutil"
|
||||
"jsexport/battle"
|
||||
"math/rand"
|
||||
"net"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"resolv"
|
||||
@@ -27,10 +28,12 @@ const (
|
||||
UPSYNC_MSG_ACT_PLAYER_CMD = int32(2)
|
||||
UPSYNC_MSG_ACT_PLAYER_COLLIDER_ACK = int32(3)
|
||||
|
||||
DOWNSYNC_MSG_ACT_HB_REQ = int32(1)
|
||||
DOWNSYNC_MSG_ACT_INPUT_BATCH = int32(2)
|
||||
DOWNSYNC_MSG_ACT_BATTLE_STOPPED = int32(3)
|
||||
DOWNSYNC_MSG_ACT_FORCED_RESYNC = int32(4)
|
||||
DOWNSYNC_MSG_ACT_HB_REQ = int32(1)
|
||||
DOWNSYNC_MSG_ACT_INPUT_BATCH = int32(2)
|
||||
DOWNSYNC_MSG_ACT_BATTLE_STOPPED = int32(3)
|
||||
DOWNSYNC_MSG_ACT_FORCED_RESYNC = int32(4)
|
||||
DOWNSYNC_MSG_ACT_PEER_INPUT_BATCH = int32(5)
|
||||
DOWNSYNC_MSG_ACT_PEER_UDP_ADDR = int32(6)
|
||||
|
||||
DOWNSYNC_MSG_ACT_BATTLE_READY_TO_START = int32(-1)
|
||||
DOWNSYNC_MSG_ACT_BATTLE_START = int32(0)
|
||||
@@ -116,10 +119,15 @@ type Room struct {
|
||||
*
|
||||
* Moreover, during the invocation of `PlayerSignalToCloseDict`, the `Player` instance is supposed to be deallocated (though not synchronously).
|
||||
*/
|
||||
PlayerDownsyncSessionDict map[int32]*websocket.Conn
|
||||
PlayerDownsyncChanDict map[int32](chan pb.InputsBufferSnapshot)
|
||||
PlayerDownsyncSessionDict map[int32]*websocket.Conn
|
||||
PlayerSignalToCloseDict map[int32]SignalToCloseConnCbType
|
||||
PlayerDownsyncChanDict map[int32](chan pb.InputsBufferSnapshot)
|
||||
|
||||
PlayerSecondaryDownsyncSessionDict map[int32]*websocket.Conn
|
||||
PlayerSecondarySignalToCloseDict map[int32]SignalToCloseConnCbType
|
||||
PlayerSecondaryDownsyncChanDict map[int32](chan pb.InputsBufferSnapshot)
|
||||
|
||||
PlayerActiveWatchdogDict map[int32](*Watchdog)
|
||||
PlayerSignalToCloseDict map[int32]SignalToCloseConnCbType
|
||||
Score float32
|
||||
State int32
|
||||
Index int
|
||||
@@ -127,9 +135,9 @@ type Room struct {
|
||||
CurDynamicsRenderFrameId int32 // [WARNING] The dynamics of backend is ALWAYS MOVING FORWARD BY ALL-CONFIRMED INPUTFRAMES (either by upsync or forced), i.e. no rollback; Moreover when "true == BackendDynamicsEnabled" we always have "Room.CurDynamicsRenderFrameId >= Room.RenderFrameId" because each "all-confirmed inputFrame" is applied on "all applicable renderFrames" in one-go hence often sees a future "renderFrame" earlier
|
||||
EffectivePlayerCount int32
|
||||
DismissalWaitGroup sync.WaitGroup
|
||||
InputsBuffer *battle.RingBuffer // Indices are STRICTLY consecutive
|
||||
InputsBufferLock sync.Mutex // Guards [InputsBuffer, LatestPlayerUpsyncedInputFrameId, LastAllConfirmedInputFrameId, LastAllConfirmedInputList, LastAllConfirmedInputFrameIdWithChange]
|
||||
RenderFrameBuffer *battle.RingBuffer // Indices are STRICTLY consecutive
|
||||
InputsBuffer *resolv.RingBuffer // Indices are STRICTLY consecutive
|
||||
InputsBufferLock sync.Mutex // Guards [InputsBuffer, LatestPlayerUpsyncedInputFrameId, LastAllConfirmedInputFrameId, LastAllConfirmedInputList, LastAllConfirmedInputFrameIdWithChange, LastIndividuallyConfirmedInputFrameId, LastIndividuallyConfirmedInputList, player.LastConsecutiveRecvInputFrameId]
|
||||
RenderFrameBuffer *resolv.RingBuffer // Indices are STRICTLY consecutive
|
||||
LatestPlayerUpsyncedInputFrameId int32
|
||||
LastAllConfirmedInputFrameId int32
|
||||
LastAllConfirmedInputFrameIdWithChange int32
|
||||
@@ -148,31 +156,47 @@ type Room struct {
|
||||
TmxPointsMap StrToVec2DListMap
|
||||
TmxPolygonsMap StrToPolygon2DListMap
|
||||
|
||||
rdfIdToActuallyUsedInput map[int32]*pb.InputFrameDownsync
|
||||
rdfIdToActuallyUsedInput map[int32]*pb.InputFrameDownsync
|
||||
allowUpdateInputFrameInPlaceUponDynamics bool
|
||||
LastIndividuallyConfirmedInputFrameId []int32
|
||||
LastIndividuallyConfirmedInputList []uint64
|
||||
|
||||
BattleUdpTunnelLock sync.Mutex
|
||||
BattleUdpTunnelAddr *pb.PeerUdpAddr
|
||||
BattleUdpTunnel *net.UDPConn
|
||||
|
||||
collisionHolder *resolv.Collision
|
||||
effPushbacks []*battle.Vec2D
|
||||
hardPushbackNormsArr [][]*battle.Vec2D
|
||||
jumpedOrNotList []bool
|
||||
dynamicRectangleColliders []*resolv.Object
|
||||
}
|
||||
|
||||
func (pR *Room) updateScore() {
|
||||
pR.Score = calRoomScore(pR.EffectivePlayerCount, pR.Capacity, pR.State)
|
||||
}
|
||||
|
||||
func (pR *Room) AddPlayerIfPossible(pPlayerFromDbInit *Player, session *websocket.Conn, signalToCloseConnOfThisPlayer SignalToCloseConnCbType) bool {
|
||||
func (pR *Room) AddPlayerIfPossible(pPlayerFromDbInit *Player, speciesId int, session *websocket.Conn, signalToCloseConnOfThisPlayer SignalToCloseConnCbType) int {
|
||||
playerId := pPlayerFromDbInit.Id
|
||||
// TODO: Any thread-safety concern for accessing "pR" here?
|
||||
if RoomBattleStateIns.IDLE != pR.State && RoomBattleStateIns.WAITING != pR.State {
|
||||
Logger.Warn("AddPlayerIfPossible error, roomState:", zap.Any("playerId", playerId), zap.Any("roomId", pR.Id), zap.Any("roomState", pR.State), zap.Any("roomEffectivePlayerCount", pR.EffectivePlayerCount))
|
||||
return false
|
||||
return Constants.RetCode.PlayerNotAddableToRoom
|
||||
}
|
||||
if _, existent := pR.Players[playerId]; existent {
|
||||
Logger.Warn("AddPlayerIfPossible error, existing in the room.PlayersDict:", zap.Any("playerId", playerId), zap.Any("roomId", pR.Id), zap.Any("roomState", pR.State), zap.Any("roomEffectivePlayerCount", pR.EffectivePlayerCount))
|
||||
return false
|
||||
return Constants.RetCode.SamePlayerAlreadyInSameRoom
|
||||
}
|
||||
|
||||
defer pR.onPlayerAdded(playerId)
|
||||
defer pR.onPlayerAdded(playerId, speciesId)
|
||||
|
||||
pPlayerFromDbInit.UdpAddr = nil
|
||||
pPlayerFromDbInit.BattleUdpTunnelAddr = nil
|
||||
pPlayerFromDbInit.BattleUdpTunnelAuthKey = rand.Int31()
|
||||
pPlayerFromDbInit.AckingFrameId = -1
|
||||
pPlayerFromDbInit.AckingInputFrameId = -1
|
||||
pPlayerFromDbInit.LastSentInputFrameId = MAGIC_LAST_SENT_INPUT_FRAME_ID_NORMAL_ADDED
|
||||
pPlayerFromDbInit.LastReceivedInputFrameId = MAGIC_LAST_SENT_INPUT_FRAME_ID_NORMAL_ADDED
|
||||
pPlayerFromDbInit.LastConsecutiveRecvInputFrameId = MAGIC_LAST_SENT_INPUT_FRAME_ID_NORMAL_ADDED
|
||||
pPlayerFromDbInit.BattleState = PlayerBattleStateIns.ADDED_PENDING_BATTLE_COLLIDER_ACK
|
||||
|
||||
pPlayerFromDbInit.ColliderRadius = DEFAULT_PLAYER_RADIUS // Hardcoded
|
||||
@@ -183,23 +207,23 @@ func (pR *Room) AddPlayerIfPossible(pPlayerFromDbInit *Player, session *websocke
|
||||
pR.PlayerSignalToCloseDict[playerId] = signalToCloseConnOfThisPlayer
|
||||
newWatchdog := NewWatchdog(ConstVals.Ws.WillKickIfInactiveFor, func() {
|
||||
Logger.Warn("Conn inactive watchdog triggered#1:", zap.Any("playerId", playerId), zap.Any("roomId", pR.Id), zap.Any("roomState", pR.State), zap.Any("roomEffectivePlayerCount", pR.EffectivePlayerCount))
|
||||
signalToCloseConnOfThisPlayer(Constants.RetCode.ActiveWatchdog, "")
|
||||
pR.signalToCloseAllSessionsOfPlayer(playerId, Constants.RetCode.ActiveWatchdog)
|
||||
})
|
||||
newWatchdog.Stop()
|
||||
pR.PlayerActiveWatchdogDict[playerId] = newWatchdog
|
||||
return true
|
||||
return Constants.RetCode.Ok
|
||||
}
|
||||
|
||||
func (pR *Room) ReAddPlayerIfPossible(pTmpPlayerInstance *Player, session *websocket.Conn, signalToCloseConnOfThisPlayer SignalToCloseConnCbType) bool {
|
||||
func (pR *Room) ReAddPlayerIfPossible(pTmpPlayerInstance *Player, session *websocket.Conn, signalToCloseConnOfThisPlayer SignalToCloseConnCbType) int {
|
||||
playerId := pTmpPlayerInstance.Id
|
||||
// TODO: Any thread-safety concern for accessing "pR" and "pEffectiveInRoomPlayerInstance" here?
|
||||
if RoomBattleStateIns.PREPARE != pR.State && RoomBattleStateIns.WAITING != pR.State && RoomBattleStateIns.IN_BATTLE != pR.State && RoomBattleStateIns.IN_SETTLEMENT != pR.State && RoomBattleStateIns.IN_DISMISSAL != pR.State {
|
||||
Logger.Warn("ReAddPlayerIfPossible error due to roomState:", zap.Any("playerId", playerId), zap.Any("roomId", pR.Id), zap.Any("roomState", pR.State), zap.Any("roomEffectivePlayerCount", pR.EffectivePlayerCount))
|
||||
return false
|
||||
return Constants.RetCode.PlayerNotReaddableToRoom
|
||||
}
|
||||
if _, existent := pR.Players[playerId]; !existent {
|
||||
Logger.Warn("ReAddPlayerIfPossible error due to player nonexistent for room:", zap.Any("playerId", playerId), zap.Any("roomId", pR.Id), zap.Any("roomState", pR.State), zap.Any("roomEffectivePlayerCount", pR.EffectivePlayerCount))
|
||||
return false
|
||||
return Constants.RetCode.PlayerNotReaddableToRoom
|
||||
}
|
||||
/*
|
||||
* WARNING: The "pTmpPlayerInstance *Player" used here is a temporarily constructed
|
||||
@@ -208,9 +232,13 @@ func (pR *Room) ReAddPlayerIfPossible(pTmpPlayerInstance *Player, session *webso
|
||||
*/
|
||||
defer pR.onPlayerReAdded(playerId)
|
||||
pEffectiveInRoomPlayerInstance := pR.Players[playerId]
|
||||
pEffectiveInRoomPlayerInstance.UdpAddr = nil
|
||||
pEffectiveInRoomPlayerInstance.BattleUdpTunnelAddr = nil
|
||||
pEffectiveInRoomPlayerInstance.BattleUdpTunnelAuthKey = rand.Int31()
|
||||
pEffectiveInRoomPlayerInstance.AckingFrameId = -1
|
||||
pEffectiveInRoomPlayerInstance.AckingInputFrameId = -1
|
||||
pEffectiveInRoomPlayerInstance.LastSentInputFrameId = MAGIC_LAST_SENT_INPUT_FRAME_ID_READDED
|
||||
// [WARNING] DON'T reset "player.LastConsecutiveRecvInputFrameId" & "pR.LastIndividuallyConfirmedInputFrameId[...]" upon reconnection!
|
||||
pEffectiveInRoomPlayerInstance.BattleState = PlayerBattleStateIns.READDED_PENDING_BATTLE_COLLIDER_ACK
|
||||
|
||||
pEffectiveInRoomPlayerInstance.ColliderRadius = DEFAULT_PLAYER_RADIUS // Hardcoded
|
||||
@@ -220,11 +248,11 @@ func (pR *Room) ReAddPlayerIfPossible(pTmpPlayerInstance *Player, session *webso
|
||||
pR.PlayerSignalToCloseDict[playerId] = signalToCloseConnOfThisPlayer
|
||||
pR.PlayerActiveWatchdogDict[playerId] = NewWatchdog(ConstVals.Ws.WillKickIfInactiveFor, func() {
|
||||
Logger.Warn("Conn inactive watchdog triggered#2:", zap.Any("playerId", playerId), zap.Any("roomId", pR.Id), zap.Any("roomState", pR.State), zap.Any("roomEffectivePlayerCount", pR.EffectivePlayerCount))
|
||||
signalToCloseConnOfThisPlayer(Constants.RetCode.ActiveWatchdog, "")
|
||||
pR.signalToCloseAllSessionsOfPlayer(playerId, Constants.RetCode.ActiveWatchdog)
|
||||
}) // For ReAdded player the new watchdog starts immediately
|
||||
|
||||
Logger.Warn("ReAddPlayerIfPossible finished.", zap.Any("roomId", pR.Id), zap.Any("playerId", playerId), zap.Any("joinIndex", pEffectiveInRoomPlayerInstance.JoinIndex), zap.Any("playerBattleState", pEffectiveInRoomPlayerInstance.BattleState), zap.Any("roomState", pR.State), zap.Any("roomEffectivePlayerCount", pR.EffectivePlayerCount), zap.Any("AckingFrameId", pEffectiveInRoomPlayerInstance.AckingFrameId), zap.Any("AckingInputFrameId", pEffectiveInRoomPlayerInstance.AckingInputFrameId), zap.Any("LastSentInputFrameId", pEffectiveInRoomPlayerInstance.LastSentInputFrameId))
|
||||
return true
|
||||
return Constants.RetCode.Ok
|
||||
}
|
||||
|
||||
func (pR *Room) ChooseStage() error {
|
||||
@@ -308,8 +336,8 @@ func (pR *Room) InputsBufferString(allDetails bool) string {
|
||||
// Appending of the array of strings can be very SLOW due to on-demand heap allocation! Use this printing with caution.
|
||||
s := make([]string, 0)
|
||||
s = append(s, fmt.Sprintf("{renderFrameId: %v, stInputFrameId: %v, edInputFrameId: %v, lastAllConfirmedInputFrameIdWithChange: %v, lastAllConfirmedInputFrameId: %v}", pR.RenderFrameId, pR.InputsBuffer.StFrameId, pR.InputsBuffer.EdFrameId, pR.LastAllConfirmedInputFrameIdWithChange, pR.LastAllConfirmedInputFrameId))
|
||||
for playerId, player := range pR.PlayersArr {
|
||||
s = append(s, fmt.Sprintf("{playerId: %v, ackingFrameId: %v, ackingInputFrameId: %v, lastSentInputFrameId: %v}", playerId, player.AckingFrameId, player.AckingInputFrameId, player.LastSentInputFrameId))
|
||||
for _, player := range pR.PlayersArr {
|
||||
s = append(s, fmt.Sprintf("{playerId: %v, ackingFrameId: %v, ackingInputFrameId: %v, lastSentInputFrameId: %v}", player.Id, player.AckingFrameId, player.AckingInputFrameId, player.LastSentInputFrameId))
|
||||
}
|
||||
for i := pR.InputsBuffer.StFrameId; i < pR.InputsBuffer.EdFrameId; i++ {
|
||||
tmp := pR.InputsBuffer.GetByFrameId(i)
|
||||
@@ -334,7 +362,20 @@ func (pR *Room) playerDownsyncStr(player *battle.PlayerDownsync) string {
|
||||
if player.InAir {
|
||||
inAirInt = 1
|
||||
}
|
||||
s := fmt.Sprintf("{%d,%d,%d,%d,%d,%d,%d}", player.JoinIndex, player.VirtualGridX, player.VirtualGridY, player.VelX, player.VelY, player.FramesToRecover, inAirInt)
|
||||
onWallInt := 0
|
||||
if player.OnWall {
|
||||
onWallInt = 1
|
||||
}
|
||||
s := fmt.Sprintf("{%d,%d,%d,%d,%d,%d,%d,%d}", player.JoinIndex, player.VirtualGridX, player.VirtualGridY, player.VelX, player.VelY, player.FramesToRecover, inAirInt, onWallInt)
|
||||
|
||||
return s
|
||||
}
|
||||
|
||||
func (pR *Room) fireballDownsyncStr(fireball *battle.FireballBullet) string {
|
||||
if nil == fireball {
|
||||
return ""
|
||||
}
|
||||
s := fmt.Sprintf("{%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d}", fireball.BattleAttr.BulletLocalId, fireball.BattleAttr.OriginatedRenderFrameId, fireball.BattleAttr.OffenderJoinIndex, fireball.VirtualGridX, fireball.VirtualGridY, fireball.VelX, fireball.VelY, fireball.DirX, fireball.DirY, fireball.Bullet.HitboxSizeX, fireball.Bullet.HitboxSizeY)
|
||||
|
||||
return s
|
||||
}
|
||||
@@ -364,7 +405,14 @@ func (pR *Room) rdfIdToActuallyUsedInputString() string {
|
||||
for _, player := range rdf.PlayersArr {
|
||||
playersStrBldr = append(playersStrBldr, pR.playerDownsyncStr(player))
|
||||
}
|
||||
s = append(s, fmt.Sprintf("rdfId:%d\nplayers:[%v]\nactuallyUsedinputList:{%v}", rdfId, strings.Join(playersStrBldr, ","), pR.inputFrameDownsyncStr(pR.rdfIdToActuallyUsedInput[rdfId])))
|
||||
fireballsStrBldr := make([]string, 0, len(rdf.FireballBullets))
|
||||
for _, fireball := range rdf.FireballBullets {
|
||||
if 0 > fireball.BattleAttr.BulletLocalId {
|
||||
break
|
||||
}
|
||||
fireballsStrBldr = append(fireballsStrBldr, pR.fireballDownsyncStr(fireball))
|
||||
}
|
||||
s = append(s, fmt.Sprintf("rdfId:%d\nplayers:[%v]\nfireballs:[%v]\nactuallyUsedinputList:{%v}", rdfId, strings.Join(playersStrBldr, ","), strings.Join(fireballsStrBldr, ","), pR.inputFrameDownsyncStr(pR.rdfIdToActuallyUsedInput[rdfId])))
|
||||
}
|
||||
|
||||
return strings.Join(s, "\n")
|
||||
@@ -378,21 +426,14 @@ func (pR *Room) StartBattle() {
|
||||
|
||||
pR.RenderFrameId = 0
|
||||
|
||||
for _, player := range pR.Players {
|
||||
speciesId := int(player.JoinIndex - 1) // FIXME: Hardcoded the values for now
|
||||
chosenCh := battle.Characters[speciesId]
|
||||
pR.CharacterConfigsArr[player.JoinIndex-1] = chosenCh
|
||||
pR.SpeciesIdList[player.JoinIndex-1] = int32(speciesId)
|
||||
}
|
||||
Logger.Info("[StartBattle] ", zap.Any("roomId", pR.Id), zap.Any("roomState", pR.State), zap.Any("SpeciesIdList", pR.SpeciesIdList))
|
||||
|
||||
// Initialize the "collisionSys" as well as "RenderFrameBuffer"
|
||||
pR.CurDynamicsRenderFrameId = 0
|
||||
kickoffFrameJs := &battle.RoomDownsyncFrame{
|
||||
Id: pR.RenderFrameId,
|
||||
PlayersArr: toJsPlayers(pR.Players),
|
||||
CountdownNanos: pR.BattleDurationNanos,
|
||||
}
|
||||
kickoffFrameJs := battle.NewPreallocatedRoomDownsyncFrame(len(pR.Players), 64, 64)
|
||||
battle.CloneRoomDownsyncFrame(pR.RenderFrameId, toJsPlayers(pR.Players), 0, make([]*battle.MeleeBullet, 0), make([]*battle.FireballBullet, 0), kickoffFrameJs)
|
||||
kickoffFrameJs.CountdownNanos = pR.BattleDurationNanos
|
||||
|
||||
pR.RenderFrameBuffer.Put(kickoffFrameJs)
|
||||
|
||||
// Refresh "Colliders"
|
||||
@@ -446,7 +487,7 @@ func (pR *Room) StartBattle() {
|
||||
*/
|
||||
totalElapsedNanos := utils.UnixtimeNano() - battleStartedAt
|
||||
nextRenderFrameId := int32((totalElapsedNanos + pR.dilutedRollbackEstimatedDtNanos - 1) / pR.dilutedRollbackEstimatedDtNanos) // fast ceiling
|
||||
toSleepNanos := int64(0)
|
||||
toSleepNanos := int64(pR.dilutedRollbackEstimatedDtNanos >> 1) // Sleep half-frame time by default
|
||||
if nextRenderFrameId > pR.RenderFrameId {
|
||||
if 0 == pR.RenderFrameId {
|
||||
// It's important to send kickoff frame iff "0 == pR.RenderFrameId && nextRenderFrameId > pR.RenderFrameId", otherwise it might send duplicate kickoff frames
|
||||
@@ -461,7 +502,7 @@ func (pR *Room) StartBattle() {
|
||||
kickoffFrameJs := pR.RenderFrameBuffer.GetByFrameId(0).(*battle.RoomDownsyncFrame)
|
||||
pbKickOffRenderFrame := toPbRoomDownsyncFrame(kickoffFrameJs)
|
||||
pbKickOffRenderFrame.SpeciesIdList = pR.SpeciesIdList
|
||||
pR.sendSafely(pbKickOffRenderFrame, nil, DOWNSYNC_MSG_ACT_BATTLE_START, playerId, true)
|
||||
pR.sendSafely(pbKickOffRenderFrame, nil, DOWNSYNC_MSG_ACT_BATTLE_START, playerId, true, MAGIC_JOIN_INDEX_DEFAULT)
|
||||
}
|
||||
Logger.Info(fmt.Sprintf("In `battleMainLoop` for roomId=%v sent out kickoffFrame", pR.Id))
|
||||
}
|
||||
@@ -478,7 +519,7 @@ func (pR *Room) StartBattle() {
|
||||
pR.LastRenderFrameIdTriggeredAt = utils.UnixtimeNano()
|
||||
|
||||
elapsedInCalculation := (utils.UnixtimeNano() - stCalculation)
|
||||
toSleepNanos = pR.dilutedRollbackEstimatedDtNanos - elapsedInCalculation // don't sleep if "nextRenderFrame == pR.RenderFrameId"
|
||||
toSleepNanos = pR.dilutedRollbackEstimatedDtNanos - elapsedInCalculation
|
||||
if elapsedInCalculation > pR.RollbackEstimatedDtNanos {
|
||||
Logger.Warn(fmt.Sprintf("SLOW FRAME! Elapsed time statistics: roomId=%v, room.RenderFrameId=%v, elapsedInCalculation=%v ns, dynamicsDuration=%v ns, RollbackEstimatedDtNanos=%v, dilutedRollbackEstimatedDtNanos=%v", pR.Id, pR.RenderFrameId, elapsedInCalculation, dynamicsDuration, pR.RollbackEstimatedDtNanos, pR.dilutedRollbackEstimatedDtNanos))
|
||||
}
|
||||
@@ -488,7 +529,7 @@ func (pR *Room) StartBattle() {
|
||||
}
|
||||
}
|
||||
|
||||
downsyncLoop := func(playerId int32, player *Player, playerDownsyncChan chan pb.InputsBufferSnapshot) {
|
||||
downsyncLoop := func(playerId int32, player *Player, playerDownsyncChan chan pb.InputsBufferSnapshot, playerSecondaryDownsyncChan chan pb.InputsBufferSnapshot) {
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
Logger.Error("downsyncLoop, recovery spot#1, recovered from: ", zap.Any("roomId", pR.Id), zap.Any("playerId", playerId), zap.Any("panic", r))
|
||||
@@ -496,20 +537,24 @@ func (pR *Room) StartBattle() {
|
||||
Logger.Info(fmt.Sprintf("The `downsyncLoop` for (roomId=%v, playerId=%v) is stopped@renderFrameId=%v", pR.Id, playerId, pR.RenderFrameId))
|
||||
}()
|
||||
|
||||
Logger.Debug(fmt.Sprintf("Started downsyncLoop for (roomId: %d, playerId:%d, playerDownsyncChan:%p)", pR.Id, playerId, playerDownsyncChan))
|
||||
//Logger.Info(fmt.Sprintf("Started downsyncLoop for (roomId: %d, playerId:%d, playerDownsyncChan:%p)", pR.Id, playerId, playerDownsyncChan))
|
||||
|
||||
for {
|
||||
nowBattleState := atomic.LoadInt32(&pR.State)
|
||||
switch nowBattleState {
|
||||
case RoomBattleStateIns.IDLE, RoomBattleStateIns.STOPPING_BATTLE_FOR_SETTLEMENT, RoomBattleStateIns.IN_SETTLEMENT, RoomBattleStateIns.IN_DISMISSAL:
|
||||
Logger.Warn(fmt.Sprintf("Battle is not waiting/preparing/active for playerDownsyncChan for (roomId: %d, playerId:%d)", pR.Id, playerId))
|
||||
return
|
||||
}
|
||||
|
||||
select {
|
||||
// [WARNING] DON'T put a "default" block here! Otherwise "for { select {... default: } }" pattern would NEVER block on empty channel and thus consume a lot of CPU time unnecessarily!
|
||||
case inputsBufferSnapshot := <-playerDownsyncChan:
|
||||
nowBattleState := atomic.LoadInt32(&pR.State)
|
||||
switch nowBattleState {
|
||||
case RoomBattleStateIns.IDLE, RoomBattleStateIns.STOPPING_BATTLE_FOR_SETTLEMENT, RoomBattleStateIns.IN_SETTLEMENT, RoomBattleStateIns.IN_DISMISSAL:
|
||||
Logger.Warn(fmt.Sprintf("Battle is not waiting/preparing/active for playerDownsyncChan for (roomId: %d, playerId:%d)", pR.Id, playerId))
|
||||
return
|
||||
}
|
||||
pR.downsyncToSinglePlayer(playerId, player, inputsBufferSnapshot.RefRenderFrameId, inputsBufferSnapshot.UnconfirmedMask, inputsBufferSnapshot.ToSendInputFrameDownsyncs, inputsBufferSnapshot.ShouldForceResync)
|
||||
//Logger.Info(fmt.Sprintf("Sent inputsBufferSnapshot(refRenderFrameId:%d, unconfirmedMask:%v) to for (roomId: %d, playerId:%d)#2", inputsBufferSnapshot.RefRenderFrameId, inputsBufferSnapshot.UnconfirmedMask, pR.Id, playerId))
|
||||
default:
|
||||
case inputsBufferSnapshot2 := <-playerSecondaryDownsyncChan:
|
||||
pR.downsyncPeerInputFrameUpsyncToSinglePlayer(playerId, player, inputsBufferSnapshot2.ToSendInputFrameDownsyncs, inputsBufferSnapshot2.PeerJoinIndex)
|
||||
//Logger.Info(fmt.Sprintf("Sent secondary inputsBufferSnapshot to for (roomId: %d, playerId:%d)#2", pR.Id, playerId))
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -521,7 +566,8 @@ func (pR *Room) StartBattle() {
|
||||
Each "playerDownsyncChan" stays alive through out the lifecycle of room instead of each "playerDownsyncSession", i.e. not closed or dereferenced upon disconnection.
|
||||
*/
|
||||
pR.PlayerDownsyncChanDict[playerId] = make(chan pb.InputsBufferSnapshot, pR.InputsBuffer.N)
|
||||
go downsyncLoop(playerId, player, pR.PlayerDownsyncChanDict[playerId])
|
||||
pR.PlayerSecondaryDownsyncChanDict[playerId] = make(chan pb.InputsBufferSnapshot, pR.InputsBuffer.N)
|
||||
go downsyncLoop(playerId, player, pR.PlayerDownsyncChanDict[playerId], pR.PlayerSecondaryDownsyncChanDict[playerId])
|
||||
}
|
||||
|
||||
pR.onBattlePrepare(func() {
|
||||
@@ -530,7 +576,7 @@ func (pR *Room) StartBattle() {
|
||||
})
|
||||
}
|
||||
|
||||
func (pR *Room) OnBattleCmdReceived(pReq *pb.WsReq) {
|
||||
func (pR *Room) OnBattleCmdReceived(pReq *pb.WsReq, fromUDP bool) {
|
||||
/*
|
||||
[WARNING] This function "OnBattleCmdReceived" could be called by different ws sessions and thus from different threads!
|
||||
|
||||
@@ -575,10 +621,21 @@ func (pR *Room) OnBattleCmdReceived(pReq *pb.WsReq) {
|
||||
//Logger.Debug(fmt.Sprintf("OnBattleCmdReceived-InputsBufferLock unlocked: roomId=%v, fromPlayerId=%v", pR.Id, playerId))
|
||||
}()
|
||||
|
||||
inputsBufferSnapshot := pR.markConfirmationIfApplicable(inputFrameUpsyncBatch, playerId, player)
|
||||
inputsBufferSnapshot := pR.markConfirmationIfApplicable(inputFrameUpsyncBatch, playerId, player, fromUDP)
|
||||
if nil != inputsBufferSnapshot {
|
||||
pR.downsyncToAllPlayers(inputsBufferSnapshot)
|
||||
}
|
||||
} /*else {
|
||||
// FIXME: Enable this block after we can proactively detect whether there's any "secondary ws session player" in the battle to avoid waste of resource in creating the snapshot
|
||||
// no new all-confirmed
|
||||
toSendInputFrameDownsyncs := pR.cloneInputsBuffer(inputFrameUpsyncBatch[0].InputFrameId, inputFrameUpsyncBatch[len(inputFrameUpsyncBatch)-1].InputFrameId+1)
|
||||
|
||||
inputsBufferSnapshot = &pb.InputsBufferSnapshot{
|
||||
ToSendInputFrameDownsyncs: toSendInputFrameDownsyncs,
|
||||
PeerJoinIndex: player.JoinIndex,
|
||||
}
|
||||
//Logger.Info(fmt.Sprintf("OnBattleCmdReceived no new all-confirmed: roomId=%v, fromPlayerId=%v, forming peer broadcasting snapshot=%v", pR.Id, playerId, inputsBufferSnapshot))
|
||||
pR.broadcastPeerUpsyncForBetterPrediction(inputsBufferSnapshot)
|
||||
}*/
|
||||
}
|
||||
|
||||
func (pR *Room) onInputFrameDownsyncAllConfirmed(inputFrameDownsync *battle.InputFrameDownsync, playerId int32) {
|
||||
@@ -620,6 +677,10 @@ func (pR *Room) StopBattleForSettlement() {
|
||||
if RoomBattleStateIns.IN_BATTLE != pR.State {
|
||||
return
|
||||
}
|
||||
pR.BattleUdpTunnelLock.Lock()
|
||||
pR.BattleUdpTunnel.Close()
|
||||
pR.BattleUdpTunnelLock.Unlock()
|
||||
|
||||
pR.State = RoomBattleStateIns.STOPPING_BATTLE_FOR_SETTLEMENT
|
||||
Logger.Info("Stopping the `battleMainLoop` for:", zap.Any("roomId", pR.Id))
|
||||
pR.RenderFrameId++
|
||||
@@ -629,7 +690,7 @@ func (pR *Room) StopBattleForSettlement() {
|
||||
PlayersArr: toPbPlayers(pR.Players, false),
|
||||
CountdownNanos: -1, // TODO: Replace this magic constant!
|
||||
}
|
||||
pR.sendSafely(&assembledFrame, nil, DOWNSYNC_MSG_ACT_BATTLE_STOPPED, playerId, true)
|
||||
pR.sendSafely(&assembledFrame, nil, DOWNSYNC_MSG_ACT_BATTLE_STOPPED, playerId, true, MAGIC_JOIN_INDEX_DEFAULT)
|
||||
}
|
||||
// Note that `pR.onBattleStoppedForSettlement` will be called by `battleMainLoop`.
|
||||
}
|
||||
@@ -658,7 +719,7 @@ func (pR *Room) onBattlePrepare(cb BattleStartCbType) {
|
||||
|
||||
Logger.Info("Sending out frame for RoomBattleState.PREPARE:", zap.Any("battleReadyToStartFrame", battleReadyToStartFrame))
|
||||
for _, player := range pR.Players {
|
||||
pR.sendSafely(battleReadyToStartFrame, nil, DOWNSYNC_MSG_ACT_BATTLE_READY_TO_START, player.Id, true)
|
||||
pR.sendSafely(battleReadyToStartFrame, nil, DOWNSYNC_MSG_ACT_BATTLE_READY_TO_START, player.Id, true, MAGIC_JOIN_INDEX_DEFAULT)
|
||||
}
|
||||
|
||||
battlePreparationNanos := int64(6000000000)
|
||||
@@ -720,13 +781,14 @@ func (pR *Room) OnDismissed() {
|
||||
|
||||
// Always instantiates new HeapRAM blocks and let the old blocks die out due to not being retained by any root reference.
|
||||
pR.BulletBattleLocalIdCounter = 0
|
||||
pR.CollisionMinStep = 8 // the approx minimum distance a player can move per frame in world coordinate
|
||||
pR.CollisionMinStep = 16 // the approx minimum distance a player can move per frame in world coordinate
|
||||
pR.Players = make(map[int32]*Player)
|
||||
pR.PlayersArr = make([]*Player, pR.Capacity)
|
||||
pR.SpeciesIdList = make([]int32, pR.Capacity)
|
||||
pR.CharacterConfigsArr = make([]*battle.CharacterConfig, pR.Capacity)
|
||||
pR.CollisionSysMap = make(map[int32]*resolv.Object)
|
||||
pR.PlayerDownsyncSessionDict = make(map[int32]*websocket.Conn)
|
||||
pR.PlayerSecondaryDownsyncSessionDict = make(map[int32]*websocket.Conn)
|
||||
for _, oldWatchdog := range pR.PlayerActiveWatchdogDict {
|
||||
oldWatchdog.Stop()
|
||||
}
|
||||
@@ -735,12 +797,23 @@ func (pR *Room) OnDismissed() {
|
||||
close(oldChan)
|
||||
}
|
||||
pR.PlayerDownsyncChanDict = make(map[int32](chan pb.InputsBufferSnapshot))
|
||||
for _, oldChan := range pR.PlayerSecondaryDownsyncChanDict {
|
||||
close(oldChan)
|
||||
}
|
||||
pR.PlayerSecondaryDownsyncChanDict = make(map[int32](chan pb.InputsBufferSnapshot))
|
||||
pR.PlayerSignalToCloseDict = make(map[int32]SignalToCloseConnCbType)
|
||||
pR.PlayerSecondarySignalToCloseDict = make(map[int32]SignalToCloseConnCbType)
|
||||
pR.JoinIndexBooleanArr = make([]bool, pR.Capacity)
|
||||
pR.RenderCacheSize = 1024
|
||||
pR.RenderFrameBuffer = battle.NewRingBuffer(pR.RenderCacheSize)
|
||||
pR.InputsBuffer = battle.NewRingBuffer((pR.RenderCacheSize >> 1) + 1)
|
||||
pR.RenderFrameBuffer = resolv.NewRingBuffer(pR.RenderCacheSize)
|
||||
pR.InputsBuffer = resolv.NewRingBuffer((pR.RenderCacheSize >> 1) + 1)
|
||||
pR.rdfIdToActuallyUsedInput = make(map[int32]*pb.InputFrameDownsync)
|
||||
pR.allowUpdateInputFrameInPlaceUponDynamics = false
|
||||
pR.LastIndividuallyConfirmedInputFrameId = make([]int32, pR.Capacity)
|
||||
for i := 0; i < pR.Capacity; i++ {
|
||||
pR.LastIndividuallyConfirmedInputFrameId[i] = MAGIC_LAST_SENT_INPUT_FRAME_ID_NORMAL_ADDED
|
||||
}
|
||||
pR.LastIndividuallyConfirmedInputList = make([]uint64, pR.Capacity)
|
||||
|
||||
pR.LatestPlayerUpsyncedInputFrameId = -1
|
||||
pR.LastAllConfirmedInputFrameId = -1
|
||||
@@ -749,7 +822,25 @@ func (pR *Room) OnDismissed() {
|
||||
|
||||
pR.RenderFrameId = 0
|
||||
pR.CurDynamicsRenderFrameId = 0
|
||||
pR.NstDelayFrames = 16
|
||||
pR.NstDelayFrames = 24
|
||||
|
||||
pR.collisionHolder = resolv.NewCollision()
|
||||
pR.effPushbacks = make([]*battle.Vec2D, pR.Capacity)
|
||||
for i := 0; i < pR.Capacity; i++ {
|
||||
pR.effPushbacks[i] = &battle.Vec2D{X: 0, Y: 0}
|
||||
}
|
||||
pR.hardPushbackNormsArr = make([][]*battle.Vec2D, pR.Capacity)
|
||||
for i := 0; i < pR.Capacity; i++ {
|
||||
pR.hardPushbackNormsArr[i] = make([]*battle.Vec2D, 5)
|
||||
for j := 0; j < len(pR.hardPushbackNormsArr[i]); j++ {
|
||||
pR.hardPushbackNormsArr[i][j] = &battle.Vec2D{X: 0, Y: 0}
|
||||
}
|
||||
}
|
||||
pR.jumpedOrNotList = make([]bool, pR.Capacity)
|
||||
pR.dynamicRectangleColliders = make([]*resolv.Object, 64)
|
||||
for i := 0; i < len(pR.dynamicRectangleColliders); i++ {
|
||||
pR.dynamicRectangleColliders[i] = battle.GenerateRectCollider(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, nil, "")
|
||||
}
|
||||
|
||||
serverFps := 60
|
||||
pR.RollbackEstimatedDtMillis = 16.667 // Use fixed-and-low-precision to mitigate the inconsistent floating-point-number issue between Golang and JavaScript
|
||||
@@ -757,39 +848,50 @@ func (pR *Room) OnDismissed() {
|
||||
dilutedServerFps := float64(58.0) // Don't set this value too small, otherwise we might miss force confirmation needs for slow tickers!
|
||||
pR.dilutedRollbackEstimatedDtNanos = int64(float64(pR.RollbackEstimatedDtNanos) * float64(serverFps) / dilutedServerFps)
|
||||
pR.BattleDurationFrames = int32(60 * serverFps)
|
||||
//pR.BattleDurationFrames = int32(20 * serverFps)
|
||||
pR.BattleDurationNanos = int64(pR.BattleDurationFrames) * (pR.RollbackEstimatedDtNanos + 1)
|
||||
pR.InputFrameUpsyncDelayTolerance = battle.ConvertToNoDelayInputFrameId(pR.NstDelayFrames) - 1 // this value should be strictly smaller than (NstDelayFrames >> InputScaleFrames), otherwise "type#1 forceConfirmation" might become a lag avalanche
|
||||
pR.MaxChasingRenderFramesPerUpdate = 12 // Don't set this value too high to avoid exhausting frontend CPU within a single frame
|
||||
pR.MaxChasingRenderFramesPerUpdate = 9 // Don't set this value too high to avoid exhausting frontend CPU within a single frame, roughly as the "turn-around frames to recover" is empirically OK
|
||||
|
||||
pR.BackendDynamicsEnabled = true // [WARNING] When "false", recovery upon reconnection wouldn't work!
|
||||
pR.ForceAllResyncOnAnyActiveSlowTicker = true // See tradeoff discussion in "downsyncToAllPlayers"
|
||||
|
||||
pR.FrameDataLoggingEnabled = false // [WARNING] DON'T ENABLE ON LONG BATTLE DURATION! It consumes A LOT OF MEMORY!
|
||||
pR.BattleUdpTunnelLock.Lock()
|
||||
pR.BattleUdpTunnel = nil
|
||||
pR.BattleUdpTunnelAddr = nil
|
||||
pR.BattleUdpTunnelLock.Unlock()
|
||||
|
||||
pR.ChooseStage()
|
||||
pR.EffectivePlayerCount = 0
|
||||
|
||||
// [WARNING] It's deliberately ordered such that "pR.State = RoomBattleStateIns.IDLE" is put AFTER all the refreshing operations above.
|
||||
pR.State = RoomBattleStateIns.IDLE
|
||||
go pR.startBattleUdpTunnel() // Would reassign "pR.BattleUdpTunnel"
|
||||
pR.updateScore()
|
||||
|
||||
Logger.Info("The room is completely dismissed(all playerDownsyncChan closed):", zap.Any("roomId", pR.Id))
|
||||
}
|
||||
|
||||
func (pR *Room) expelPlayerDuringGame(playerId int32) {
|
||||
if signalToCloseConnOfThisPlayer, existent := pR.PlayerSignalToCloseDict[playerId]; existent {
|
||||
signalToCloseConnOfThisPlayer(Constants.RetCode.UnknownError, "") // TODO: Specify an error code
|
||||
}
|
||||
pR.signalToCloseAllSessionsOfPlayer(playerId, Constants.RetCode.UnknownError)
|
||||
pR.onPlayerExpelledDuringGame(playerId)
|
||||
}
|
||||
|
||||
func (pR *Room) expelPlayerForDismissal(playerId int32) {
|
||||
if signalToCloseConnOfThisPlayer, existent := pR.PlayerSignalToCloseDict[playerId]; existent {
|
||||
signalToCloseConnOfThisPlayer(Constants.RetCode.UnknownError, "") // TODO: Specify an error code
|
||||
}
|
||||
pR.signalToCloseAllSessionsOfPlayer(playerId, Constants.RetCode.UnknownError)
|
||||
pR.onPlayerExpelledForDismissal(playerId)
|
||||
}
|
||||
|
||||
func (pR *Room) signalToCloseAllSessionsOfPlayer(playerId int32, retCode int) {
|
||||
if signalToCloseConnOfThisPlayer, existent := pR.PlayerSignalToCloseDict[playerId]; existent {
|
||||
signalToCloseConnOfThisPlayer(retCode, "") // TODO: Specify an error code
|
||||
}
|
||||
if signalToCloseConnOfThisPlayer2, existent2 := pR.PlayerSecondarySignalToCloseDict[playerId]; existent2 {
|
||||
signalToCloseConnOfThisPlayer2(retCode, "") // TODO: Specify an error code
|
||||
}
|
||||
}
|
||||
|
||||
func (pR *Room) onPlayerExpelledDuringGame(playerId int32) {
|
||||
pR.onPlayerLost(playerId)
|
||||
}
|
||||
@@ -807,6 +909,10 @@ func (pR *Room) OnPlayerDisconnected(playerId int32) {
|
||||
}
|
||||
}()
|
||||
|
||||
if signalToCloseConnOfThisPlayer2, existent2 := pR.PlayerSecondarySignalToCloseDict[playerId]; existent2 {
|
||||
signalToCloseConnOfThisPlayer2(Constants.RetCode.UnknownError, "") // TODO: Specify an error code
|
||||
}
|
||||
|
||||
if player, existent := pR.Players[playerId]; existent {
|
||||
thatPlayerBattleState := atomic.LoadInt32(&(player.BattleState))
|
||||
switch thatPlayerBattleState {
|
||||
@@ -866,10 +972,12 @@ func (pR *Room) clearPlayerNetworkSession(playerId int32) {
|
||||
delete(pR.PlayerActiveWatchdogDict, playerId)
|
||||
delete(pR.PlayerDownsyncSessionDict, playerId)
|
||||
delete(pR.PlayerSignalToCloseDict, playerId)
|
||||
delete(pR.PlayerSecondaryDownsyncSessionDict, playerId)
|
||||
delete(pR.PlayerSecondarySignalToCloseDict, playerId)
|
||||
}
|
||||
}
|
||||
|
||||
func (pR *Room) onPlayerAdded(playerId int32) {
|
||||
func (pR *Room) onPlayerAdded(playerId int32, speciesId int) {
|
||||
pR.EffectivePlayerCount++
|
||||
|
||||
if 1 == pR.EffectivePlayerCount {
|
||||
@@ -881,8 +989,9 @@ func (pR *Room) onPlayerAdded(playerId int32) {
|
||||
pR.Players[playerId].JoinIndex = int32(index) + 1
|
||||
pR.JoinIndexBooleanArr[index] = true
|
||||
|
||||
speciesId := index // FIXME
|
||||
pR.SpeciesIdList[index] = int32(speciesId)
|
||||
chosenCh := battle.Characters[speciesId]
|
||||
pR.CharacterConfigsArr[index] = chosenCh
|
||||
pR.Players[playerId].Speed = chosenCh.Speed
|
||||
|
||||
// Lazily assign the initial position of "Player" for "RoomDownsyncFrame".
|
||||
@@ -895,7 +1004,10 @@ func (pR *Room) onPlayerAdded(playerId int32) {
|
||||
if nil == playerPos {
|
||||
panic(fmt.Sprintf("onPlayerAdded error, nil == playerPos, roomId=%v, playerId=%v, roomState=%v, roomEffectivePlayerCount=%v", pR.Id, playerId, pR.State, pR.EffectivePlayerCount))
|
||||
}
|
||||
pR.Players[playerId].VirtualGridX, pR.Players[playerId].VirtualGridY = battle.WorldToVirtualGridPos(playerPos.X, playerPos.Y)
|
||||
pR.Players[playerId].RevivalVirtualGridX, pR.Players[playerId].RevivalVirtualGridY = battle.WorldToVirtualGridPos(playerPos.X, playerPos.Y)
|
||||
pR.Players[playerId].VirtualGridX, pR.Players[playerId].VirtualGridY = pR.Players[playerId].RevivalVirtualGridX, pR.Players[playerId].RevivalVirtualGridY
|
||||
pR.Players[playerId].MaxHp = 100 // Hardcoded for now
|
||||
pR.Players[playerId].Hp = pR.Players[playerId].MaxHp
|
||||
// Hardcoded initial character orientation/facing
|
||||
if 0 == (pR.Players[playerId].JoinIndex % 2) {
|
||||
pR.Players[playerId].DirX = -2
|
||||
@@ -955,7 +1067,7 @@ func (pR *Room) OnPlayerBattleColliderAcked(playerId int32) bool {
|
||||
Logger.Debug(fmt.Sprintf("OnPlayerBattleColliderAcked-middle: roomId=%v, roomState=%v, targetPlayerId=%v, targetPlayerBattleState=%v, thatPlayerId=%v, thatPlayerBattleState=%v", pR.Id, pR.State, targetPlayer.Id, targetPlayer.BattleState, thatPlayer.Id, thatPlayerBattleState))
|
||||
if thatPlayerId == targetPlayer.Id || (PlayerBattleStateIns.ADDED_PENDING_BATTLE_COLLIDER_ACK == thatPlayerBattleState || PlayerBattleStateIns.ACTIVE == thatPlayerBattleState) {
|
||||
Logger.Debug(fmt.Sprintf("OnPlayerBattleColliderAcked-sending DOWNSYNC_MSG_ACT_PLAYER_ADDED_AND_ACKED: roomId=%v, roomState=%v, targetPlayerId=%v, targetPlayerBattleState=%v, capacity=%v, EffectivePlayerCount=%v", pR.Id, pR.State, targetPlayer.Id, targetPlayer.BattleState, pR.Capacity, pR.EffectivePlayerCount))
|
||||
pR.sendSafely(playerAckedFrame, nil, DOWNSYNC_MSG_ACT_PLAYER_ADDED_AND_ACKED, thatPlayer.Id, true)
|
||||
pR.sendSafely(playerAckedFrame, nil, DOWNSYNC_MSG_ACT_PLAYER_ADDED_AND_ACKED, thatPlayer.Id, true, MAGIC_JOIN_INDEX_DEFAULT)
|
||||
}
|
||||
}
|
||||
atomic.StoreInt32(&(targetPlayer.BattleState), PlayerBattleStateIns.ACTIVE)
|
||||
@@ -988,28 +1100,45 @@ func (pR *Room) OnPlayerBattleColliderAcked(playerId int32) bool {
|
||||
return true
|
||||
}
|
||||
|
||||
func (pR *Room) sendSafely(roomDownsyncFrame *pb.RoomDownsyncFrame, toSendInputFrameDownsyncs []*pb.InputFrameDownsync, act int32, playerId int32, needLockExplicitly bool) {
|
||||
func (pR *Room) sendSafely(roomDownsyncFrame *pb.RoomDownsyncFrame, toSendInputFrameDownsyncs []*pb.InputFrameDownsync, act int32, playerId int32, needLockExplicitly bool, peerJoinIndex int32) {
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
Logger.Error("sendSafely, recovered from: ", zap.Any("roomId", pR.Id), zap.Any("playerId", playerId), zap.Any("panic", r))
|
||||
}
|
||||
}()
|
||||
|
||||
if playerDownsyncSession, existent := pR.PlayerDownsyncSessionDict[playerId]; existent {
|
||||
pResp := &pb.WsResp{
|
||||
Ret: int32(Constants.RetCode.Ok),
|
||||
Act: act,
|
||||
Rdf: roomDownsyncFrame,
|
||||
InputFrameDownsyncBatch: toSendInputFrameDownsyncs,
|
||||
}
|
||||
pResp := &pb.WsResp{
|
||||
Ret: int32(Constants.RetCode.Ok),
|
||||
Act: act,
|
||||
Rdf: roomDownsyncFrame,
|
||||
InputFrameDownsyncBatch: toSendInputFrameDownsyncs,
|
||||
PeerJoinIndex: peerJoinIndex,
|
||||
}
|
||||
|
||||
theBytes, marshalErr := proto.Marshal(pResp)
|
||||
if nil != marshalErr {
|
||||
panic(fmt.Sprintf("Error marshaling downsync message: roomId=%v, playerId=%v, roomState=%v, roomEffectivePlayerCount=%v", pR.Id, playerId, pR.State, pR.EffectivePlayerCount))
|
||||
}
|
||||
theBytes, marshalErr := proto.Marshal(pResp)
|
||||
if nil != marshalErr {
|
||||
panic(fmt.Sprintf("Error marshaling downsync message: roomId=%v, playerId=%v, roomState=%v, roomEffectivePlayerCount=%v", pR.Id, playerId, pR.State, pR.EffectivePlayerCount))
|
||||
}
|
||||
|
||||
if err := playerDownsyncSession.WriteMessage(websocket.BinaryMessage, theBytes); nil != err {
|
||||
panic(fmt.Sprintf("Error sending downsync message: roomId=%v, playerId=%v, roomState=%v, roomEffectivePlayerCount=%v, err=%v", pR.Id, playerId, pR.State, pR.EffectivePlayerCount, err))
|
||||
shouldUseSecondaryWsSession := (MAGIC_JOIN_INDEX_DEFAULT != peerJoinIndex && DOWNSYNC_MSG_ACT_INPUT_BATCH == act) // FIXME: Simplify the condition
|
||||
//Logger.Info(fmt.Sprintf("shouldUseSecondaryWsSession=%v: roomId=%v, playerId=%v, roomState=%v, roomEffectivePlayerCount=%v", shouldUseSecondaryWsSession, pR.Id, playerId, pR.State, pR.EffectivePlayerCount))
|
||||
if !shouldUseSecondaryWsSession {
|
||||
if playerDownsyncSession, existent := pR.PlayerDownsyncSessionDict[playerId]; existent {
|
||||
if err := playerDownsyncSession.WriteMessage(websocket.BinaryMessage, theBytes); nil != err {
|
||||
panic(fmt.Sprintf("Error sending primary downsync message: roomId=%v, playerId=%v, roomState=%v, roomEffectivePlayerCount=%v, err=%v", pR.Id, playerId, pR.State, pR.EffectivePlayerCount, err))
|
||||
}
|
||||
}
|
||||
} else {
|
||||
/*
|
||||
[FIXME]
|
||||
This branch is preferred to use an additional session of each player for sending, and the session is preferrably UDP instead of any TCP-based protocol, but I'm being lazy here.
|
||||
|
||||
See `<proj-root>/ConcerningEdgeCases.md` for the advantage of using UDP as a supplement.
|
||||
*/
|
||||
if playerSecondaryDownsyncSession, existent := pR.PlayerSecondaryDownsyncSessionDict[playerId]; existent {
|
||||
if err := playerSecondaryDownsyncSession.WriteMessage(websocket.BinaryMessage, theBytes); nil != err {
|
||||
panic(fmt.Sprintf("Error sending secondary downsync message: roomId=%v, playerId=%v, roomState=%v, roomEffectivePlayerCount=%v, err=%v", pR.Id, playerId, pR.State, pR.EffectivePlayerCount, err))
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1017,12 +1146,7 @@ func (pR *Room) sendSafely(roomDownsyncFrame *pb.RoomDownsyncFrame, toSendInputF
|
||||
func (pR *Room) getOrPrefabInputFrameDownsync(inputFrameId int32) *battle.InputFrameDownsync {
|
||||
/*
|
||||
[WARNING] This function MUST BE called while "pR.InputsBufferLock" is locked.
|
||||
|
||||
Kindly note that on backend the prefab is much simpler than its frontend counterpart, because frontend will upsync its latest command immediately if there's any change w.r.t. its own prev cmd, thus if no upsync received from a frontend,
|
||||
- EITHER it's due to local lag and bad network,
|
||||
- OR there's no change w.r.t. to its prev cmd.
|
||||
*/
|
||||
|
||||
var currInputFrameDownsync *battle.InputFrameDownsync = nil
|
||||
tmp1 := pR.InputsBuffer.GetByFrameId(inputFrameId) // Would be nil if "pR.InputsBuffer.EdFrameId <= inputFrameId", else if "pR.InputsBuffer.EdFrameId > inputFrameId" is already met, then by now we can just return "tmp1.(*InputFrameDownsync)"
|
||||
if nil == tmp1 {
|
||||
@@ -1034,18 +1158,26 @@ func (pR *Room) getOrPrefabInputFrameDownsync(inputFrameId int32) *battle.InputF
|
||||
ConfirmedList: uint64(0),
|
||||
}
|
||||
|
||||
/*
|
||||
[WARNING] Don't reference "pR.InputsBuffer.GetByFrameId(j-1)" to prefab here!
|
||||
|
||||
Otherwise if an ActiveSlowTicker got a forced confirmation sequence like
|
||||
```
|
||||
inputFrame#42 {dx: -2} upsynced;
|
||||
inputFrame#43-50 {dx: +2} ignored by [type#1 forceConfirmation];
|
||||
inputFrame#51 {dx: +2} upsynced;
|
||||
inputFrame#52-60 {dx: +2} ignored by [type#1 forceConfirmation];
|
||||
inputFrame#61 {dx: +2} upsynced;
|
||||
|
||||
...there would be more [type#1 forceConfirmation]s for this ActiveSlowTicker if it doesn't catch up the upsync pace...
|
||||
```
|
||||
, the backend might've been prefabbing TOO QUICKLY and thus still replicating "inputFrame#42" by now for this ActiveSlowTicker, making its graphics inconsistent upon "[type#1 forceConfirmation] at inputFrame#52-60", i.e. as if always dragged to the left while having been controlled to the right for a few frames -- what's worse, the same graphical inconsistence could even impact later "[type#1 forceConfirmation]s" if this ActiveSlowTicker doesn't catch up with the upsync pace!
|
||||
*/
|
||||
|
||||
for i, _ := range currInputFrameDownsync.InputList {
|
||||
j2 := pR.PlayersArr[i].LastReceivedInputFrameId
|
||||
if j2 < pR.InputsBuffer.StFrameId {
|
||||
j2 = pR.InputsBuffer.StFrameId
|
||||
}
|
||||
tmp2 := pR.InputsBuffer.GetByFrameId(j2)
|
||||
if nil != tmp2 {
|
||||
prevInputFrameDownsync := tmp2.(*battle.InputFrameDownsync)
|
||||
currInputFrameDownsync.InputList[i] = prevInputFrameDownsync.InputList[i]
|
||||
}
|
||||
// [WARNING] The use of "InputsBufferLock" guarantees that by now "inputFrameId >= pR.InputsBuffer.EdFrameId >= pR.LatestPlayerUpsyncedInputFrameId", thus it's safe to use "pR.LastIndividuallyConfirmedInputList" for prediction.
|
||||
// Don't predict "btnA & btnB"!
|
||||
currInputFrameDownsync.InputList[i] = (currInputFrameDownsync.InputList[i] & uint64(15))
|
||||
currInputFrameDownsync.InputList[i] = (pR.LastIndividuallyConfirmedInputList[i] & uint64(15))
|
||||
}
|
||||
|
||||
pR.InputsBuffer.Put(currInputFrameDownsync)
|
||||
@@ -1057,7 +1189,7 @@ func (pR *Room) getOrPrefabInputFrameDownsync(inputFrameId int32) *battle.InputF
|
||||
return currInputFrameDownsync
|
||||
}
|
||||
|
||||
func (pR *Room) markConfirmationIfApplicable(inputFrameUpsyncBatch []*pb.InputFrameUpsync, playerId int32, player *Player) *pb.InputsBufferSnapshot {
|
||||
func (pR *Room) markConfirmationIfApplicable(inputFrameUpsyncBatch []*pb.InputFrameUpsync, playerId int32, player *Player, fromUDP bool) *pb.InputsBufferSnapshot {
|
||||
// [WARNING] This function MUST BE called while "pR.InputsBufferLock" is locked!
|
||||
// Step#1, put the received "inputFrameUpsyncBatch" into "pR.InputsBuffer"
|
||||
for _, inputFrameUpsync := range inputFrameUpsyncBatch {
|
||||
@@ -1067,8 +1199,9 @@ func (pR *Room) markConfirmationIfApplicable(inputFrameUpsyncBatch []*pb.InputFr
|
||||
Logger.Debug(fmt.Sprintf("Omitting obsolete inputFrameUpsync#1: roomId=%v, playerId=%v, clientInputFrameId=%v, InputsBuffer=%v", pR.Id, playerId, clientInputFrameId, pR.InputsBufferString(false)))
|
||||
continue
|
||||
}
|
||||
if clientInputFrameId < player.LastReceivedInputFrameId {
|
||||
Logger.Debug(fmt.Sprintf("Omitting obsolete inputFrameUpsync#2: roomId=%v, playerId=%v, clientInputFrameId=%v, playerLastReceivedInputFrameId=%v, InputsBuffer=%v", pR.Id, playerId, clientInputFrameId, player.LastReceivedInputFrameId, pR.InputsBufferString(false)))
|
||||
if clientInputFrameId < player.LastConsecutiveRecvInputFrameId {
|
||||
// [WARNING] It's important for correctness that we use "player.LastConsecutiveRecvInputFrameId" instead of "pR.LastIndividuallyConfirmedInputFrameId[player.JoinIndex-1]" here!
|
||||
Logger.Debug(fmt.Sprintf("Omitting obsolete inputFrameUpsync#2: roomId=%v, playerId=%v, clientInputFrameId=%v, playerLastConsecutiveRecvInputFrameId=%v, InputsBuffer=%v", pR.Id, playerId, clientInputFrameId, player.LastConsecutiveRecvInputFrameId, pR.InputsBufferString(false)))
|
||||
continue
|
||||
}
|
||||
if clientInputFrameId > pR.InputsBuffer.EdFrameId {
|
||||
@@ -1080,10 +1213,25 @@ func (pR *Room) markConfirmationIfApplicable(inputFrameUpsyncBatch []*pb.InputFr
|
||||
targetInputFrameDownsync.InputList[player.JoinIndex-1] = inputFrameUpsync.Encoded
|
||||
targetInputFrameDownsync.ConfirmedList |= uint64(1 << uint32(player.JoinIndex-1))
|
||||
|
||||
player.LastReceivedInputFrameId = clientInputFrameId
|
||||
if false == fromUDP {
|
||||
/*
|
||||
[WARNING] We have to distinguish whether or not the incoming batch is from UDP here, otherwise "pR.LatestPlayerUpsyncedInputFrameId - pR.LastAllConfirmedInputFrameId" might become unexpectedly large in case of "UDP packet loss + slow ws session"!
|
||||
|
||||
if clientInputFrameId > pR.LatestPlayerUpsyncedInputFrameId {
|
||||
pR.LatestPlayerUpsyncedInputFrameId = clientInputFrameId
|
||||
Moreover, only ws session upsyncs should advance "player.LastConsecutiveRecvInputFrameId" & "pR.LatestPlayerUpsyncedInputFrameId".
|
||||
|
||||
Kindly note that the updates of "player.LastConsecutiveRecvInputFrameId" could be discrete before and after reconnection.
|
||||
*/
|
||||
player.LastConsecutiveRecvInputFrameId = clientInputFrameId
|
||||
if clientInputFrameId > pR.LatestPlayerUpsyncedInputFrameId {
|
||||
pR.LatestPlayerUpsyncedInputFrameId = clientInputFrameId
|
||||
}
|
||||
}
|
||||
|
||||
if clientInputFrameId > pR.LastIndividuallyConfirmedInputFrameId[player.JoinIndex-1] {
|
||||
// No need to update "pR.LastIndividuallyConfirmedInputFrameId[player.JoinIndex-1]" only when "true == fromUDP", we should keep "pR.LastIndividuallyConfirmedInputFrameId[player.JoinIndex-1] >= player.LastConsecutiveRecvInputFrameId" at any moment.
|
||||
pR.LastIndividuallyConfirmedInputFrameId[player.JoinIndex-1] = clientInputFrameId
|
||||
// It's safe (in terms of getting an eventually correct "RenderFrameBuffer") to put the following update of "pR.LastIndividuallyConfirmedInputList" which is ONLY used for prediction in "InputsBuffer" out of "false == fromUDP" block.
|
||||
pR.LastIndividuallyConfirmedInputList[player.JoinIndex-1] = inputFrameUpsync.Encoded
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1150,6 +1298,7 @@ func (pR *Room) forceConfirmationIfApplicable(prevRenderFrameId int32) uint64 {
|
||||
totPlayerCnt := uint32(pR.Capacity)
|
||||
allConfirmedMask := uint64((1 << totPlayerCnt) - 1)
|
||||
unconfirmedMask := uint64(0)
|
||||
// As "pR.LastAllConfirmedInputFrameId" can be advanced by UDP but "pR.LatestPlayerUpsyncedInputFrameId" could only be advanced by ws session, when the following condition is met we know that the slow ticker is really in trouble!
|
||||
if pR.LatestPlayerUpsyncedInputFrameId > (pR.LastAllConfirmedInputFrameId + pR.InputFrameUpsyncDelayTolerance + 1) {
|
||||
// Type#1 check whether there's a significantly slow ticker among players
|
||||
oldLastAllConfirmedInputFrameId := pR.LastAllConfirmedInputFrameId
|
||||
@@ -1159,12 +1308,18 @@ func (pR *Room) forceConfirmationIfApplicable(prevRenderFrameId int32) uint64 {
|
||||
panic(fmt.Sprintf("inputFrameId=%v doesn't exist for roomId=%v! InputsBuffer=%v", j, pR.Id, pR.InputsBufferString(false)))
|
||||
}
|
||||
inputFrameDownsync := tmp.(*battle.InputFrameDownsync)
|
||||
/*
|
||||
// [WARN] Frame logging showed that using "battle.UpdateInputFrameInPlaceUponDynamics" here would CONTAMINATE "all-confirmed inputs already sent & recognized by the frontends", root cause remains to be invesitgated!
|
||||
if pR.allowUpdateInputFrameInPlaceUponDynamics {
|
||||
battle.UpdateInputFrameInPlaceUponDynamics(j, pR.Capacity, inputFrameDownsync.ConfirmedList, inputFrameDownsync.InputList, pR.LastIndividuallyConfirmedInputFrameId, pR.LastIndividuallyConfirmedInputList, int32(MAGIC_JOIN_INDEX_INVALID))
|
||||
}
|
||||
*/
|
||||
unconfirmedMask |= (allConfirmedMask ^ inputFrameDownsync.ConfirmedList)
|
||||
inputFrameDownsync.ConfirmedList = allConfirmedMask
|
||||
pR.onInputFrameDownsyncAllConfirmed(inputFrameDownsync, -1)
|
||||
}
|
||||
if 0 < unconfirmedMask {
|
||||
Logger.Info(fmt.Sprintf("[type#1 forceConfirmation] For roomId=%d@renderFrameId=%d, curDynamicsRenderFrameId=%d, LatestPlayerUpsyncedInputFrameId:%d, oldLastAllConfirmedInputFrameId:%d, newLastAllConfirmedInputFrameId:%d, InputFrameUpsyncDelayTolerance:%d, unconfirmedMask=%d; there's a slow ticker suspect, forcing all-confirmation", pR.Id, pR.RenderFrameId, pR.CurDynamicsRenderFrameId, pR.LatestPlayerUpsyncedInputFrameId, oldLastAllConfirmedInputFrameId, pR.LastAllConfirmedInputFrameId, pR.InputFrameUpsyncDelayTolerance, unconfirmedMask))
|
||||
Logger.Info(fmt.Sprintf("[type#1 forceConfirmation] For roomId=%d@renderFrameId=%d, curDynamicsRenderFrameId=%d, LatestPlayerUpsyncedInputFrameId:%d, LastAllConfirmedInputFrameId:%d -> %d, InputFrameUpsyncDelayTolerance:%d, unconfirmedMask=%d; there's a slow ticker suspect, forcing all-confirmation", pR.Id, pR.RenderFrameId, pR.CurDynamicsRenderFrameId, pR.LatestPlayerUpsyncedInputFrameId, oldLastAllConfirmedInputFrameId, pR.LastAllConfirmedInputFrameId, pR.InputFrameUpsyncDelayTolerance, unconfirmedMask))
|
||||
}
|
||||
} else {
|
||||
// Type#2 helps resolve the edge case when all players are disconnected temporarily
|
||||
@@ -1239,8 +1394,7 @@ func (pR *Room) applyInputFrameDownsyncDynamics(fromRenderFrameId int32, toRende
|
||||
}
|
||||
}
|
||||
|
||||
nextRenderFrame := battle.ApplyInputFrameDownsyncDynamicsOnSingleRenderFrame(pR.InputsBuffer, currRenderFrame, pR.Space, pR.CollisionSysMap, pR.SpaceOffsetX, pR.SpaceOffsetY, pR.CharacterConfigsArr)
|
||||
pR.RenderFrameBuffer.Put(nextRenderFrame)
|
||||
battle.ApplyInputFrameDownsyncDynamicsOnSingleRenderFrame(pR.InputsBuffer, currRenderFrame.Id, pR.Space, pR.CollisionSysMap, pR.SpaceOffsetX, pR.SpaceOffsetY, pR.CharacterConfigsArr, pR.RenderFrameBuffer, pR.collisionHolder, pR.effPushbacks, pR.hardPushbackNormsArr, pR.jumpedOrNotList, pR.dynamicRectangleColliders, pR.LastIndividuallyConfirmedInputFrameId, pR.LastIndividuallyConfirmedInputList, false, MAGIC_JOIN_INDEX_INVALID) // "allowUpdateInputFrameInPlaceUponDynamics" is instead used when "forceConfirmationIfApplicable"
|
||||
pR.CurDynamicsRenderFrameId++
|
||||
}
|
||||
}
|
||||
@@ -1271,13 +1425,13 @@ func (pR *Room) printBarrier(barrierCollider *resolv.Object) {
|
||||
}
|
||||
|
||||
func (pR *Room) doBattleMainLoopPerTickBackendDynamicsWithProperLocking(prevRenderFrameId int32, pDynamicsDuration *int64) {
|
||||
Logger.Debug(fmt.Sprintf("doBattleMainLoopPerTickBackendDynamicsWithProperLocking-InputsBufferLock to about lock: roomId=%v", pR.Id))
|
||||
//Logger.Debug(fmt.Sprintf("doBattleMainLoopPerTickBackendDynamicsWithProperLocking-InputsBufferLock to about lock: roomId=%v", pR.Id))
|
||||
pR.InputsBufferLock.Lock()
|
||||
Logger.Debug(fmt.Sprintf("doBattleMainLoopPerTickBackendDynamicsWithProperLocking-InputsBufferLock locked: roomId=%v", pR.Id))
|
||||
//Logger.Debug(fmt.Sprintf("doBattleMainLoopPerTickBackendDynamicsWithProperLocking-InputsBufferLock locked: roomId=%v", pR.Id))
|
||||
|
||||
defer func() {
|
||||
pR.InputsBufferLock.Unlock()
|
||||
Logger.Debug(fmt.Sprintf("doBattleMainLoopPerTickBackendDynamicsWithProperLocking-InputsBufferLock unlocked: roomId=%v", pR.Id))
|
||||
//Logger.Debug(fmt.Sprintf("doBattleMainLoopPerTickBackendDynamicsWithProperLocking-InputsBufferLock unlocked: roomId=%v", pR.Id))
|
||||
}()
|
||||
|
||||
if ok, thatRenderFrameId := battle.ShouldPrefabInputFrameDownsync(prevRenderFrameId, pR.RenderFrameId); ok {
|
||||
@@ -1316,11 +1470,35 @@ func (pR *Room) doBattleMainLoopPerTickBackendDynamicsWithProperLocking(prevRend
|
||||
snapshotStFrameId = refSnapshotStFrameId
|
||||
}
|
||||
inputsBufferSnapshot := pR.produceInputsBufferSnapshotWithCurDynamicsRenderFrameAsRef(unconfirmedMask, snapshotStFrameId, pR.LastAllConfirmedInputFrameId+1)
|
||||
Logger.Debug(fmt.Sprintf("[forceConfirmation] roomId=%v, room.RenderFrameId=%v, room.CurDynamicsRenderFrameId=%v, room.LastAllConfirmedInputFrameId=%v, unconfirmedMask=%v", pR.Id, pR.RenderFrameId, pR.CurDynamicsRenderFrameId, pR.LastAllConfirmedInputFrameId, unconfirmedMask))
|
||||
//Logger.Warn(fmt.Sprintf("[forceConfirmation] roomId=%v, room.RenderFrameId=%v, room.CurDynamicsRenderFrameId=%v, room.LastAllConfirmedInputFrameId=%v, unconfirmedMask=%v", pR.Id, pR.RenderFrameId, pR.CurDynamicsRenderFrameId, pR.LastAllConfirmedInputFrameId, unconfirmedMask))
|
||||
pR.downsyncToAllPlayers(inputsBufferSnapshot)
|
||||
}
|
||||
}
|
||||
|
||||
func (pR *Room) broadcastPeerUpsyncForBetterPrediction(inputsBufferSnapshot *pb.InputsBufferSnapshot) {
|
||||
// See `<proj-root>/ConcerningEdgeCases.md` for why this method exists.
|
||||
for _, player := range pR.PlayersArr {
|
||||
playerBattleState := atomic.LoadInt32(&(player.BattleState))
|
||||
switch playerBattleState {
|
||||
case PlayerBattleStateIns.DISCONNECTED, PlayerBattleStateIns.LOST, PlayerBattleStateIns.EXPELLED_DURING_GAME, PlayerBattleStateIns.EXPELLED_IN_DISMISSAL, PlayerBattleStateIns.ADDED_PENDING_BATTLE_COLLIDER_ACK, PlayerBattleStateIns.READDED_PENDING_BATTLE_COLLIDER_ACK:
|
||||
continue
|
||||
}
|
||||
if player.JoinIndex == inputsBufferSnapshot.PeerJoinIndex {
|
||||
continue
|
||||
}
|
||||
|
||||
if playerSecondaryDownsyncChan, existent := pR.PlayerSecondaryDownsyncChanDict[player.Id]; existent {
|
||||
/*
|
||||
[FIXME]
|
||||
This function is preferred to use an additional go-channel of each player for sending, see "downsyncLoop" & "Room.sendSafely" for more information!
|
||||
*/
|
||||
playerSecondaryDownsyncChan <- (*inputsBufferSnapshot)
|
||||
} else {
|
||||
Logger.Warn(fmt.Sprintf("playerDownsyncChan for (roomId: %d, playerId:%d) is gone", pR.Id, player.Id))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func (pR *Room) downsyncToAllPlayers(inputsBufferSnapshot *pb.InputsBufferSnapshot) {
|
||||
/*
|
||||
[WARNING] This function MUST BE called while "pR.InputsBufferLock" is LOCKED to **preserve the order of generation of "inputsBufferSnapshot" for sending** -- see comments in "OnBattleCmdReceived" and [this issue](https://github.com/genxium/DelayNoMore/issues/12).
|
||||
@@ -1397,14 +1575,14 @@ func (pR *Room) downsyncToSinglePlayer(playerId int32, player *Player, refRender
|
||||
We hereby assume that Golang runtime allocates & frees small amount of RAM quickly enough compared to either network I/O blocking in worst cases or the high frequency "per inputFrameDownsync*player" locking (though "OnBattleCmdReceived" locks at the same frequency but it's inevitable).
|
||||
*/
|
||||
|
||||
playerJoinIndex := player.JoinIndex - 1
|
||||
playerJoinIndexInBooleanArr := player.JoinIndex - 1
|
||||
playerBattleState := atomic.LoadInt32(&(player.BattleState))
|
||||
switch playerBattleState {
|
||||
case PlayerBattleStateIns.DISCONNECTED, PlayerBattleStateIns.LOST, PlayerBattleStateIns.EXPELLED_DURING_GAME, PlayerBattleStateIns.EXPELLED_IN_DISMISSAL, PlayerBattleStateIns.ADDED_PENDING_BATTLE_COLLIDER_ACK, PlayerBattleStateIns.READDED_PENDING_BATTLE_COLLIDER_ACK:
|
||||
return
|
||||
}
|
||||
|
||||
isSlowTicker := (0 < (unconfirmedMask & uint64(1<<uint32(playerJoinIndex))))
|
||||
isSlowTicker := (0 < (unconfirmedMask & uint64(1<<uint32(playerJoinIndexInBooleanArr))))
|
||||
shouldResync1 := (PlayerBattleStateIns.READDED_BATTLE_COLLIDER_ACKED == playerBattleState) // i.e. implies that "MAGIC_LAST_SENT_INPUT_FRAME_ID_READDED == player.LastSentInputFrameId"
|
||||
shouldResync2 := isSlowTicker // This condition is critical, if we don't send resync upon this condition, the "reconnected or slowly-clocking player" might never get its input synced
|
||||
shouldResync3 := shouldForceResync
|
||||
@@ -1429,13 +1607,14 @@ func (pR *Room) downsyncToSinglePlayer(playerId int32, player *Player, refRender
|
||||
refRenderFrame.BackendUnconfirmedMask = unconfirmedMask
|
||||
pbRefRenderFrame := toPbRoomDownsyncFrame(refRenderFrame)
|
||||
pbRefRenderFrame.SpeciesIdList = pR.SpeciesIdList
|
||||
pR.sendSafely(pbRefRenderFrame, toSendInputFrameDownsyncsSnapshot, DOWNSYNC_MSG_ACT_FORCED_RESYNC, playerId, false)
|
||||
//Logger.Warn(fmt.Sprintf("Sent refRenderFrameId=%v & inputFrameIds [%d, %d), for roomId=%v, playerId=%d, playerJoinIndex=%d, renderFrameId=%d, curDynamicsRenderFrameId=%d, playerLastSentInputFrameId=%d: InputsBuffer=%v", refRenderFrameId, toSendInputFrameIdSt, toSendInputFrameIdEd, pR.Id, playerId, player.JoinIndex, pR.RenderFrameId, pR.CurDynamicsRenderFrameId, player.LastSentInputFrameId, pR.InputsBufferString(false)))
|
||||
if shouldResync1 {
|
||||
Logger.Warn(fmt.Sprintf("Sent refRenderFrameId=%v & inputFrameIds [%d, %d), for roomId=%v, playerId=%d, playerJoinIndex=%d, renderFrameId=%d, curDynamicsRenderFrameId=%d, playerLastSentInputFrameId=%d: shouldResync1=%v, shouldResync2=%v, shouldResync3=%v, playerBattleState=%d", refRenderFrameId, toSendInputFrameIdSt, toSendInputFrameIdEd, pR.Id, playerId, player.JoinIndex, pR.RenderFrameId, pR.CurDynamicsRenderFrameId, player.LastSentInputFrameId, shouldResync1, shouldResync2, shouldResync3, playerBattleState))
|
||||
pR.sendSafely(pbRefRenderFrame, toSendInputFrameDownsyncsSnapshot, DOWNSYNC_MSG_ACT_FORCED_RESYNC, playerId, false, MAGIC_JOIN_INDEX_DEFAULT)
|
||||
if shouldResync1 || shouldResync3 {
|
||||
Logger.Info(fmt.Sprintf("Sent refRenderFrameId=%v & inputFrameIds [%d, %d), for roomId=%v, playerId=%d, playerJoinIndex=%d, renderFrameId=%d, curDynamicsRenderFrameId=%d, playerLastSentInputFrameId=%d: shouldResync1=%v, shouldResync2=%v, shouldResync3=%v, playerBattleState=%d", refRenderFrameId, toSendInputFrameIdSt, toSendInputFrameIdEd, pR.Id, playerId, player.JoinIndex, pR.RenderFrameId, pR.CurDynamicsRenderFrameId, player.LastSentInputFrameId, shouldResync1, shouldResync2, shouldResync3, playerBattleState))
|
||||
} else {
|
||||
Logger.Debug(fmt.Sprintf("Sent refRenderFrameId=%v & inputFrameIds [%d, %d), for roomId=%v, playerId=%d, playerJoinIndex=%d, renderFrameId=%d, curDynamicsRenderFrameId=%d, playerLastSentInputFrameId=%d: InputsBuffer=%v", refRenderFrameId, toSendInputFrameIdSt, toSendInputFrameIdEd, pR.Id, playerId, player.JoinIndex, pR.RenderFrameId, pR.CurDynamicsRenderFrameId, player.LastSentInputFrameId, pR.InputsBufferString(false)))
|
||||
}
|
||||
} else {
|
||||
pR.sendSafely(nil, toSendInputFrameDownsyncsSnapshot, DOWNSYNC_MSG_ACT_INPUT_BATCH, playerId, false)
|
||||
pR.sendSafely(nil, toSendInputFrameDownsyncsSnapshot, DOWNSYNC_MSG_ACT_INPUT_BATCH, playerId, false, MAGIC_JOIN_INDEX_DEFAULT)
|
||||
}
|
||||
player.LastSentInputFrameId = toSendInputFrameIdEd - 1
|
||||
if shouldResync1 {
|
||||
@@ -1443,6 +1622,16 @@ func (pR *Room) downsyncToSinglePlayer(playerId int32, player *Player, refRender
|
||||
}
|
||||
}
|
||||
|
||||
func (pR *Room) downsyncPeerInputFrameUpsyncToSinglePlayer(playerId int32, player *Player, toSendInputFrameDownsyncsSnapshot []*pb.InputFrameDownsync, peerJoinIndex int32) {
|
||||
playerBattleState := atomic.LoadInt32(&(player.BattleState))
|
||||
switch playerBattleState {
|
||||
case PlayerBattleStateIns.DISCONNECTED, PlayerBattleStateIns.LOST, PlayerBattleStateIns.EXPELLED_DURING_GAME, PlayerBattleStateIns.EXPELLED_IN_DISMISSAL, PlayerBattleStateIns.ADDED_PENDING_BATTLE_COLLIDER_ACK, PlayerBattleStateIns.READDED_PENDING_BATTLE_COLLIDER_ACK:
|
||||
return
|
||||
}
|
||||
|
||||
pR.sendSafely(nil, toSendInputFrameDownsyncsSnapshot, DOWNSYNC_MSG_ACT_PEER_INPUT_BATCH, playerId, false, peerJoinIndex)
|
||||
}
|
||||
|
||||
func (pR *Room) cloneInputsBuffer(stFrameId, edFrameId int32) []*pb.InputFrameDownsync {
|
||||
// [WARNING] This function MUST BE called while "pR.InputsBufferLock" is locked!
|
||||
cloned := make([]*pb.InputFrameDownsync, 0, edFrameId-stFrameId)
|
||||
@@ -1475,3 +1664,163 @@ func (pR *Room) cloneInputsBuffer(stFrameId, edFrameId int32) []*pb.InputFrameDo
|
||||
|
||||
return cloned
|
||||
}
|
||||
|
||||
func (pR *Room) SetSecondarySession(playerId int32, session *websocket.Conn, signalToCloseConnOfThisPlayer SignalToCloseConnCbType) {
|
||||
// TODO: Use a dedicated lock
|
||||
if player, ok := pR.Players[playerId]; ok {
|
||||
playerBattleState := atomic.LoadInt32(&(player.BattleState))
|
||||
switch playerBattleState {
|
||||
case PlayerBattleStateIns.DISCONNECTED, PlayerBattleStateIns.LOST, PlayerBattleStateIns.EXPELLED_DURING_GAME, PlayerBattleStateIns.EXPELLED_IN_DISMISSAL:
|
||||
// Kindly note that "PlayerBattleStateIns.ADDED_PENDING_BATTLE_COLLIDER_ACK, PlayerBattleStateIns.READDED_PENDING_BATTLE_COLLIDER_ACK" are allowed
|
||||
return
|
||||
}
|
||||
if _, existent := pR.PlayerDownsyncSessionDict[playerId]; existent {
|
||||
if _, existent2 := pR.PlayerSecondaryDownsyncSessionDict[playerId]; !existent2 {
|
||||
Logger.Info(fmt.Sprintf("SetSecondarySession for roomId=%v, playerId=%d, pR.Players=%v", pR.Id, playerId, pR.Players))
|
||||
pR.PlayerSecondaryDownsyncSessionDict[playerId] = session
|
||||
pR.PlayerSecondarySignalToCloseDict[playerId] = signalToCloseConnOfThisPlayer
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func (pR *Room) UpdatePeerUdpAddrList(playerId int32, peerAddr *net.UDPAddr, pReq *pb.HolePunchUpsync) {
|
||||
// TODO: There's a chance that by now "player.JoinIndex" is not yet determined, use a lock to sync
|
||||
if player, ok := pR.Players[playerId]; ok && MAGIC_JOIN_INDEX_DEFAULT != player.JoinIndex {
|
||||
playerBattleState := atomic.LoadInt32(&(player.BattleState))
|
||||
switch playerBattleState {
|
||||
case PlayerBattleStateIns.DISCONNECTED, PlayerBattleStateIns.LOST, PlayerBattleStateIns.EXPELLED_DURING_GAME, PlayerBattleStateIns.EXPELLED_IN_DISMISSAL:
|
||||
// Kindly note that "PlayerBattleStateIns.ADDED_PENDING_BATTLE_COLLIDER_ACK, PlayerBattleStateIns.READDED_PENDING_BATTLE_COLLIDER_ACK" are allowed
|
||||
return
|
||||
}
|
||||
if _, existent := pR.PlayerDownsyncSessionDict[playerId]; existent {
|
||||
player.UdpAddr = &pb.PeerUdpAddr{
|
||||
Ip: peerAddr.IP.String(),
|
||||
Port: int32(peerAddr.Port),
|
||||
AuthKey: pReq.AuthKey,
|
||||
}
|
||||
Logger.Info(fmt.Sprintf("UpdatePeerUdpAddrList done for roomId=%v, playerId=%d, peerAddr=%s", pR.Id, playerId, peerAddr))
|
||||
|
||||
peerJoinIndex := player.JoinIndex
|
||||
peerUdpAddrList := make([]*pb.PeerUdpAddr, pR.Capacity, pR.Capacity)
|
||||
|
||||
for _, otherPlayer := range pR.Players {
|
||||
if MAGIC_JOIN_INDEX_DEFAULT == otherPlayer.JoinIndex {
|
||||
// TODO: Again this shouldn't happen, apply proper locking
|
||||
continue
|
||||
}
|
||||
// In case of highly concurrent update that might occur while later marshalling, use the ptr of a copy
|
||||
peerUdpAddrList[otherPlayer.JoinIndex-1] = &pb.PeerUdpAddr{
|
||||
Ip: otherPlayer.UdpAddr.Ip,
|
||||
Port: otherPlayer.UdpAddr.Port,
|
||||
AuthKey: otherPlayer.UdpAddr.AuthKey,
|
||||
}
|
||||
}
|
||||
|
||||
// Broadcast this new UDP addr to all the existing players
|
||||
for otherPlayerId, otherPlayer := range pR.Players {
|
||||
otherPlayerBattleState := atomic.LoadInt32(&(otherPlayer.BattleState))
|
||||
switch otherPlayerBattleState {
|
||||
case PlayerBattleStateIns.DISCONNECTED, PlayerBattleStateIns.LOST, PlayerBattleStateIns.EXPELLED_DURING_GAME, PlayerBattleStateIns.EXPELLED_IN_DISMISSAL:
|
||||
continue
|
||||
}
|
||||
|
||||
Logger.Info(fmt.Sprintf("Downsyncing peerUdpAddrList for roomId=%v, playerId=%d", pR.Id, otherPlayerId))
|
||||
pR.sendSafely(&pb.RoomDownsyncFrame{
|
||||
PeerUdpAddrList: peerUdpAddrList,
|
||||
}, nil, DOWNSYNC_MSG_ACT_PEER_UDP_ADDR, otherPlayerId, false, peerJoinIndex)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func (pR *Room) startBattleUdpTunnel() {
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
Logger.Error("`BattleUdpTunnel` recovery spot#1, recovered from: ", zap.Any("roomId", pR.Id), zap.Any("panic", r))
|
||||
}
|
||||
Logger.Info(fmt.Sprintf("`BattleUdpTunnel` stopped for (roomId=%d)@renderFrameId=%v", pR.Id, pR.RenderFrameId))
|
||||
}()
|
||||
|
||||
pR.BattleUdpTunnelLock.Lock()
|
||||
conn, err := net.ListenUDP("udp", &net.UDPAddr{
|
||||
Port: 0,
|
||||
IP: net.ParseIP(Conf.Sio.UdpHost),
|
||||
})
|
||||
if nil != err {
|
||||
// No need to close the "conn" upon error here
|
||||
pR.BattleUdpTunnelLock.Unlock()
|
||||
panic(err)
|
||||
}
|
||||
pR.BattleUdpTunnel = conn
|
||||
switch v := conn.LocalAddr().(type) {
|
||||
case (*net.UDPAddr):
|
||||
pR.BattleUdpTunnelAddr = &pb.PeerUdpAddr{
|
||||
Ip: Conf.Sio.UdpHost,
|
||||
Port: int32(v.Port),
|
||||
AuthKey: 0, // To be determined for each specific player upon joining and sent to it by BattleColliderInfo
|
||||
}
|
||||
}
|
||||
|
||||
pR.BattleUdpTunnelLock.Unlock()
|
||||
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
Logger.Warn("`BattleUdpTunnel` recovery spot#2, recovered from: ", zap.Any("roomId", pR.Id), zap.Any("panic", r))
|
||||
}
|
||||
Logger.Info(fmt.Sprintf("`BattleUdpTunnel` closed for (roomId=%d)@renderFrameId=%v", pR.Id, pR.RenderFrameId))
|
||||
}()
|
||||
Logger.Info(fmt.Sprintf("`BattleUdpTunnel` started for roomId=%d at %s", pR.Id, conn.LocalAddr().String()))
|
||||
for {
|
||||
message := make([]byte, 128)
|
||||
rlen, remote, err := conn.ReadFromUDP(message[:]) // Would be unblocked when "conn.Close()" is called from another thread/goroutine, reference https://pkg.go.dev/net@go1.18.6#PacketConn
|
||||
if nil != err {
|
||||
// Should proceed to close the "conn" upon error here, if "conn" is already closed it'd just throw another error to be catched by "spot#2"
|
||||
conn.Close()
|
||||
panic(err)
|
||||
}
|
||||
pReq := new(pb.WsReq)
|
||||
bytes := message[0:rlen]
|
||||
if unmarshalErr := proto.Unmarshal(bytes, pReq); nil != unmarshalErr {
|
||||
Logger.Warn(fmt.Sprintf("`BattleUdpTunnel` for roomId=%d failed to unmarshal %d bytes", pR.Id, rlen), zap.Error(unmarshalErr))
|
||||
continue
|
||||
}
|
||||
playerId := pReq.PlayerId
|
||||
//Logger.Info(fmt.Sprintf("`BattleUdpTunnel` for roomId=%d received decoded WsReq:", pR.Id), zap.Any("pReq", pReq))
|
||||
if player, exists1 := pR.Players[playerId]; exists1 {
|
||||
authKey := pReq.AuthKey
|
||||
if authKey != player.BattleUdpTunnelAuthKey {
|
||||
Logger.Warn(fmt.Sprintf("`BattleUdpTunnel` for roomId=%d received %d bytes for playerId=%d from %s, but (incomingAuthKey:%d != playerBattleUdpTunnelAuthKey:%d)\n", pR.Id, rlen, playerId, remote, authKey, player.BattleUdpTunnelAuthKey))
|
||||
continue
|
||||
}
|
||||
if _, existent := pR.PlayerDownsyncSessionDict[playerId]; existent {
|
||||
player.BattleUdpTunnelAddr = remote
|
||||
//Logger.Info(fmt.Sprintf("`BattleUdpTunnel` for roomId=%d updated battleUdpAddr for playerId=%d to be %s\n", pR.Id, playerId, remote))
|
||||
|
||||
nowBattleState := atomic.LoadInt32(&pR.State)
|
||||
if RoomBattleStateIns.IN_BATTLE == nowBattleState {
|
||||
batch := pReq.InputFrameUpsyncBatch
|
||||
if nil != batch && 0 < len(batch) {
|
||||
peerJoinIndex := pReq.JoinIndex
|
||||
// Broadcast to every other player in the same room/battle
|
||||
for _, otherPlayer := range pR.PlayersArr {
|
||||
if otherPlayer.JoinIndex == peerJoinIndex {
|
||||
continue
|
||||
}
|
||||
_, wrerr := conn.WriteTo(bytes, otherPlayer.BattleUdpTunnelAddr)
|
||||
if nil != wrerr {
|
||||
//Logger.Debug(fmt.Sprintf("`BattleUdpTunnel` for roomId=%d failed to forward upsync from (playerId:%d, joinIndex:%d, addr:%s) to (otherPlayerId:%d, otherPlayerJoinIndex:%d, otherPlayerAddr:%s)\n", pR.Id, playerId, peerJoinIndex, remote, otherPlayer.Id, otherPlayer.JoinIndex, otherPlayer.BattleUdpTunnelAddr))
|
||||
}
|
||||
}
|
||||
pR.OnBattleCmdReceived(pReq, true) // To help advance "pR.LastAllConfirmedInputFrameId" asap, and even if "pR.LastAllConfirmedInputFrameId" is not advanced due to packet loss, these UDP packets would help prefill the "InputsBuffer" with correct player "future inputs (compared to ws session)" such that when "forceConfirmation" occurs we have as many correct predictions as possible
|
||||
}
|
||||
|
||||
}
|
||||
} else {
|
||||
Logger.Warn(fmt.Sprintf("`BattleUdpTunnel` for roomId=%d received validated %d bytes for playerId=%d from %s, but primary downsync session for it doesn't exist\n", pR.Id, rlen, playerId, remote))
|
||||
}
|
||||
} else {
|
||||
Logger.Warn(fmt.Sprintf("`BattleUdpTunnel` for roomId=%d received invalid %d bytes for playerId=%d from %s, but it doesn't belong to this room!\n", pR.Id, rlen, playerId, remote))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -10,6 +10,7 @@ import (
|
||||
"github.com/golang/protobuf/proto"
|
||||
"github.com/gorilla/websocket"
|
||||
"go.uber.org/zap"
|
||||
"net"
|
||||
"net/http"
|
||||
"strconv"
|
||||
"sync/atomic"
|
||||
@@ -46,9 +47,20 @@ func Serve(c *gin.Context) {
|
||||
c.AbortWithStatus(http.StatusBadRequest)
|
||||
return
|
||||
}
|
||||
|
||||
boundRoomId := 0
|
||||
expectedRoomId := 0
|
||||
speciesId := 0
|
||||
var err error
|
||||
if speciesIdStr, hasSpeciesId := c.GetQuery("speciesId"); hasSpeciesId {
|
||||
speciesId, err = strconv.Atoi(speciesIdStr)
|
||||
if err != nil {
|
||||
// TODO: Abort with specific message.
|
||||
c.AbortWithStatus(http.StatusBadRequest)
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
if boundRoomIdStr, hasBoundRoomId := c.GetQuery("boundRoomId"); hasBoundRoomId {
|
||||
boundRoomId, err = strconv.Atoi(boundRoomIdStr)
|
||||
if err != nil {
|
||||
@@ -176,34 +188,33 @@ func Serve(c *gin.Context) {
|
||||
}()
|
||||
Logger.Debug("Acquired RoomHeapMux for player:", zap.Any("playerId", playerId))
|
||||
// Logger.Info("The RoomHeapManagerIns has:", zap.Any("addr", fmt.Sprintf("%p", models.RoomHeapManagerIns)), zap.Any("size", len(*(models.RoomHeapManagerIns))))
|
||||
playerSuccessfullyAddedToRoom := false
|
||||
playerRoomRelation := Constants.RetCode.UnknownError
|
||||
if 0 < boundRoomId {
|
||||
if tmpPRoom, existent := (*models.RoomMapManagerIns)[int32(boundRoomId)]; existent {
|
||||
pRoom = tmpPRoom
|
||||
res := pRoom.ReAddPlayerIfPossible(pPlayer, conn, signalToCloseConnOfThisPlayer)
|
||||
if !res {
|
||||
playerRoomRelation = pRoom.ReAddPlayerIfPossible(pPlayer, conn, signalToCloseConnOfThisPlayer)
|
||||
if Constants.RetCode.Ok != playerRoomRelation {
|
||||
Logger.Warn("Failed to get:\n", zap.Any("roomId", pRoom.Id), zap.Any("playerId", playerId), zap.Any("forBoundRoomId", boundRoomId))
|
||||
} else {
|
||||
playerSuccessfullyAddedToRoom = true
|
||||
}
|
||||
}
|
||||
} else if 0 < expectedRoomId {
|
||||
if tmpRoom, existent := (*models.RoomMapManagerIns)[int32(expectedRoomId)]; existent {
|
||||
pRoom = tmpRoom
|
||||
|
||||
if pRoom.ReAddPlayerIfPossible(pPlayer, conn, signalToCloseConnOfThisPlayer) {
|
||||
playerSuccessfullyAddedToRoom = true
|
||||
} else if pRoom.AddPlayerIfPossible(pPlayer, conn, signalToCloseConnOfThisPlayer) {
|
||||
playerSuccessfullyAddedToRoom = true
|
||||
} else {
|
||||
Logger.Warn("Failed to get:\n", zap.Any("roomId", pRoom.Id), zap.Any("playerId", playerId), zap.Any("forExpectedRoomId", expectedRoomId))
|
||||
playerSuccessfullyAddedToRoom = false
|
||||
playerRoomRelation = pRoom.ReAddPlayerIfPossible(pPlayer, conn, signalToCloseConnOfThisPlayer)
|
||||
if Constants.RetCode.Ok != playerRoomRelation {
|
||||
playerRoomRelation = pRoom.AddPlayerIfPossible(pPlayer, speciesId, conn, signalToCloseConnOfThisPlayer)
|
||||
}
|
||||
if Constants.RetCode.Ok != playerRoomRelation {
|
||||
Logger.Warn("Failed to get:\n", zap.Any("roomId", pRoom.Id), zap.Any("playerId", playerId), zap.Any("forExpectedRoomId", expectedRoomId))
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
if false == playerSuccessfullyAddedToRoom {
|
||||
if Constants.RetCode.SamePlayerAlreadyInSameRoom == playerRoomRelation {
|
||||
signalToCloseConnOfThisPlayer(playerRoomRelation, fmt.Sprintf("playerId == %v is already in a room, this account is possibly stolen!", playerId))
|
||||
}
|
||||
|
||||
if Constants.RetCode.Ok != playerRoomRelation {
|
||||
defer func() {
|
||||
if pRoom != nil {
|
||||
heap.Push(models.RoomHeapManagerIns, pRoom)
|
||||
@@ -217,9 +228,9 @@ func Serve(c *gin.Context) {
|
||||
} else {
|
||||
pRoom = tmpRoom
|
||||
Logger.Info("Successfully popped:\n", zap.Any("roomId", pRoom.Id), zap.Any("forPlayerId", playerId))
|
||||
res := pRoom.AddPlayerIfPossible(pPlayer, conn, signalToCloseConnOfThisPlayer)
|
||||
if !res {
|
||||
signalToCloseConnOfThisPlayer(Constants.RetCode.PlayerNotAddableToRoom, fmt.Sprintf("AddPlayerIfPossible returns false for roomId == %v, playerId == %v!", pRoom.Id, playerId))
|
||||
playerRoomRelation = pRoom.AddPlayerIfPossible(pPlayer, speciesId, conn, signalToCloseConnOfThisPlayer)
|
||||
if Constants.RetCode.Ok != playerRoomRelation {
|
||||
signalToCloseConnOfThisPlayer(playerRoomRelation, fmt.Sprintf("AddPlayerIfPossible returns false for roomId == %v, playerId == %v!", pRoom.Id, playerId))
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -255,17 +266,25 @@ func Serve(c *gin.Context) {
|
||||
SpaceOffsetX: pRoom.SpaceOffsetX,
|
||||
SpaceOffsetY: pRoom.SpaceOffsetY,
|
||||
|
||||
RenderCacheSize: pRoom.RenderCacheSize,
|
||||
CollisionMinStep: pRoom.CollisionMinStep,
|
||||
RenderCacheSize: pRoom.RenderCacheSize,
|
||||
CollisionMinStep: pRoom.CollisionMinStep,
|
||||
BoundRoomCapacity: int32(pRoom.Capacity),
|
||||
|
||||
BattleUdpTunnel: &pb.PeerUdpAddr{
|
||||
Ip: pRoom.BattleUdpTunnelAddr.Ip,
|
||||
Port: pRoom.BattleUdpTunnelAddr.Port,
|
||||
AuthKey: pThePlayer.BattleUdpTunnelAuthKey,
|
||||
},
|
||||
|
||||
FrameDataLoggingEnabled: pRoom.FrameDataLoggingEnabled,
|
||||
}
|
||||
|
||||
resp := &pb.WsResp{
|
||||
Ret: int32(Constants.RetCode.Ok),
|
||||
EchoedMsgId: int32(0),
|
||||
Act: models.DOWNSYNC_MSG_ACT_HB_REQ,
|
||||
BciFrame: bciFrame,
|
||||
Ret: int32(Constants.RetCode.Ok),
|
||||
EchoedMsgId: int32(0),
|
||||
Act: models.DOWNSYNC_MSG_ACT_HB_REQ,
|
||||
BciFrame: bciFrame,
|
||||
PeerJoinIndex: pThePlayer.JoinIndex,
|
||||
}
|
||||
|
||||
Logger.Debug("Sending downsync HeartbeatRequirements:", zap.Any("roomId", pRoom.Id), zap.Any("playerId", playerId), zap.Any("resp", resp))
|
||||
@@ -378,7 +397,7 @@ func Serve(c *gin.Context) {
|
||||
startOrFeedHeartbeatWatchdog(conn)
|
||||
case models.UPSYNC_MSG_ACT_PLAYER_CMD:
|
||||
startOrFeedHeartbeatWatchdog(conn)
|
||||
pRoom.OnBattleCmdReceived(pReq)
|
||||
pRoom.OnBattleCmdReceived(pReq, false)
|
||||
case models.UPSYNC_MSG_ACT_PLAYER_COLLIDER_ACK:
|
||||
res := pRoom.OnPlayerBattleColliderAcked(int32(playerId))
|
||||
if false == res {
|
||||
@@ -395,3 +414,118 @@ func Serve(c *gin.Context) {
|
||||
startOrFeedHeartbeatWatchdog(conn)
|
||||
go receivingLoopAgainstPlayer()
|
||||
}
|
||||
|
||||
func HandleSecondaryWsSessionForPlayer(c *gin.Context) {
|
||||
token, ok := c.GetQuery("intAuthToken")
|
||||
if !ok {
|
||||
Logger.Warn("Secondary ws session req must have intAuthToken param!")
|
||||
c.AbortWithStatus(http.StatusBadRequest)
|
||||
return
|
||||
}
|
||||
|
||||
boundRoomId := 0
|
||||
var err error = nil
|
||||
if boundRoomIdStr, hasBoundRoomId := c.GetQuery("boundRoomId"); hasBoundRoomId {
|
||||
boundRoomId, err = strconv.Atoi(boundRoomIdStr)
|
||||
if err != nil {
|
||||
c.AbortWithStatus(http.StatusBadRequest)
|
||||
return
|
||||
}
|
||||
} else {
|
||||
Logger.Warn("Secondary ws session req must have boundRoomId param:", zap.Any("intAuthToken", token))
|
||||
c.AbortWithStatus(http.StatusBadRequest)
|
||||
return
|
||||
}
|
||||
|
||||
var pRoom *models.Room = nil
|
||||
// Deliberately querying playerId after querying room, because the former is against persistent storage and could be slow!
|
||||
if tmpPRoom, existent := (*models.RoomMapManagerIns)[int32(boundRoomId)]; !existent {
|
||||
Logger.Warn("Secondary ws session failed to get:\n", zap.Any("intAuthToken", token), zap.Any("forBoundRoomId", boundRoomId))
|
||||
c.AbortWithStatus(http.StatusBadRequest)
|
||||
} else {
|
||||
pRoom = tmpPRoom
|
||||
}
|
||||
|
||||
// TODO: Wrap the following 2 stmts by sql transaction!
|
||||
playerId, err := models.GetPlayerIdByToken(token)
|
||||
if err != nil || playerId == 0 {
|
||||
// TODO: Abort with specific message.
|
||||
Logger.Warn("Secondary ws session playerLogin record not found:", zap.Any("intAuthToken", token))
|
||||
c.AbortWithStatus(http.StatusBadRequest)
|
||||
return
|
||||
}
|
||||
|
||||
Logger.Info("Secondary ws session playerLogin record has been found:", zap.Any("playerId", playerId), zap.Any("intAuthToken", token), zap.Any("boundRoomId", boundRoomId))
|
||||
|
||||
conn, err := upgrader.Upgrade(c.Writer, c.Request, nil)
|
||||
if err != nil {
|
||||
Logger.Error("Secondary ws session upgrade:", zap.Error(err), zap.Any("playerId", playerId))
|
||||
c.AbortWithStatus(http.StatusBadRequest)
|
||||
return
|
||||
}
|
||||
|
||||
connHasBeenSignaledToClose := int32(0)
|
||||
pConnHasBeenSignaledToClose := &connHasBeenSignaledToClose
|
||||
|
||||
signalToCloseConnOfThisPlayer := func(customRetCode int, customRetMsg string) {
|
||||
if swapped := atomic.CompareAndSwapInt32(pConnHasBeenSignaledToClose, 0, 1); !swapped {
|
||||
return
|
||||
}
|
||||
Logger.Warn("Secondary ws session signalToCloseConnOfThisPlayer:", zap.Any("playerId", playerId), zap.Any("customRetCode", customRetCode), zap.Any("customRetMsg", customRetMsg))
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
Logger.Error("Secondary ws session recovered from: ", zap.Any("panic", r))
|
||||
}
|
||||
}()
|
||||
|
||||
closeMessage := websocket.FormatCloseMessage(customRetCode, customRetMsg)
|
||||
err := conn.WriteControl(websocket.CloseMessage, closeMessage, time.Now().Add(time.Millisecond*(ConstVals.Ws.WillKickIfInactiveFor)))
|
||||
if err != nil {
|
||||
Logger.Error("Secondary ws session unable to send the CloseFrame control message to player(client-side):", zap.Any("playerId", playerId), zap.Error(err))
|
||||
}
|
||||
|
||||
time.AfterFunc(3*time.Second, func() {
|
||||
// To actually terminates the underlying TCP connection which might be in `CLOSE_WAIT` state if inspected by `netstat`.
|
||||
conn.Close()
|
||||
})
|
||||
}
|
||||
|
||||
onReceivedCloseMessageFromClient := func(code int, text string) error {
|
||||
Logger.Warn("Secondary ws session triggered `onReceivedCloseMessageFromClient`:", zap.Any("code", code), zap.Any("playerId", playerId), zap.Any("message", text))
|
||||
signalToCloseConnOfThisPlayer(code, text)
|
||||
return nil
|
||||
}
|
||||
|
||||
conn.SetCloseHandler(onReceivedCloseMessageFromClient)
|
||||
|
||||
pRoom.SetSecondarySession(int32(playerId), conn, signalToCloseConnOfThisPlayer)
|
||||
}
|
||||
|
||||
func HandleUdpHolePunchingForPlayer(message []byte, peerAddr *net.UDPAddr) {
|
||||
pReq := new(pb.HolePunchUpsync)
|
||||
if unmarshalErr := proto.Unmarshal(message, pReq); nil != unmarshalErr {
|
||||
Logger.Error("`GrandUdpServer` failed to unmarshal", zap.Error(unmarshalErr))
|
||||
return
|
||||
}
|
||||
|
||||
token := pReq.IntAuthToken
|
||||
boundRoomId := pReq.BoundRoomId
|
||||
|
||||
pRoom, existent := (*models.RoomMapManagerIns)[int32(boundRoomId)]
|
||||
// Deliberately querying playerId after querying room, because the former is against persistent storage and could be slow!
|
||||
if !existent {
|
||||
Logger.Warn("`GrandUdpServer` failed to get:\n", zap.Any("intAuthToken", token), zap.Any("forBoundRoomId", boundRoomId))
|
||||
return
|
||||
}
|
||||
|
||||
// TODO: Wrap the following 2 stmts by sql transaction!
|
||||
playerId, err := models.GetPlayerIdByToken(token)
|
||||
if err != nil || playerId == 0 {
|
||||
// TODO: Abort with specific message.
|
||||
Logger.Warn("`GrandUdpServer` playerLogin record not found for:", zap.Any("intAuthToken", token))
|
||||
return
|
||||
}
|
||||
|
||||
Logger.Info("`GrandUdpServer` playerLogin record has been found:", zap.Any("playerId", playerId), zap.Any("intAuthToken", token), zap.Any("boundRoomId", boundRoomId), zap.Any("peerAddr", peerAddr))
|
||||
pRoom.UpdatePeerUdpAddrList(int32(playerId), peerAddr, pReq)
|
||||
}
|
||||
|
BIN
charts/Merged_cut_annotated_spedup.gif
Normal file
After Width: | Height: | Size: 7.4 MiB |
BIN
charts/NativeBuildReload.png
Normal file
After Width: | Height: | Size: 118 KiB |
BIN
charts/PackageNameIssueInCcc.png
Normal file
After Width: | Height: | Size: 135 KiB |
BIN
charts/Phone4g_battle_spedup.gif
Normal file
After Width: | Height: | Size: 4.4 MiB |
BIN
charts/ServerClients.jpg
Normal file
After Width: | Height: | Size: 79 KiB |
BIN
charts/UDPEssentials.jpg
Normal file
After Width: | Height: | Size: 472 KiB |
BIN
charts/VisualStudioSetup.png
Normal file
After Width: | Height: | Size: 191 KiB |
Before Width: | Height: | Size: 11 MiB |
BIN
charts/networkstats.png
Normal file
After Width: | Height: | Size: 2.2 MiB |
@@ -4,8 +4,10 @@ go 1.18
|
||||
|
||||
require (
|
||||
resolv v0.0.0
|
||||
jsexport v0.0.0
|
||||
)
|
||||
|
||||
replace (
|
||||
resolv => ../resolv_tailored
|
||||
jsexport => ../jsexport
|
||||
)
|
||||
|
@@ -12,8 +12,9 @@ func NormVec2D(dx, dy float64) Vec2D {
|
||||
}
|
||||
|
||||
func ConvexPolygonStr(body *resolv.ConvexPolygon) string {
|
||||
var s []string = make([]string, len(body.Points))
|
||||
for i, p := range body.Points {
|
||||
var s []string = make([]string, body.Points.Cnt)
|
||||
for i := int32(0); i < body.Points.Cnt; i++ {
|
||||
p := body.GetPointByOffset(i)
|
||||
s[i] = fmt.Sprintf("[%.2f, %.2f]", p[0]+body.X, p[1]+body.Y)
|
||||
}
|
||||
|
||||
|
@@ -1,66 +0,0 @@
|
||||
function NetworkDoctor(serverFps, clientUpsyncFps) {
|
||||
this.serverFps = serverFps;
|
||||
this.clientUpsyncFps = clientUpsyncFps;
|
||||
this.millisPerServerFrame = parseInt(1000 / this.serverFps);
|
||||
this._tooLongSinceLastFrameDiffReceivedThreshold = (this.millisPerServerFrame << 6);
|
||||
|
||||
this.setupFps = function(fps) {
|
||||
this.serverFps = this.clientUpsyncFps = fps;
|
||||
this.millisPerServerFrame = parseInt(1000 / this.serverFps);
|
||||
this._tooLongSinceLastFrameDiffReceivedThreshold = (this.millisPerServerFrame << 6);
|
||||
}
|
||||
|
||||
this._lastFrameDiffRecvTime = null;
|
||||
this._tooLongSinceLastFrameDiffReceived = function() {
|
||||
if (undefined === this._lastFrameDiffRecvTime || null === this._lastFrameDiffRecvTime) return false;
|
||||
return (this._tooLongSinceLastFrameDiffReceivedThreshold <= (Date.now() - this._lastFrameDiffRecvTime));
|
||||
};
|
||||
|
||||
this._consecutiveALittleLongFrameDiffReceivedIntervalCount = 0;
|
||||
this._consecutiveALittleLongFrameDiffReceivedIntervalCountThreshold = 120;
|
||||
|
||||
this.onNewFrameDiffReceived = function(frameDiff) {
|
||||
var now = Date.now();
|
||||
if (undefined !== this._lastFrameDiffRecvTime && null !== this._lastFrameDiffRecvTime) {
|
||||
var intervalFromLastFrameDiff = (now - this._lastFrameDiffRecvTime);
|
||||
if ((this.millisPerServerFrame << 5) < intervalFromLastFrameDiff) {
|
||||
++this._consecutiveALittleLongFrameDiffReceivedIntervalCount;
|
||||
console.log('Medium delay, intervalFromLastFrameDiff is', intervalFromLastFrameDiff);
|
||||
} else {
|
||||
this._consecutiveALittleLongFrameDiffReceivedIntervalCount = 0;
|
||||
}
|
||||
}
|
||||
this._lastFrameDiffRecvTime = now;
|
||||
};
|
||||
|
||||
this._networkComplaintPrefix = "\nNetwork is not good >_<\n";
|
||||
|
||||
this.generateNetworkComplaint = function(excludeTypeConstantALittleLongFrameDiffReceivedInterval, excludeTypeTooLongSinceLastFrameDiffReceived) {
|
||||
if (this.hasBattleStopped) return null;
|
||||
var shouldComplain = false;
|
||||
var ret = this._networkComplaintPrefix;
|
||||
if (true != excludeTypeConstantALittleLongFrameDiffReceivedInterval && this._consecutiveALittleLongFrameDiffReceivedIntervalCountThreshold <= this._consecutiveALittleLongFrameDiffReceivedIntervalCount) {
|
||||
this._consecutiveALittleLongFrameDiffReceivedIntervalCount = 0;
|
||||
ret += "\nConstantly having a little long recv interval.\n";
|
||||
shouldComplain = true;
|
||||
}
|
||||
if (true != excludeTypeTooLongSinceLastFrameDiffReceived && this._tooLongSinceLastFrameDiffReceived()) {
|
||||
ret += "\nToo long since last received frameDiff.\n";
|
||||
shouldComplain = true;
|
||||
}
|
||||
return (shouldComplain ? ret : null);
|
||||
};
|
||||
|
||||
this.hasBattleStopped = false;
|
||||
this.onBattleStopped = function() {
|
||||
this.hasBattleStopped = true;
|
||||
};
|
||||
|
||||
this.isClientSessionConnected = function() {
|
||||
if (!window.game) return false;
|
||||
if (!window.game.clientSession) return false;
|
||||
return window.game.clientSession.connected;
|
||||
};
|
||||
}
|
||||
|
||||
window.NetworkDoctor = NetworkDoctor;
|
@@ -198,3 +198,6 @@ window.getOrCreateAnimationClipForGid = function(gid, tiledMapInfo, tilesElListU
|
||||
animationClip: animClip,
|
||||
};
|
||||
};
|
||||
|
||||
// Node.js, this is a workaround to avoid accessing the non-existent "TextDecoder class" from "jsexport.js".
|
||||
window.fs = function() {};
|
||||
|
@@ -109,6 +109,7 @@ var constants = {
|
||||
"GET_SMS_CAPTCHA_RESP_ERROR_CODE": 2023,
|
||||
"SMS_CAPTCHA_REQUESTED_TOO_FREQUENTLY": 2024,
|
||||
"SMS_CAPTCHA_NOT_MATCH": 2025,
|
||||
"SAME_PLAYER_ALREADY_IN_SAME_ROOM": 2026,
|
||||
|
||||
"NOT_IMPLEMENTED_YET": 65535
|
||||
},
|
||||
|
7
frontend/assets/resources/animation/Explosion.meta
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"ver": "1.0.1",
|
||||
"uuid": "c7c2ac6e-f1ea-4233-b6a4-aa5b96b61e17",
|
||||
"isSubpackage": false,
|
||||
"subpackageName": "",
|
||||
"subMetas": {}
|
||||
}
|
@@ -0,0 +1,55 @@
|
||||
{
|
||||
"__type__": "cc.AnimationClip",
|
||||
"_name": "Fireball1Explosion",
|
||||
"_objFlags": 0,
|
||||
"_native": "",
|
||||
"_duration": 0.5,
|
||||
"sample": 60,
|
||||
"speed": 1,
|
||||
"wrapMode": 1,
|
||||
"curveData": {
|
||||
"comps": {
|
||||
"cc.Sprite": {
|
||||
"spriteFrame": [
|
||||
{
|
||||
"frame": 0,
|
||||
"value": {
|
||||
"__uuid__": "f4ad4f9f-4890-450b-9334-68fe6b903893"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.05,
|
||||
"value": {
|
||||
"__uuid__": "c6a5994f-251d-4191-a550-dfef979bab59"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.11666666666666667,
|
||||
"value": {
|
||||
"__uuid__": "417e58d9-e364-47f7-9364-f31ad3452adc"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.16666666666666666,
|
||||
"value": {
|
||||
"__uuid__": "8b566f26-b34d-4da6-bdaa-078358a5b685"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.31666666666666665,
|
||||
"value": {
|
||||
"__uuid__": "6ec5f75d-307e-4292-b667-cbbb5a52c2f6"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.48333333333333334,
|
||||
"value": {
|
||||
"__uuid__": "d89977f1-d927-4a08-9591-9feb1daf68c8"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"events": []
|
||||
}
|
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"ver": "2.1.0",
|
||||
"uuid": "7941215a-2b8c-4798-954b-4f1b16d5f6f5",
|
||||
"subMetas": {}
|
||||
}
|
@@ -0,0 +1,85 @@
|
||||
{
|
||||
"__type__": "cc.AnimationClip",
|
||||
"_name": "Fireball2Explosion",
|
||||
"_objFlags": 0,
|
||||
"_native": "",
|
||||
"_duration": 0.5,
|
||||
"sample": 60,
|
||||
"speed": 1,
|
||||
"wrapMode": 1,
|
||||
"curveData": {
|
||||
"comps": {
|
||||
"cc.Sprite": {
|
||||
"spriteFrame": [
|
||||
{
|
||||
"frame": 0,
|
||||
"value": {
|
||||
"__uuid__": "a1979f05-3ecc-4d70-9ea9-7822e35602c3"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.05,
|
||||
"value": {
|
||||
"__uuid__": "850884ca-2e6a-4d04-94d9-fd929ac33942"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.08333333333333333,
|
||||
"value": {
|
||||
"__uuid__": "88b9c254-1fd8-451f-902e-4a43a7ef5d51"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.13333333333333333,
|
||||
"value": {
|
||||
"__uuid__": "566342a3-cfde-44c9-afbe-7d9469653ccb"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.18333333333333332,
|
||||
"value": {
|
||||
"__uuid__": "d1620a98-de62-4069-8910-122f361d22a4"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.23333333333333334,
|
||||
"value": {
|
||||
"__uuid__": "2e9ed070-e592-4e77-8fa1-c5250deb006b"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.2833333333333333,
|
||||
"value": {
|
||||
"__uuid__": "a3e8357d-39da-42e8-b26b-f5ae7a68aed7"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.3333333333333333,
|
||||
"value": {
|
||||
"__uuid__": "3f3cb45c-732d-4bea-89b4-5495fb0d2c37"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.38333333333333336,
|
||||
"value": {
|
||||
"__uuid__": "d7aeb01a-4e04-4037-a2c4-ba72f45f69f3"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.43333333333333335,
|
||||
"value": {
|
||||
"__uuid__": "fe4a97a0-1207-4b81-a541-c2da0bf0a6f3"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.48333333333333334,
|
||||
"value": {
|
||||
"__uuid__": "97014ab9-8bdd-4b71-9f61-0639327f9159"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"events": []
|
||||
}
|
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"ver": "2.1.0",
|
||||
"uuid": "14b92f5c-af81-416a-a162-e5822d20fe68",
|
||||
"subMetas": {}
|
||||
}
|
@@ -0,0 +1,79 @@
|
||||
{
|
||||
"__type__": "cc.AnimationClip",
|
||||
"_name": "Fireball3Explosion",
|
||||
"_objFlags": 0,
|
||||
"_native": "",
|
||||
"_duration": 0.5,
|
||||
"sample": 60,
|
||||
"speed": 1,
|
||||
"wrapMode": 1,
|
||||
"curveData": {
|
||||
"comps": {
|
||||
"cc.Sprite": {
|
||||
"spriteFrame": [
|
||||
{
|
||||
"frame": 0,
|
||||
"value": {
|
||||
"__uuid__": "0e003318-f8c2-40f7-b144-140b5ca1e46a"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.06666666666666667,
|
||||
"value": {
|
||||
"__uuid__": "9c2b0cc2-9a52-4052-b796-cd6c6bd940d4"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.11666666666666667,
|
||||
"value": {
|
||||
"__uuid__": "76fe0c09-d2d6-432d-bacb-20d297eb4966"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.2,
|
||||
"value": {
|
||||
"__uuid__": "0735a7ff-0e50-472a-b0f9-8e2cc97be7e7"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.2833333333333333,
|
||||
"value": {
|
||||
"__uuid__": "993199a8-54a9-40d1-8d2f-12bf16af934c"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.35,
|
||||
"value": {
|
||||
"__uuid__": "5d8d9ffc-b4d6-4518-9946-953929ec055c"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.38333333333333336,
|
||||
"value": {
|
||||
"__uuid__": "6501ae08-b0ff-43ad-b5c5-cb6dc67f989d"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.4166666666666667,
|
||||
"value": {
|
||||
"__uuid__": "616cfa00-1dba-4a71-8141-36774933b6a9"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.45,
|
||||
"value": {
|
||||
"__uuid__": "4b296e86-2e96-4276-b6de-6a6b22530344"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.48333333333333334,
|
||||
"value": {
|
||||
"__uuid__": "f9cc8e37-c9c2-4f20-9d7e-4533c4e859fe"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"events": []
|
||||
}
|
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"ver": "2.1.0",
|
||||
"uuid": "0dbb90ed-a08a-448c-b06e-4831260e9213",
|
||||
"subMetas": {}
|
||||
}
|
@@ -0,0 +1,79 @@
|
||||
{
|
||||
"__type__": "cc.AnimationClip",
|
||||
"_name": "MeleeExplosion1",
|
||||
"_objFlags": 0,
|
||||
"_native": "",
|
||||
"_duration": 0.16666666666666666,
|
||||
"sample": 60,
|
||||
"speed": 1,
|
||||
"wrapMode": 1,
|
||||
"curveData": {
|
||||
"comps": {
|
||||
"cc.Sprite": {
|
||||
"spriteFrame": [
|
||||
{
|
||||
"frame": 0,
|
||||
"value": {
|
||||
"__uuid__": "ab4866e8-ce52-4bc1-be19-b03687acf0d6"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.016666666666666666,
|
||||
"value": {
|
||||
"__uuid__": "67cc8a51-0ebe-49db-a941-7aabc5655ecf"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.03333333333333333,
|
||||
"value": {
|
||||
"__uuid__": "367592d0-3566-4b6a-8707-01d6a8dbe34a"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.05,
|
||||
"value": {
|
||||
"__uuid__": "cc336b1e-b5d8-4a89-96fc-7ada0e232389"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.06666666666666667,
|
||||
"value": {
|
||||
"__uuid__": "a457cc63-08bd-4cfa-b84a-7287d0343ecf"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.08333333333333333,
|
||||
"value": {
|
||||
"__uuid__": "89697d35-cde3-4392-a231-db91d4ede29b"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.1,
|
||||
"value": {
|
||||
"__uuid__": "3815bf7a-0a48-40e0-b791-0a0be9ec0da6"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.11666666666666667,
|
||||
"value": {
|
||||
"__uuid__": "20e691ee-a0c0-4710-8981-8dee1911e819"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.13333333333333333,
|
||||
"value": {
|
||||
"__uuid__": "94e678c5-0780-4f2b-bf3b-86c6c0a75c23"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.15,
|
||||
"value": {
|
||||
"__uuid__": "af4f9c62-4c7e-43a4-b9b3-dd3effbbbafb"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"events": []
|
||||
}
|
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"ver": "2.1.0",
|
||||
"uuid": "954a2924-89df-4df4-93fc-36d2b22e7619",
|
||||
"subMetas": {}
|
||||
}
|
@@ -0,0 +1,79 @@
|
||||
{
|
||||
"__type__": "cc.AnimationClip",
|
||||
"_name": "MeleeExplosion2",
|
||||
"_objFlags": 0,
|
||||
"_native": "",
|
||||
"_duration": 0.26666666666666666,
|
||||
"sample": 60,
|
||||
"speed": 1,
|
||||
"wrapMode": 1,
|
||||
"curveData": {
|
||||
"comps": {
|
||||
"cc.Sprite": {
|
||||
"spriteFrame": [
|
||||
{
|
||||
"frame": 0,
|
||||
"value": {
|
||||
"__uuid__": "89e54317-7835-4d4c-9c04-579da8b33c54"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.016666666666666666,
|
||||
"value": {
|
||||
"__uuid__": "2a186e00-a0c5-4c8a-b0ab-c84d56dcee7c"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.05,
|
||||
"value": {
|
||||
"__uuid__": "083168e3-6ccc-4c5b-a800-2554bffc67d4"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.08333333333333333,
|
||||
"value": {
|
||||
"__uuid__": "d4b12ec9-6f04-493c-91e5-22b1a212262a"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.13333333333333333,
|
||||
"value": {
|
||||
"__uuid__": "13038788-b0f9-4714-960b-c98619a0d0ce"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.16666666666666666,
|
||||
"value": {
|
||||
"__uuid__": "94c21ed7-94a2-47a4-9537-fe5d9c51d7b0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.2,
|
||||
"value": {
|
||||
"__uuid__": "d5340298-923c-4bd7-9fd7-7a2e029a2b44"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.21666666666666667,
|
||||
"value": {
|
||||
"__uuid__": "c4b145c0-0145-4e09-8559-9ef508d95be8"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.23333333333333334,
|
||||
"value": {
|
||||
"__uuid__": "79398d4d-305e-4987-b199-d9d9649cf490"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.25,
|
||||
"value": {
|
||||
"__uuid__": "c032eb65-fdf3-41e6-b868-d95df34168df"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"events": []
|
||||
}
|
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"ver": "2.1.0",
|
||||
"uuid": "5bd304eb-c8ba-426f-a9ab-5698ac62de85",
|
||||
"subMetas": {}
|
||||
}
|
@@ -0,0 +1,79 @@
|
||||
{
|
||||
"__type__": "cc.AnimationClip",
|
||||
"_name": "MeleeExplosion3",
|
||||
"_objFlags": 0,
|
||||
"_native": "",
|
||||
"_duration": 0.26666666666666666,
|
||||
"sample": 60,
|
||||
"speed": 1,
|
||||
"wrapMode": 1,
|
||||
"curveData": {
|
||||
"comps": {
|
||||
"cc.Sprite": {
|
||||
"spriteFrame": [
|
||||
{
|
||||
"frame": 0,
|
||||
"value": {
|
||||
"__uuid__": "20d9ce6b-d9ab-4402-8c59-770ad0adf570"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.016666666666666666,
|
||||
"value": {
|
||||
"__uuid__": "0654601f-6788-4a2c-aed4-8dfbe1c5fdd0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.03333333333333333,
|
||||
"value": {
|
||||
"__uuid__": "0913e11a-c796-4b58-94cf-f70b3869deff"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.06666666666666667,
|
||||
"value": {
|
||||
"__uuid__": "d6b58622-2cc3-4ee6-a34f-1a18deb73700"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.08333333333333333,
|
||||
"value": {
|
||||
"__uuid__": "b83c6261-b86f-4323-ad11-7375cac02a2b"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.11666666666666667,
|
||||
"value": {
|
||||
"__uuid__": "b458c047-b7b5-4476-996e-d4c1ca85ef9c"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.15,
|
||||
"value": {
|
||||
"__uuid__": "3971256a-8120-448e-8adf-de8d67dedfd3"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.18333333333333332,
|
||||
"value": {
|
||||
"__uuid__": "0e548d92-36c8-4795-b3dc-2bc2cfcd7170"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.21666666666666667,
|
||||
"value": {
|
||||
"__uuid__": "25f94245-87b0-4954-abab-c817c80fed37"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.25,
|
||||
"value": {
|
||||
"__uuid__": "20d9ce6b-d9ab-4402-8c59-770ad0adf570"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"events": []
|
||||
}
|
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"ver": "2.1.0",
|
||||
"uuid": "5054633c-a588-4506-b4ac-eef29b1d8511",
|
||||
"subMetas": {}
|
||||
}
|
@@ -0,0 +1,476 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>frames</key>
|
||||
<dict>
|
||||
<key>Explosion1_1.png</key>
|
||||
<dict>
|
||||
<key>aliases</key>
|
||||
<array/>
|
||||
<key>spriteOffset</key>
|
||||
<string>{0,0}</string>
|
||||
<key>spriteSize</key>
|
||||
<string>{71,67}</string>
|
||||
<key>spriteSourceSize</key>
|
||||
<string>{71,67}</string>
|
||||
<key>textureRect</key>
|
||||
<string>{{0,506},{71,67}}</string>
|
||||
<key>textureRotated</key>
|
||||
<true/>
|
||||
</dict>
|
||||
<key>Explosion1_10.png</key>
|
||||
<dict>
|
||||
<key>aliases</key>
|
||||
<array/>
|
||||
<key>spriteOffset</key>
|
||||
<string>{0,0}</string>
|
||||
<key>spriteSize</key>
|
||||
<string>{71,67}</string>
|
||||
<key>spriteSourceSize</key>
|
||||
<string>{71,67}</string>
|
||||
<key>textureRect</key>
|
||||
<string>{{0,577},{71,67}}</string>
|
||||
<key>textureRotated</key>
|
||||
<true/>
|
||||
</dict>
|
||||
<key>Explosion1_2.png</key>
|
||||
<dict>
|
||||
<key>aliases</key>
|
||||
<array/>
|
||||
<key>spriteOffset</key>
|
||||
<string>{0,0}</string>
|
||||
<key>spriteSize</key>
|
||||
<string>{71,67}</string>
|
||||
<key>spriteSourceSize</key>
|
||||
<string>{71,67}</string>
|
||||
<key>textureRect</key>
|
||||
<string>{{67,506},{71,67}}</string>
|
||||
<key>textureRotated</key>
|
||||
<true/>
|
||||
</dict>
|
||||
<key>Explosion1_3.png</key>
|
||||
<dict>
|
||||
<key>aliases</key>
|
||||
<array/>
|
||||
<key>spriteOffset</key>
|
||||
<string>{0,0}</string>
|
||||
<key>spriteSize</key>
|
||||
<string>{71,67}</string>
|
||||
<key>spriteSourceSize</key>
|
||||
<string>{71,67}</string>
|
||||
<key>textureRect</key>
|
||||
<string>{{67,577},{71,67}}</string>
|
||||
<key>textureRotated</key>
|
||||
<true/>
|
||||
</dict>
|
||||
<key>Explosion1_4.png</key>
|
||||
<dict>
|
||||
<key>aliases</key>
|
||||
<array/>
|
||||
<key>spriteOffset</key>
|
||||
<string>{0,0}</string>
|
||||
<key>spriteSize</key>
|
||||
<string>{71,67}</string>
|
||||
<key>spriteSourceSize</key>
|
||||
<string>{71,67}</string>
|
||||
<key>textureRect</key>
|
||||
<string>{{134,506},{71,67}}</string>
|
||||
<key>textureRotated</key>
|
||||
<true/>
|
||||
</dict>
|
||||
<key>Explosion1_5.png</key>
|
||||
<dict>
|
||||
<key>aliases</key>
|
||||
<array/>
|
||||
<key>spriteOffset</key>
|
||||
<string>{0,0}</string>
|
||||
<key>spriteSize</key>
|
||||
<string>{71,67}</string>
|
||||
<key>spriteSourceSize</key>
|
||||
<string>{71,67}</string>
|
||||
<key>textureRect</key>
|
||||
<string>{{134,577},{71,67}}</string>
|
||||
<key>textureRotated</key>
|
||||
<true/>
|
||||
</dict>
|
||||
<key>Explosion1_6.png</key>
|
||||
<dict>
|
||||
<key>aliases</key>
|
||||
<array/>
|
||||
<key>spriteOffset</key>
|
||||
<string>{0,0}</string>
|
||||
<key>spriteSize</key>
|
||||
<string>{71,67}</string>
|
||||
<key>spriteSourceSize</key>
|
||||
<string>{71,67}</string>
|
||||
<key>textureRect</key>
|
||||
<string>{{355,503},{71,67}}</string>
|
||||
<key>textureRotated</key>
|
||||
<false/>
|
||||
</dict>
|
||||
<key>Explosion1_7.png</key>
|
||||
<dict>
|
||||
<key>aliases</key>
|
||||
<array/>
|
||||
<key>spriteOffset</key>
|
||||
<string>{0,0}</string>
|
||||
<key>spriteSize</key>
|
||||
<string>{71,67}</string>
|
||||
<key>spriteSourceSize</key>
|
||||
<string>{71,67}</string>
|
||||
<key>textureRect</key>
|
||||
<string>{{426,503},{71,67}}</string>
|
||||
<key>textureRotated</key>
|
||||
<false/>
|
||||
</dict>
|
||||
<key>Explosion1_8.png</key>
|
||||
<dict>
|
||||
<key>aliases</key>
|
||||
<array/>
|
||||
<key>spriteOffset</key>
|
||||
<string>{0,0}</string>
|
||||
<key>spriteSize</key>
|
||||
<string>{71,67}</string>
|
||||
<key>spriteSourceSize</key>
|
||||
<string>{71,67}</string>
|
||||
<key>textureRect</key>
|
||||
<string>{{355,570},{71,67}}</string>
|
||||
<key>textureRotated</key>
|
||||
<true/>
|
||||
</dict>
|
||||
<key>Explosion1_9.png</key>
|
||||
<dict>
|
||||
<key>aliases</key>
|
||||
<array/>
|
||||
<key>spriteOffset</key>
|
||||
<string>{0,0}</string>
|
||||
<key>spriteSize</key>
|
||||
<string>{71,67}</string>
|
||||
<key>spriteSourceSize</key>
|
||||
<string>{71,67}</string>
|
||||
<key>textureRect</key>
|
||||
<string>{{422,570},{71,67}}</string>
|
||||
<key>textureRotated</key>
|
||||
<false/>
|
||||
</dict>
|
||||
<key>Explosion2_1.png</key>
|
||||
<dict>
|
||||
<key>aliases</key>
|
||||
<array/>
|
||||
<key>spriteOffset</key>
|
||||
<string>{0,0}</string>
|
||||
<key>spriteSize</key>
|
||||
<string>{88,45}</string>
|
||||
<key>spriteSourceSize</key>
|
||||
<string>{88,45}</string>
|
||||
<key>textureRect</key>
|
||||
<string>{{462,0},{88,45}}</string>
|
||||
<key>textureRotated</key>
|
||||
<true/>
|
||||
</dict>
|
||||
<key>Explosion2_10.png</key>
|
||||
<dict>
|
||||
<key>aliases</key>
|
||||
<array/>
|
||||
<key>spriteOffset</key>
|
||||
<string>{0,0}</string>
|
||||
<key>spriteSize</key>
|
||||
<string>{88,45}</string>
|
||||
<key>spriteSourceSize</key>
|
||||
<string>{88,45}</string>
|
||||
<key>textureRect</key>
|
||||
<string>{{462,88},{88,45}}</string>
|
||||
<key>textureRotated</key>
|
||||
<true/>
|
||||
</dict>
|
||||
<key>Explosion2_2.png</key>
|
||||
<dict>
|
||||
<key>aliases</key>
|
||||
<array/>
|
||||
<key>spriteOffset</key>
|
||||
<string>{0,0}</string>
|
||||
<key>spriteSize</key>
|
||||
<string>{88,45}</string>
|
||||
<key>spriteSourceSize</key>
|
||||
<string>{88,45}</string>
|
||||
<key>textureRect</key>
|
||||
<string>{{462,176},{88,45}}</string>
|
||||
<key>textureRotated</key>
|
||||
<true/>
|
||||
</dict>
|
||||
<key>Explosion2_3.png</key>
|
||||
<dict>
|
||||
<key>aliases</key>
|
||||
<array/>
|
||||
<key>spriteOffset</key>
|
||||
<string>{0,0}</string>
|
||||
<key>spriteSize</key>
|
||||
<string>{88,45}</string>
|
||||
<key>spriteSourceSize</key>
|
||||
<string>{88,45}</string>
|
||||
<key>textureRect</key>
|
||||
<string>{{462,264},{88,45}}</string>
|
||||
<key>textureRotated</key>
|
||||
<true/>
|
||||
</dict>
|
||||
<key>Explosion2_4.png</key>
|
||||
<dict>
|
||||
<key>aliases</key>
|
||||
<array/>
|
||||
<key>spriteOffset</key>
|
||||
<string>{0,0}</string>
|
||||
<key>spriteSize</key>
|
||||
<string>{88,45}</string>
|
||||
<key>spriteSourceSize</key>
|
||||
<string>{88,45}</string>
|
||||
<key>textureRect</key>
|
||||
<string>{{0,304},{88,45}}</string>
|
||||
<key>textureRotated</key>
|
||||
<false/>
|
||||
</dict>
|
||||
<key>Explosion2_5.png</key>
|
||||
<dict>
|
||||
<key>aliases</key>
|
||||
<array/>
|
||||
<key>spriteOffset</key>
|
||||
<string>{0,0}</string>
|
||||
<key>spriteSize</key>
|
||||
<string>{88,45}</string>
|
||||
<key>spriteSourceSize</key>
|
||||
<string>{88,45}</string>
|
||||
<key>textureRect</key>
|
||||
<string>{{88,304},{88,45}}</string>
|
||||
<key>textureRotated</key>
|
||||
<false/>
|
||||
</dict>
|
||||
<key>Explosion2_6.png</key>
|
||||
<dict>
|
||||
<key>aliases</key>
|
||||
<array/>
|
||||
<key>spriteOffset</key>
|
||||
<string>{0,0}</string>
|
||||
<key>spriteSize</key>
|
||||
<string>{88,45}</string>
|
||||
<key>spriteSourceSize</key>
|
||||
<string>{88,45}</string>
|
||||
<key>textureRect</key>
|
||||
<string>{{176,304},{88,45}}</string>
|
||||
<key>textureRotated</key>
|
||||
<false/>
|
||||
</dict>
|
||||
<key>Explosion2_7.png</key>
|
||||
<dict>
|
||||
<key>aliases</key>
|
||||
<array/>
|
||||
<key>spriteOffset</key>
|
||||
<string>{0,0}</string>
|
||||
<key>spriteSize</key>
|
||||
<string>{88,45}</string>
|
||||
<key>spriteSourceSize</key>
|
||||
<string>{88,45}</string>
|
||||
<key>textureRect</key>
|
||||
<string>{{264,304},{88,45}}</string>
|
||||
<key>textureRotated</key>
|
||||
<false/>
|
||||
</dict>
|
||||
<key>Explosion2_8.png</key>
|
||||
<dict>
|
||||
<key>aliases</key>
|
||||
<array/>
|
||||
<key>spriteOffset</key>
|
||||
<string>{0,0}</string>
|
||||
<key>spriteSize</key>
|
||||
<string>{88,45}</string>
|
||||
<key>spriteSourceSize</key>
|
||||
<string>{88,45}</string>
|
||||
<key>textureRect</key>
|
||||
<string>{{352,304},{88,45}}</string>
|
||||
<key>textureRotated</key>
|
||||
<false/>
|
||||
</dict>
|
||||
<key>Explosion2_9.png</key>
|
||||
<dict>
|
||||
<key>aliases</key>
|
||||
<array/>
|
||||
<key>spriteOffset</key>
|
||||
<string>{0,0}</string>
|
||||
<key>spriteSize</key>
|
||||
<string>{88,45}</string>
|
||||
<key>spriteSourceSize</key>
|
||||
<string>{88,45}</string>
|
||||
<key>textureRect</key>
|
||||
<string>{{456,352},{88,45}}</string>
|
||||
<key>textureRotated</key>
|
||||
<true/>
|
||||
</dict>
|
||||
<key>Explosion3_1.png</key>
|
||||
<dict>
|
||||
<key>aliases</key>
|
||||
<array/>
|
||||
<key>spriteOffset</key>
|
||||
<string>{0,0}</string>
|
||||
<key>spriteSize</key>
|
||||
<string>{154,152}</string>
|
||||
<key>spriteSourceSize</key>
|
||||
<string>{154,152}</string>
|
||||
<key>textureRect</key>
|
||||
<string>{{0,0},{154,152}}</string>
|
||||
<key>textureRotated</key>
|
||||
<false/>
|
||||
</dict>
|
||||
<key>Explosion3_10.png</key>
|
||||
<dict>
|
||||
<key>aliases</key>
|
||||
<array/>
|
||||
<key>spriteOffset</key>
|
||||
<string>{0,0}</string>
|
||||
<key>spriteSize</key>
|
||||
<string>{154,152}</string>
|
||||
<key>spriteSourceSize</key>
|
||||
<string>{154,152}</string>
|
||||
<key>textureRect</key>
|
||||
<string>{{154,0},{154,152}}</string>
|
||||
<key>textureRotated</key>
|
||||
<false/>
|
||||
</dict>
|
||||
<key>Explosion3_2.png</key>
|
||||
<dict>
|
||||
<key>aliases</key>
|
||||
<array/>
|
||||
<key>spriteOffset</key>
|
||||
<string>{0,0}</string>
|
||||
<key>spriteSize</key>
|
||||
<string>{154,152}</string>
|
||||
<key>spriteSourceSize</key>
|
||||
<string>{154,152}</string>
|
||||
<key>textureRect</key>
|
||||
<string>{{308,0},{154,152}}</string>
|
||||
<key>textureRotated</key>
|
||||
<false/>
|
||||
</dict>
|
||||
<key>Explosion3_3.png</key>
|
||||
<dict>
|
||||
<key>aliases</key>
|
||||
<array/>
|
||||
<key>spriteOffset</key>
|
||||
<string>{0,0}</string>
|
||||
<key>spriteSize</key>
|
||||
<string>{154,152}</string>
|
||||
<key>spriteSourceSize</key>
|
||||
<string>{154,152}</string>
|
||||
<key>textureRect</key>
|
||||
<string>{{0,152},{154,152}}</string>
|
||||
<key>textureRotated</key>
|
||||
<false/>
|
||||
</dict>
|
||||
<key>Explosion3_4.png</key>
|
||||
<dict>
|
||||
<key>aliases</key>
|
||||
<array/>
|
||||
<key>spriteOffset</key>
|
||||
<string>{0,0}</string>
|
||||
<key>spriteSize</key>
|
||||
<string>{154,152}</string>
|
||||
<key>spriteSourceSize</key>
|
||||
<string>{154,152}</string>
|
||||
<key>textureRect</key>
|
||||
<string>{{154,152},{154,152}}</string>
|
||||
<key>textureRotated</key>
|
||||
<false/>
|
||||
</dict>
|
||||
<key>Explosion3_5.png</key>
|
||||
<dict>
|
||||
<key>aliases</key>
|
||||
<array/>
|
||||
<key>spriteOffset</key>
|
||||
<string>{0,0}</string>
|
||||
<key>spriteSize</key>
|
||||
<string>{154,152}</string>
|
||||
<key>spriteSourceSize</key>
|
||||
<string>{154,152}</string>
|
||||
<key>textureRect</key>
|
||||
<string>{{308,152},{154,152}}</string>
|
||||
<key>textureRotated</key>
|
||||
<false/>
|
||||
</dict>
|
||||
<key>Explosion3_6.png</key>
|
||||
<dict>
|
||||
<key>aliases</key>
|
||||
<array/>
|
||||
<key>spriteOffset</key>
|
||||
<string>{0,0}</string>
|
||||
<key>spriteSize</key>
|
||||
<string>{154,152}</string>
|
||||
<key>spriteSourceSize</key>
|
||||
<string>{154,152}</string>
|
||||
<key>textureRect</key>
|
||||
<string>{{0,352},{154,152}}</string>
|
||||
<key>textureRotated</key>
|
||||
<true/>
|
||||
</dict>
|
||||
<key>Explosion3_7.png</key>
|
||||
<dict>
|
||||
<key>aliases</key>
|
||||
<array/>
|
||||
<key>spriteOffset</key>
|
||||
<string>{0,0}</string>
|
||||
<key>spriteSize</key>
|
||||
<string>{154,152}</string>
|
||||
<key>spriteSourceSize</key>
|
||||
<string>{154,152}</string>
|
||||
<key>textureRect</key>
|
||||
<string>{{152,349},{154,152}}</string>
|
||||
<key>textureRotated</key>
|
||||
<true/>
|
||||
</dict>
|
||||
<key>Explosion3_8.png</key>
|
||||
<dict>
|
||||
<key>aliases</key>
|
||||
<array/>
|
||||
<key>spriteOffset</key>
|
||||
<string>{0,0}</string>
|
||||
<key>spriteSize</key>
|
||||
<string>{154,152}</string>
|
||||
<key>spriteSourceSize</key>
|
||||
<string>{154,152}</string>
|
||||
<key>textureRect</key>
|
||||
<string>{{201,503},{154,152}}</string>
|
||||
<key>textureRotated</key>
|
||||
<false/>
|
||||
</dict>
|
||||
<key>Explosion3_9.png</key>
|
||||
<dict>
|
||||
<key>aliases</key>
|
||||
<array/>
|
||||
<key>spriteOffset</key>
|
||||
<string>{0,0}</string>
|
||||
<key>spriteSize</key>
|
||||
<string>{154,152}</string>
|
||||
<key>spriteSourceSize</key>
|
||||
<string>{154,152}</string>
|
||||
<key>textureRect</key>
|
||||
<string>{{304,349},{154,152}}</string>
|
||||
<key>textureRotated</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>metadata</key>
|
||||
<dict>
|
||||
<key>format</key>
|
||||
<integer>3</integer>
|
||||
<key>pixelFormat</key>
|
||||
<string>RGBA8888</string>
|
||||
<key>premultiplyAlpha</key>
|
||||
<false/>
|
||||
<key>realTextureFileName</key>
|
||||
<string>MeleeExplosions.png</string>
|
||||
<key>size</key>
|
||||
<string>{507,655}</string>
|
||||
<key>smartupdate</key>
|
||||
<string>$TexturePacker:SmartUpdate:6c1498ee6f30bdad4abeb6a9f6af8367:4c81e1a1720f2ad3535ac93f1b42991f:d9b184ec81b83b14db5cf31d298727df$</string>
|
||||
<key>textureFileName</key>
|
||||
<string>MeleeExplosions.png</string>
|
||||
</dict>
|
||||
</dict>
|
||||
</plist>
|
@@ -0,0 +1,672 @@
|
||||
{
|
||||
"ver": "1.2.4",
|
||||
"uuid": "1c4c1dcb-54af-485b-9119-abd6d6d84526",
|
||||
"rawTextureUuid": "b11569aa-2e43-4084-a3e5-42eec243c4eb",
|
||||
"size": {
|
||||
"width": 507,
|
||||
"height": 655
|
||||
},
|
||||
"type": "Texture Packer",
|
||||
"subMetas": {
|
||||
"Explosion1_1.png": {
|
||||
"ver": "1.0.4",
|
||||
"uuid": "ab4866e8-ce52-4bc1-be19-b03687acf0d6",
|
||||
"rawTextureUuid": "b11569aa-2e43-4084-a3e5-42eec243c4eb",
|
||||
"trimType": "auto",
|
||||
"trimThreshold": 1,
|
||||
"rotated": true,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"trimX": 0,
|
||||
"trimY": 506,
|
||||
"width": 71,
|
||||
"height": 67,
|
||||
"rawWidth": 71,
|
||||
"rawHeight": 67,
|
||||
"borderTop": 0,
|
||||
"borderBottom": 0,
|
||||
"borderLeft": 0,
|
||||
"borderRight": 0,
|
||||
"spriteType": "normal",
|
||||
"subMetas": {}
|
||||
},
|
||||
"Explosion1_10.png": {
|
||||
"ver": "1.0.4",
|
||||
"uuid": "af4f9c62-4c7e-43a4-b9b3-dd3effbbbafb",
|
||||
"rawTextureUuid": "b11569aa-2e43-4084-a3e5-42eec243c4eb",
|
||||
"trimType": "auto",
|
||||
"trimThreshold": 1,
|
||||
"rotated": true,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"trimX": 0,
|
||||
"trimY": 577,
|
||||
"width": 71,
|
||||
"height": 67,
|
||||
"rawWidth": 71,
|
||||
"rawHeight": 67,
|
||||
"borderTop": 0,
|
||||
"borderBottom": 0,
|
||||
"borderLeft": 0,
|
||||
"borderRight": 0,
|
||||
"spriteType": "normal",
|
||||
"subMetas": {}
|
||||
},
|
||||
"Explosion1_2.png": {
|
||||
"ver": "1.0.4",
|
||||
"uuid": "67cc8a51-0ebe-49db-a941-7aabc5655ecf",
|
||||
"rawTextureUuid": "b11569aa-2e43-4084-a3e5-42eec243c4eb",
|
||||
"trimType": "auto",
|
||||
"trimThreshold": 1,
|
||||
"rotated": true,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"trimX": 67,
|
||||
"trimY": 506,
|
||||
"width": 71,
|
||||
"height": 67,
|
||||
"rawWidth": 71,
|
||||
"rawHeight": 67,
|
||||
"borderTop": 0,
|
||||
"borderBottom": 0,
|
||||
"borderLeft": 0,
|
||||
"borderRight": 0,
|
||||
"spriteType": "normal",
|
||||
"subMetas": {}
|
||||
},
|
||||
"Explosion1_3.png": {
|
||||
"ver": "1.0.4",
|
||||
"uuid": "367592d0-3566-4b6a-8707-01d6a8dbe34a",
|
||||
"rawTextureUuid": "b11569aa-2e43-4084-a3e5-42eec243c4eb",
|
||||
"trimType": "auto",
|
||||
"trimThreshold": 1,
|
||||
"rotated": true,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"trimX": 67,
|
||||
"trimY": 577,
|
||||
"width": 71,
|
||||
"height": 67,
|
||||
"rawWidth": 71,
|
||||
"rawHeight": 67,
|
||||
"borderTop": 0,
|
||||
"borderBottom": 0,
|
||||
"borderLeft": 0,
|
||||
"borderRight": 0,
|
||||
"spriteType": "normal",
|
||||
"subMetas": {}
|
||||
},
|
||||
"Explosion1_4.png": {
|
||||
"ver": "1.0.4",
|
||||
"uuid": "cc336b1e-b5d8-4a89-96fc-7ada0e232389",
|
||||
"rawTextureUuid": "b11569aa-2e43-4084-a3e5-42eec243c4eb",
|
||||
"trimType": "auto",
|
||||
"trimThreshold": 1,
|
||||
"rotated": true,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"trimX": 134,
|
||||
"trimY": 506,
|
||||
"width": 71,
|
||||
"height": 67,
|
||||
"rawWidth": 71,
|
||||
"rawHeight": 67,
|
||||
"borderTop": 0,
|
||||
"borderBottom": 0,
|
||||
"borderLeft": 0,
|
||||
"borderRight": 0,
|
||||
"spriteType": "normal",
|
||||
"subMetas": {}
|
||||
},
|
||||
"Explosion1_5.png": {
|
||||
"ver": "1.0.4",
|
||||
"uuid": "a457cc63-08bd-4cfa-b84a-7287d0343ecf",
|
||||
"rawTextureUuid": "b11569aa-2e43-4084-a3e5-42eec243c4eb",
|
||||
"trimType": "auto",
|
||||
"trimThreshold": 1,
|
||||
"rotated": true,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"trimX": 134,
|
||||
"trimY": 577,
|
||||
"width": 71,
|
||||
"height": 67,
|
||||
"rawWidth": 71,
|
||||
"rawHeight": 67,
|
||||
"borderTop": 0,
|
||||
"borderBottom": 0,
|
||||
"borderLeft": 0,
|
||||
"borderRight": 0,
|
||||
"spriteType": "normal",
|
||||
"subMetas": {}
|
||||
},
|
||||
"Explosion1_6.png": {
|
||||
"ver": "1.0.4",
|
||||
"uuid": "89697d35-cde3-4392-a231-db91d4ede29b",
|
||||
"rawTextureUuid": "b11569aa-2e43-4084-a3e5-42eec243c4eb",
|
||||
"trimType": "auto",
|
||||
"trimThreshold": 1,
|
||||
"rotated": false,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"trimX": 355,
|
||||
"trimY": 503,
|
||||
"width": 71,
|
||||
"height": 67,
|
||||
"rawWidth": 71,
|
||||
"rawHeight": 67,
|
||||
"borderTop": 0,
|
||||
"borderBottom": 0,
|
||||
"borderLeft": 0,
|
||||
"borderRight": 0,
|
||||
"spriteType": "normal",
|
||||
"subMetas": {}
|
||||
},
|
||||
"Explosion1_7.png": {
|
||||
"ver": "1.0.4",
|
||||
"uuid": "3815bf7a-0a48-40e0-b791-0a0be9ec0da6",
|
||||
"rawTextureUuid": "b11569aa-2e43-4084-a3e5-42eec243c4eb",
|
||||
"trimType": "auto",
|
||||
"trimThreshold": 1,
|
||||
"rotated": false,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"trimX": 426,
|
||||
"trimY": 503,
|
||||
"width": 71,
|
||||
"height": 67,
|
||||
"rawWidth": 71,
|
||||
"rawHeight": 67,
|
||||
"borderTop": 0,
|
||||
"borderBottom": 0,
|
||||
"borderLeft": 0,
|
||||
"borderRight": 0,
|
||||
"spriteType": "normal",
|
||||
"subMetas": {}
|
||||
},
|
||||
"Explosion1_8.png": {
|
||||
"ver": "1.0.4",
|
||||
"uuid": "20e691ee-a0c0-4710-8981-8dee1911e819",
|
||||
"rawTextureUuid": "b11569aa-2e43-4084-a3e5-42eec243c4eb",
|
||||
"trimType": "auto",
|
||||
"trimThreshold": 1,
|
||||
"rotated": true,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"trimX": 355,
|
||||
"trimY": 570,
|
||||
"width": 71,
|
||||
"height": 67,
|
||||
"rawWidth": 71,
|
||||
"rawHeight": 67,
|
||||
"borderTop": 0,
|
||||
"borderBottom": 0,
|
||||
"borderLeft": 0,
|
||||
"borderRight": 0,
|
||||
"spriteType": "normal",
|
||||
"subMetas": {}
|
||||
},
|
||||
"Explosion1_9.png": {
|
||||
"ver": "1.0.4",
|
||||
"uuid": "94e678c5-0780-4f2b-bf3b-86c6c0a75c23",
|
||||
"rawTextureUuid": "b11569aa-2e43-4084-a3e5-42eec243c4eb",
|
||||
"trimType": "auto",
|
||||
"trimThreshold": 1,
|
||||
"rotated": false,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"trimX": 422,
|
||||
"trimY": 570,
|
||||
"width": 71,
|
||||
"height": 67,
|
||||
"rawWidth": 71,
|
||||
"rawHeight": 67,
|
||||
"borderTop": 0,
|
||||
"borderBottom": 0,
|
||||
"borderLeft": 0,
|
||||
"borderRight": 0,
|
||||
"spriteType": "normal",
|
||||
"subMetas": {}
|
||||
},
|
||||
"Explosion2_1.png": {
|
||||
"ver": "1.0.4",
|
||||
"uuid": "89e54317-7835-4d4c-9c04-579da8b33c54",
|
||||
"rawTextureUuid": "b11569aa-2e43-4084-a3e5-42eec243c4eb",
|
||||
"trimType": "auto",
|
||||
"trimThreshold": 1,
|
||||
"rotated": true,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"trimX": 462,
|
||||
"trimY": 0,
|
||||
"width": 88,
|
||||
"height": 45,
|
||||
"rawWidth": 88,
|
||||
"rawHeight": 45,
|
||||
"borderTop": 0,
|
||||
"borderBottom": 0,
|
||||
"borderLeft": 0,
|
||||
"borderRight": 0,
|
||||
"spriteType": "normal",
|
||||
"subMetas": {}
|
||||
},
|
||||
"Explosion2_10.png": {
|
||||
"ver": "1.0.4",
|
||||
"uuid": "c032eb65-fdf3-41e6-b868-d95df34168df",
|
||||
"rawTextureUuid": "b11569aa-2e43-4084-a3e5-42eec243c4eb",
|
||||
"trimType": "auto",
|
||||
"trimThreshold": 1,
|
||||
"rotated": true,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"trimX": 462,
|
||||
"trimY": 88,
|
||||
"width": 88,
|
||||
"height": 45,
|
||||
"rawWidth": 88,
|
||||
"rawHeight": 45,
|
||||
"borderTop": 0,
|
||||
"borderBottom": 0,
|
||||
"borderLeft": 0,
|
||||
"borderRight": 0,
|
||||
"spriteType": "normal",
|
||||
"subMetas": {}
|
||||
},
|
||||
"Explosion2_2.png": {
|
||||
"ver": "1.0.4",
|
||||
"uuid": "2a186e00-a0c5-4c8a-b0ab-c84d56dcee7c",
|
||||
"rawTextureUuid": "b11569aa-2e43-4084-a3e5-42eec243c4eb",
|
||||
"trimType": "auto",
|
||||
"trimThreshold": 1,
|
||||
"rotated": true,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"trimX": 462,
|
||||
"trimY": 176,
|
||||
"width": 88,
|
||||
"height": 45,
|
||||
"rawWidth": 88,
|
||||
"rawHeight": 45,
|
||||
"borderTop": 0,
|
||||
"borderBottom": 0,
|
||||
"borderLeft": 0,
|
||||
"borderRight": 0,
|
||||
"spriteType": "normal",
|
||||
"subMetas": {}
|
||||
},
|
||||
"Explosion2_3.png": {
|
||||
"ver": "1.0.4",
|
||||
"uuid": "083168e3-6ccc-4c5b-a800-2554bffc67d4",
|
||||
"rawTextureUuid": "b11569aa-2e43-4084-a3e5-42eec243c4eb",
|
||||
"trimType": "auto",
|
||||
"trimThreshold": 1,
|
||||
"rotated": true,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"trimX": 462,
|
||||
"trimY": 264,
|
||||
"width": 88,
|
||||
"height": 45,
|
||||
"rawWidth": 88,
|
||||
"rawHeight": 45,
|
||||
"borderTop": 0,
|
||||
"borderBottom": 0,
|
||||
"borderLeft": 0,
|
||||
"borderRight": 0,
|
||||
"spriteType": "normal",
|
||||
"subMetas": {}
|
||||
},
|
||||
"Explosion2_4.png": {
|
||||
"ver": "1.0.4",
|
||||
"uuid": "d4b12ec9-6f04-493c-91e5-22b1a212262a",
|
||||
"rawTextureUuid": "b11569aa-2e43-4084-a3e5-42eec243c4eb",
|
||||
"trimType": "auto",
|
||||
"trimThreshold": 1,
|
||||
"rotated": false,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"trimX": 0,
|
||||
"trimY": 304,
|
||||
"width": 88,
|
||||
"height": 45,
|
||||
"rawWidth": 88,
|
||||
"rawHeight": 45,
|
||||
"borderTop": 0,
|
||||
"borderBottom": 0,
|
||||
"borderLeft": 0,
|
||||
"borderRight": 0,
|
||||
"spriteType": "normal",
|
||||
"subMetas": {}
|
||||
},
|
||||
"Explosion2_5.png": {
|
||||
"ver": "1.0.4",
|
||||
"uuid": "13038788-b0f9-4714-960b-c98619a0d0ce",
|
||||
"rawTextureUuid": "b11569aa-2e43-4084-a3e5-42eec243c4eb",
|
||||
"trimType": "auto",
|
||||
"trimThreshold": 1,
|
||||
"rotated": false,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"trimX": 88,
|
||||
"trimY": 304,
|
||||
"width": 88,
|
||||
"height": 45,
|
||||
"rawWidth": 88,
|
||||
"rawHeight": 45,
|
||||
"borderTop": 0,
|
||||
"borderBottom": 0,
|
||||
"borderLeft": 0,
|
||||
"borderRight": 0,
|
||||
"spriteType": "normal",
|
||||
"subMetas": {}
|
||||
},
|
||||
"Explosion2_6.png": {
|
||||
"ver": "1.0.4",
|
||||
"uuid": "94c21ed7-94a2-47a4-9537-fe5d9c51d7b0",
|
||||
"rawTextureUuid": "b11569aa-2e43-4084-a3e5-42eec243c4eb",
|
||||
"trimType": "auto",
|
||||
"trimThreshold": 1,
|
||||
"rotated": false,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"trimX": 176,
|
||||
"trimY": 304,
|
||||
"width": 88,
|
||||
"height": 45,
|
||||
"rawWidth": 88,
|
||||
"rawHeight": 45,
|
||||
"borderTop": 0,
|
||||
"borderBottom": 0,
|
||||
"borderLeft": 0,
|
||||
"borderRight": 0,
|
||||
"spriteType": "normal",
|
||||
"subMetas": {}
|
||||
},
|
||||
"Explosion2_7.png": {
|
||||
"ver": "1.0.4",
|
||||
"uuid": "d5340298-923c-4bd7-9fd7-7a2e029a2b44",
|
||||
"rawTextureUuid": "b11569aa-2e43-4084-a3e5-42eec243c4eb",
|
||||
"trimType": "auto",
|
||||
"trimThreshold": 1,
|
||||
"rotated": false,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"trimX": 264,
|
||||
"trimY": 304,
|
||||
"width": 88,
|
||||
"height": 45,
|
||||
"rawWidth": 88,
|
||||
"rawHeight": 45,
|
||||
"borderTop": 0,
|
||||
"borderBottom": 0,
|
||||
"borderLeft": 0,
|
||||
"borderRight": 0,
|
||||
"spriteType": "normal",
|
||||
"subMetas": {}
|
||||
},
|
||||
"Explosion2_8.png": {
|
||||
"ver": "1.0.4",
|
||||
"uuid": "c4b145c0-0145-4e09-8559-9ef508d95be8",
|
||||
"rawTextureUuid": "b11569aa-2e43-4084-a3e5-42eec243c4eb",
|
||||
"trimType": "auto",
|
||||
"trimThreshold": 1,
|
||||
"rotated": false,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"trimX": 352,
|
||||
"trimY": 304,
|
||||
"width": 88,
|
||||
"height": 45,
|
||||
"rawWidth": 88,
|
||||
"rawHeight": 45,
|
||||
"borderTop": 0,
|
||||
"borderBottom": 0,
|
||||
"borderLeft": 0,
|
||||
"borderRight": 0,
|
||||
"spriteType": "normal",
|
||||
"subMetas": {}
|
||||
},
|
||||
"Explosion2_9.png": {
|
||||
"ver": "1.0.4",
|
||||
"uuid": "79398d4d-305e-4987-b199-d9d9649cf490",
|
||||
"rawTextureUuid": "b11569aa-2e43-4084-a3e5-42eec243c4eb",
|
||||
"trimType": "auto",
|
||||
"trimThreshold": 1,
|
||||
"rotated": true,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"trimX": 456,
|
||||
"trimY": 352,
|
||||
"width": 88,
|
||||
"height": 45,
|
||||
"rawWidth": 88,
|
||||
"rawHeight": 45,
|
||||
"borderTop": 0,
|
||||
"borderBottom": 0,
|
||||
"borderLeft": 0,
|
||||
"borderRight": 0,
|
||||
"spriteType": "normal",
|
||||
"subMetas": {}
|
||||
},
|
||||
"Explosion3_1.png": {
|
||||
"ver": "1.0.4",
|
||||
"uuid": "84e28787-c6cb-435b-8f59-20d9afe6bf3a",
|
||||
"rawTextureUuid": "b11569aa-2e43-4084-a3e5-42eec243c4eb",
|
||||
"trimType": "auto",
|
||||
"trimThreshold": 1,
|
||||
"rotated": false,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"trimX": 0,
|
||||
"trimY": 0,
|
||||
"width": 154,
|
||||
"height": 152,
|
||||
"rawWidth": 154,
|
||||
"rawHeight": 152,
|
||||
"borderTop": 0,
|
||||
"borderBottom": 0,
|
||||
"borderLeft": 0,
|
||||
"borderRight": 0,
|
||||
"spriteType": "normal",
|
||||
"subMetas": {}
|
||||
},
|
||||
"Explosion3_10.png": {
|
||||
"ver": "1.0.4",
|
||||
"uuid": "20d9ce6b-d9ab-4402-8c59-770ad0adf570",
|
||||
"rawTextureUuid": "b11569aa-2e43-4084-a3e5-42eec243c4eb",
|
||||
"trimType": "auto",
|
||||
"trimThreshold": 1,
|
||||
"rotated": false,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"trimX": 154,
|
||||
"trimY": 0,
|
||||
"width": 154,
|
||||
"height": 152,
|
||||
"rawWidth": 154,
|
||||
"rawHeight": 152,
|
||||
"borderTop": 0,
|
||||
"borderBottom": 0,
|
||||
"borderLeft": 0,
|
||||
"borderRight": 0,
|
||||
"spriteType": "normal",
|
||||
"subMetas": {}
|
||||
},
|
||||
"Explosion3_2.png": {
|
||||
"ver": "1.0.4",
|
||||
"uuid": "0654601f-6788-4a2c-aed4-8dfbe1c5fdd0",
|
||||
"rawTextureUuid": "b11569aa-2e43-4084-a3e5-42eec243c4eb",
|
||||
"trimType": "auto",
|
||||
"trimThreshold": 1,
|
||||
"rotated": false,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"trimX": 308,
|
||||
"trimY": 0,
|
||||
"width": 154,
|
||||
"height": 152,
|
||||
"rawWidth": 154,
|
||||
"rawHeight": 152,
|
||||
"borderTop": 0,
|
||||
"borderBottom": 0,
|
||||
"borderLeft": 0,
|
||||
"borderRight": 0,
|
||||
"spriteType": "normal",
|
||||
"subMetas": {}
|
||||
},
|
||||
"Explosion3_3.png": {
|
||||
"ver": "1.0.4",
|
||||
"uuid": "0913e11a-c796-4b58-94cf-f70b3869deff",
|
||||
"rawTextureUuid": "b11569aa-2e43-4084-a3e5-42eec243c4eb",
|
||||
"trimType": "auto",
|
||||
"trimThreshold": 1,
|
||||
"rotated": false,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"trimX": 0,
|
||||
"trimY": 152,
|
||||
"width": 154,
|
||||
"height": 152,
|
||||
"rawWidth": 154,
|
||||
"rawHeight": 152,
|
||||
"borderTop": 0,
|
||||
"borderBottom": 0,
|
||||
"borderLeft": 0,
|
||||
"borderRight": 0,
|
||||
"spriteType": "normal",
|
||||
"subMetas": {}
|
||||
},
|
||||
"Explosion3_4.png": {
|
||||
"ver": "1.0.4",
|
||||
"uuid": "d6b58622-2cc3-4ee6-a34f-1a18deb73700",
|
||||
"rawTextureUuid": "b11569aa-2e43-4084-a3e5-42eec243c4eb",
|
||||
"trimType": "auto",
|
||||
"trimThreshold": 1,
|
||||
"rotated": false,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"trimX": 154,
|
||||
"trimY": 152,
|
||||
"width": 154,
|
||||
"height": 152,
|
||||
"rawWidth": 154,
|
||||
"rawHeight": 152,
|
||||
"borderTop": 0,
|
||||
"borderBottom": 0,
|
||||
"borderLeft": 0,
|
||||
"borderRight": 0,
|
||||
"spriteType": "normal",
|
||||
"subMetas": {}
|
||||
},
|
||||
"Explosion3_5.png": {
|
||||
"ver": "1.0.4",
|
||||
"uuid": "b83c6261-b86f-4323-ad11-7375cac02a2b",
|
||||
"rawTextureUuid": "b11569aa-2e43-4084-a3e5-42eec243c4eb",
|
||||
"trimType": "auto",
|
||||
"trimThreshold": 1,
|
||||
"rotated": false,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"trimX": 308,
|
||||
"trimY": 152,
|
||||
"width": 154,
|
||||
"height": 152,
|
||||
"rawWidth": 154,
|
||||
"rawHeight": 152,
|
||||
"borderTop": 0,
|
||||
"borderBottom": 0,
|
||||
"borderLeft": 0,
|
||||
"borderRight": 0,
|
||||
"spriteType": "normal",
|
||||
"subMetas": {}
|
||||
},
|
||||
"Explosion3_6.png": {
|
||||
"ver": "1.0.4",
|
||||
"uuid": "b458c047-b7b5-4476-996e-d4c1ca85ef9c",
|
||||
"rawTextureUuid": "b11569aa-2e43-4084-a3e5-42eec243c4eb",
|
||||
"trimType": "auto",
|
||||
"trimThreshold": 1,
|
||||
"rotated": true,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"trimX": 0,
|
||||
"trimY": 352,
|
||||
"width": 154,
|
||||
"height": 152,
|
||||
"rawWidth": 154,
|
||||
"rawHeight": 152,
|
||||
"borderTop": 0,
|
||||
"borderBottom": 0,
|
||||
"borderLeft": 0,
|
||||
"borderRight": 0,
|
||||
"spriteType": "normal",
|
||||
"subMetas": {}
|
||||
},
|
||||
"Explosion3_7.png": {
|
||||
"ver": "1.0.4",
|
||||
"uuid": "3971256a-8120-448e-8adf-de8d67dedfd3",
|
||||
"rawTextureUuid": "b11569aa-2e43-4084-a3e5-42eec243c4eb",
|
||||
"trimType": "auto",
|
||||
"trimThreshold": 1,
|
||||
"rotated": true,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"trimX": 152,
|
||||
"trimY": 349,
|
||||
"width": 154,
|
||||
"height": 152,
|
||||
"rawWidth": 154,
|
||||
"rawHeight": 152,
|
||||
"borderTop": 0,
|
||||
"borderBottom": 0,
|
||||
"borderLeft": 0,
|
||||
"borderRight": 0,
|
||||
"spriteType": "normal",
|
||||
"subMetas": {}
|
||||
},
|
||||
"Explosion3_8.png": {
|
||||
"ver": "1.0.4",
|
||||
"uuid": "0e548d92-36c8-4795-b3dc-2bc2cfcd7170",
|
||||
"rawTextureUuid": "b11569aa-2e43-4084-a3e5-42eec243c4eb",
|
||||
"trimType": "auto",
|
||||
"trimThreshold": 1,
|
||||
"rotated": false,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"trimX": 201,
|
||||
"trimY": 503,
|
||||
"width": 154,
|
||||
"height": 152,
|
||||
"rawWidth": 154,
|
||||
"rawHeight": 152,
|
||||
"borderTop": 0,
|
||||
"borderBottom": 0,
|
||||
"borderLeft": 0,
|
||||
"borderRight": 0,
|
||||
"spriteType": "normal",
|
||||
"subMetas": {}
|
||||
},
|
||||
"Explosion3_9.png": {
|
||||
"ver": "1.0.4",
|
||||
"uuid": "25f94245-87b0-4954-abab-c817c80fed37",
|
||||
"rawTextureUuid": "b11569aa-2e43-4084-a3e5-42eec243c4eb",
|
||||
"trimType": "auto",
|
||||
"trimThreshold": 1,
|
||||
"rotated": true,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"trimX": 304,
|
||||
"trimY": 349,
|
||||
"width": 154,
|
||||
"height": 152,
|
||||
"rawWidth": 154,
|
||||
"rawHeight": 152,
|
||||
"borderTop": 0,
|
||||
"borderBottom": 0,
|
||||
"borderLeft": 0,
|
||||
"borderRight": 0,
|
||||
"spriteType": "normal",
|
||||
"subMetas": {}
|
||||
}
|
||||
}
|
||||
}
|
After Width: | Height: | Size: 13 KiB |
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"ver": "2.3.3",
|
||||
"uuid": "b11569aa-2e43-4084-a3e5-42eec243c4eb",
|
||||
"type": "raw",
|
||||
"wrapMode": "clamp",
|
||||
"filterMode": "bilinear",
|
||||
"premultiplyAlpha": false,
|
||||
"genMipmaps": false,
|
||||
"packable": true,
|
||||
"platformSettings": {},
|
||||
"subMetas": {}
|
||||
}
|
7
frontend/assets/resources/animation/Fireball.meta
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"ver": "1.0.1",
|
||||
"uuid": "b07a911d-2d61-486d-9edc-1b3ba53c9911",
|
||||
"isSubpackage": false,
|
||||
"subpackageName": "",
|
||||
"subMetas": {}
|
||||
}
|
145
frontend/assets/resources/animation/Fireball/Fireball1.anim
Normal file
@@ -0,0 +1,145 @@
|
||||
{
|
||||
"__type__": "cc.AnimationClip",
|
||||
"_name": "Fireball1",
|
||||
"_objFlags": 0,
|
||||
"_native": "",
|
||||
"_duration": 0.35,
|
||||
"sample": 60,
|
||||
"speed": 1,
|
||||
"wrapMode": 2,
|
||||
"curveData": {
|
||||
"comps": {
|
||||
"cc.Sprite": {
|
||||
"spriteFrame": [
|
||||
{
|
||||
"frame": 0,
|
||||
"value": {
|
||||
"__uuid__": "dbe67025-9878-4e13-8f3d-81e04734810a"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.016666666666666666,
|
||||
"value": {
|
||||
"__uuid__": "e92702d5-d5fd-49e6-ab6b-2296b43fa6d6"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.03333333333333333,
|
||||
"value": {
|
||||
"__uuid__": "e1a89340-0b92-4e6b-93f2-e983302d70ce"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.05,
|
||||
"value": {
|
||||
"__uuid__": "b0bb4a7a-4ae3-48fc-9913-3b6d1d36c56f"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.06666666666666667,
|
||||
"value": {
|
||||
"__uuid__": "b44d585b-8e18-4767-b263-ed3a53cd3250"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.08333333333333333,
|
||||
"value": {
|
||||
"__uuid__": "a87a9ea8-2d84-4a3b-83e3-a4d7b8ac96b8"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.1,
|
||||
"value": {
|
||||
"__uuid__": "a1604f9d-c0ea-4f92-b09b-3608245bda8e"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.11666666666666667,
|
||||
"value": {
|
||||
"__uuid__": "4372818f-1e44-4180-a0ce-4a34cee4fc5b"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.13333333333333333,
|
||||
"value": {
|
||||
"__uuid__": "dbe67025-9878-4e13-8f3d-81e04734810a"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.15,
|
||||
"value": {
|
||||
"__uuid__": "5d867617-7f50-4fa8-804d-ce28c47ea407"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.16666666666666666,
|
||||
"value": {
|
||||
"__uuid__": "824c9bee-42b7-4a94-86f8-6356f11aee16"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.18333333333333332,
|
||||
"value": {
|
||||
"__uuid__": "6389164e-93bb-4d4d-9740-5e2d5cdb1029"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.2,
|
||||
"value": {
|
||||
"__uuid__": "d184a083-6043-4ca6-bd14-8db1b6be1d2e"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.21666666666666667,
|
||||
"value": {
|
||||
"__uuid__": "361b1722-e362-46e5-939e-e2d1666df374"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.23333333333333334,
|
||||
"value": {
|
||||
"__uuid__": "662fbe4f-a1f4-46f7-83e4-eafd021432da"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.25,
|
||||
"value": {
|
||||
"__uuid__": "5e509118-a44b-4e7f-9686-c6bb0b30f0b0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.26666666666666666,
|
||||
"value": {
|
||||
"__uuid__": "bc1110c7-4423-4c43-965c-0cb3dd8e31ff"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.2833333333333333,
|
||||
"value": {
|
||||
"__uuid__": "33cc8d11-1568-47a7-b4f1-cef4888302e5"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.3,
|
||||
"value": {
|
||||
"__uuid__": "83bb5dd3-510c-4fce-b393-840f14efb8cd"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.31666666666666665,
|
||||
"value": {
|
||||
"__uuid__": "1db706f5-366a-421c-843f-a4bb016f80ec"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.3333333333333333,
|
||||
"value": {
|
||||
"__uuid__": "41a4f35a-01c0-4a22-b5cc-7bfe25ed4501"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"events": []
|
||||
}
|
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"ver": "2.1.0",
|
||||
"uuid": "ba12416b-eec3-4260-8402-7fc25b125624",
|
||||
"subMetas": {}
|
||||
}
|
97
frontend/assets/resources/animation/Fireball/Fireball2.anim
Normal file
@@ -0,0 +1,97 @@
|
||||
{
|
||||
"__type__": "cc.AnimationClip",
|
||||
"_name": "Fireball2",
|
||||
"_objFlags": 0,
|
||||
"_native": "",
|
||||
"_duration": 0.21666666666666667,
|
||||
"sample": 60,
|
||||
"speed": 1,
|
||||
"wrapMode": 2,
|
||||
"curveData": {
|
||||
"comps": {
|
||||
"cc.Sprite": {
|
||||
"spriteFrame": [
|
||||
{
|
||||
"frame": 0,
|
||||
"value": {
|
||||
"__uuid__": "db4c7e6f-9bee-4e7a-8628-d41b8bcaff42"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.016666666666666666,
|
||||
"value": {
|
||||
"__uuid__": "42796576-72b3-49c2-8c5a-ea946fbe1525"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.03333333333333333,
|
||||
"value": {
|
||||
"__uuid__": "0aa5a52f-a92a-4a4a-b49b-aee2b5a3eb55"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.05,
|
||||
"value": {
|
||||
"__uuid__": "0a7b5e41-acdc-4af3-beff-0a42aca9f91a"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.06666666666666667,
|
||||
"value": {
|
||||
"__uuid__": "de0b22b7-65ca-455f-bcd1-2ddd6cc114e2"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.08333333333333333,
|
||||
"value": {
|
||||
"__uuid__": "e9ce1383-9e3d-4d44-9f80-ab5fa2224138"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.1,
|
||||
"value": {
|
||||
"__uuid__": "5b22df7e-414b-44a3-989f-640c5b9417b9"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.11666666666666667,
|
||||
"value": {
|
||||
"__uuid__": "f459615c-70a4-421b-b649-a28460332364"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.13333333333333333,
|
||||
"value": {
|
||||
"__uuid__": "c2723b9d-fbd8-4524-a0dd-b110451e4e32"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.15,
|
||||
"value": {
|
||||
"__uuid__": "4286b3d1-fea2-41fd-8829-7635f546def4"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.16666666666666666,
|
||||
"value": {
|
||||
"__uuid__": "4e0d6419-62df-4382-893e-dd7cc47f7770"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.18333333333333332,
|
||||
"value": {
|
||||
"__uuid__": "f0cd9259-b323-4fba-ad8b-02d5e56c2cd4"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.2,
|
||||
"value": {
|
||||
"__uuid__": "0193b66d-06bb-49f9-b2f5-51fff8b16015"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"events": []
|
||||
}
|
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"ver": "2.1.0",
|
||||
"uuid": "d2c65ac4-a5b3-411e-8d2d-18d3980649d7",
|
||||
"subMetas": {}
|
||||
}
|
73
frontend/assets/resources/animation/Fireball/Fireball3.anim
Normal file
@@ -0,0 +1,73 @@
|
||||
{
|
||||
"__type__": "cc.AnimationClip",
|
||||
"_name": "Fireball3",
|
||||
"_objFlags": 0,
|
||||
"_native": "",
|
||||
"_duration": 0.5666666666666667,
|
||||
"sample": 60,
|
||||
"speed": 1,
|
||||
"wrapMode": 2,
|
||||
"curveData": {
|
||||
"comps": {
|
||||
"cc.Sprite": {
|
||||
"spriteFrame": [
|
||||
{
|
||||
"frame": 0,
|
||||
"value": {
|
||||
"__uuid__": "6af65d40-470c-47de-8b3d-f53c3923bf90"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.05,
|
||||
"value": {
|
||||
"__uuid__": "ebf64819-79a5-4366-bf70-08f3b1c6114c"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.13333333333333333,
|
||||
"value": {
|
||||
"__uuid__": "e03d879b-5227-4c11-a4b9-0a426967d28a"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.2,
|
||||
"value": {
|
||||
"__uuid__": "a1aa0c83-4a34-43ae-9a8f-56189808df68"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.26666666666666666,
|
||||
"value": {
|
||||
"__uuid__": "3cc28dd0-2518-4162-a39d-4e4b19f9d60b"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.35,
|
||||
"value": {
|
||||
"__uuid__": "1b41f500-c55b-4cbf-a040-287b6cc0e958"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.43333333333333335,
|
||||
"value": {
|
||||
"__uuid__": "cfa24c51-0ad4-4e3b-b571-c5500002d6e9"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.5,
|
||||
"value": {
|
||||
"__uuid__": "d4a46a6a-401c-4694-a192-0a7b3ce6f603"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.55,
|
||||
"value": {
|
||||
"__uuid__": "c88c5293-9f21-4a1a-a6b6-649e403dc7a2"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"events": []
|
||||
}
|
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"ver": "2.1.0",
|
||||
"uuid": "6aef5812-d16c-4da1-96a3-a38ac227c823",
|
||||
"subMetas": {}
|
||||
}
|
@@ -18,61 +18,43 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.06666666666666667,
|
||||
"frame": 0.05,
|
||||
"value": {
|
||||
"__uuid__": "dd9a00aa-ddbc-4b01-a7cb-3c43c3a655b6"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.11666666666666667,
|
||||
"value": {
|
||||
"__uuid__": "f66e83bd-1afc-4957-bb16-488d70566ed1"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.16666666666666666,
|
||||
"value": {
|
||||
"__uuid__": "bd682c41-dc62-49ff-a96a-18b33e50a6de"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.23333333333333334,
|
||||
"value": {
|
||||
"__uuid__": "94ccab85-e32f-4e13-b0e5-72c798f78ad1"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.3,
|
||||
"frame": 0.08333333333333333,
|
||||
"value": {
|
||||
"__uuid__": "e80d3a01-5048-42b7-a280-cb6aa01602c2"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.36666666666666664,
|
||||
"frame": 0.11666666666666667,
|
||||
"value": {
|
||||
"__uuid__": "d899088c-be62-47b4-9ebf-0a89a2261565"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.4166666666666667,
|
||||
"frame": 0.15,
|
||||
"value": {
|
||||
"__uuid__": "5b1e5aa7-fd82-47ae-a5b2-6d4983d848ed"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.48333333333333334,
|
||||
"frame": 0.18333333333333332,
|
||||
"value": {
|
||||
"__uuid__": "c2945988-b4bb-4583-a5ef-2fa02b23a347"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.5666666666666667,
|
||||
"frame": 0.23333333333333334,
|
||||
"value": {
|
||||
"__uuid__": "070ea1e3-9c07-4735-8b94-515ef70216ad"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.6666666666666666,
|
||||
"frame": 0.2833333333333333,
|
||||
"value": {
|
||||
"__uuid__": "3b8bc5c0-26df-4218-b7dc-134a36080a35"
|
||||
}
|
||||
|
73
frontend/assets/resources/animation/KnifeGirl/Atk4.anim
Normal file
@@ -0,0 +1,73 @@
|
||||
{
|
||||
"__type__": "cc.AnimationClip",
|
||||
"_name": "Atk4",
|
||||
"_objFlags": 0,
|
||||
"_native": "",
|
||||
"_duration": 1.0166666666666666,
|
||||
"sample": 60,
|
||||
"speed": 1,
|
||||
"wrapMode": 1,
|
||||
"curveData": {
|
||||
"comps": {
|
||||
"cc.Sprite": {
|
||||
"spriteFrame": [
|
||||
{
|
||||
"frame": 0,
|
||||
"value": {
|
||||
"__uuid__": "da597a30-22da-4053-b4ee-1cfa27980a75"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.08333333333333333,
|
||||
"value": {
|
||||
"__uuid__": "b3604b4c-426f-4843-bb76-f09a9687950d"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.16666666666666666,
|
||||
"value": {
|
||||
"__uuid__": "24b51487-6c91-42d9-bd12-afbbf70f2e4b"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.2833333333333333,
|
||||
"value": {
|
||||
"__uuid__": "c318ad71-7a5e-43b0-8098-b7a34a6e6fbe"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.38333333333333336,
|
||||
"value": {
|
||||
"__uuid__": "85d6d8d7-81cf-4369-a501-6ad72d70f5a2"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.5,
|
||||
"value": {
|
||||
"__uuid__": "42b76eaf-db36-4835-9072-893337c83425"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.6,
|
||||
"value": {
|
||||
"__uuid__": "152f23a1-f70f-4db6-bb28-68625aef930f"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.8833333333333333,
|
||||
"value": {
|
||||
"__uuid__": "9c907eb5-84ab-4fa9-9404-9085f29706cc"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 1,
|
||||
"value": {
|
||||
"__uuid__": "74f0ffc8-cc25-4fcf-a6d8-bf093daba9ca"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"events": []
|
||||
}
|
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"ver": "2.1.0",
|
||||
"uuid": "2aef91f9-ef47-4bb4-bf43-5441723aa639",
|
||||
"subMetas": {}
|
||||
}
|
61
frontend/assets/resources/animation/KnifeGirl/Dashing.anim
Normal file
@@ -0,0 +1,61 @@
|
||||
{
|
||||
"__type__": "cc.AnimationClip",
|
||||
"_name": "Dashing",
|
||||
"_objFlags": 0,
|
||||
"_native": "",
|
||||
"_duration": 0.35,
|
||||
"sample": 60,
|
||||
"speed": 1,
|
||||
"wrapMode": 1,
|
||||
"curveData": {
|
||||
"comps": {
|
||||
"cc.Sprite": {
|
||||
"spriteFrame": [
|
||||
{
|
||||
"frame": 0,
|
||||
"value": {
|
||||
"__uuid__": "cf396dac-50c9-4389-90c0-55f49fd3276d"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.05,
|
||||
"value": {
|
||||
"__uuid__": "b9e4b5d5-c296-48c8-aa60-d22db0e5a632"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.11666666666666667,
|
||||
"value": {
|
||||
"__uuid__": "e456c710-69f5-4dcc-9f5d-dd486a9198a1"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.16666666666666666,
|
||||
"value": {
|
||||
"__uuid__": "ec6df76f-0004-4216-9b83-449487fe0cda"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.23333333333333334,
|
||||
"value": {
|
||||
"__uuid__": "26032d0f-845c-4b96-89a6-d88113ed7827"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.2833333333333333,
|
||||
"value": {
|
||||
"__uuid__": "e3e0169c-3c56-4206-a20e-35e4d0471873"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.3333333333333333,
|
||||
"value": {
|
||||
"__uuid__": "80b98036-c5de-492b-b0e8-f1703f3a7d20"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"events": []
|
||||
}
|
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"ver": "2.1.0",
|
||||
"uuid": "38b2c892-347b-4009-93f8-65b2ab1614f0",
|
||||
"subMetas": {}
|
||||
}
|
103
frontend/assets/resources/animation/KnifeGirl/Dying.anim
Normal file
@@ -0,0 +1,103 @@
|
||||
{
|
||||
"__type__": "cc.AnimationClip",
|
||||
"_name": "Dying",
|
||||
"_objFlags": 0,
|
||||
"_native": "",
|
||||
"_duration": 0.5333333333333333,
|
||||
"sample": 60,
|
||||
"speed": 1,
|
||||
"wrapMode": 1,
|
||||
"curveData": {
|
||||
"comps": {
|
||||
"cc.Sprite": {
|
||||
"spriteFrame": [
|
||||
{
|
||||
"frame": 0,
|
||||
"value": {
|
||||
"__uuid__": "700f93f9-ef84-4cb2-b759-f39ceac1c1d1"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.016666666666666666,
|
||||
"value": {
|
||||
"__uuid__": "5b4ea047-594e-4d0b-8e08-e24117bf1e67"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.05,
|
||||
"value": {
|
||||
"__uuid__": "a822576c-d2eb-4c17-8969-03dd1da5a93e"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.1,
|
||||
"value": {
|
||||
"__uuid__": "85e92afc-4359-4a8d-bdfa-958a6134cd6a"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.15,
|
||||
"value": {
|
||||
"__uuid__": "88d6e560-1b65-4d78-949c-cbc0e67d33cc"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.2,
|
||||
"value": {
|
||||
"__uuid__": "9ac16319-c1af-41d1-910b-99cbfd6230b2"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.23333333333333334,
|
||||
"value": {
|
||||
"__uuid__": "2a6b168a-458f-4d19-a985-9b00cc6e37e8"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.26666666666666666,
|
||||
"value": {
|
||||
"__uuid__": "f8482295-dc0d-4265-be56-0b0a9f6f6b9b"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.31666666666666665,
|
||||
"value": {
|
||||
"__uuid__": "0d4a314c-119a-46b9-8dce-dbaacf2523e5"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.36666666666666664,
|
||||
"value": {
|
||||
"__uuid__": "18d4ff6c-6b57-461b-8588-03521fafc9d1"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.4,
|
||||
"value": {
|
||||
"__uuid__": "f25280f2-442a-4ad7-914e-0f96cbf108f5"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.45,
|
||||
"value": {
|
||||
"__uuid__": "ccccb669-d44d-4a5c-89a1-9aba9476ce12"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.48333333333333334,
|
||||
"value": {
|
||||
"__uuid__": "4a45c23d-7bc8-4c5e-b761-ac1100b12a09"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.5166666666666667,
|
||||
"value": {
|
||||
"__uuid__": "1c4359c5-b303-403d-82ad-8d5e6ae6ec99"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"events": []
|
||||
}
|
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"ver": "2.1.0",
|
||||
"uuid": "ac90c9b8-3b06-4866-89ce-2c953a9d5a9a",
|
||||
"subMetas": {}
|
||||
}
|
Before Width: | Height: | Size: 104 KiB After Width: | Height: | Size: 175 KiB |
37
frontend/assets/resources/animation/KnifeGirl/OnWall.anim
Normal file
@@ -0,0 +1,37 @@
|
||||
{
|
||||
"__type__": "cc.AnimationClip",
|
||||
"_name": "OnWall",
|
||||
"_objFlags": 0,
|
||||
"_native": "",
|
||||
"_duration": 0.26666666666666666,
|
||||
"sample": 60,
|
||||
"speed": 1,
|
||||
"wrapMode": 1,
|
||||
"curveData": {
|
||||
"comps": {
|
||||
"cc.Sprite": {
|
||||
"spriteFrame": [
|
||||
{
|
||||
"frame": 0,
|
||||
"value": {
|
||||
"__uuid__": "c18886db-8116-4602-84f2-51652a90269a"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.13333333333333333,
|
||||
"value": {
|
||||
"__uuid__": "0d81cbf0-dff8-4672-99b3-2ec8055c6931"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.25,
|
||||
"value": {
|
||||
"__uuid__": "a183e740-3c2d-4890-8430-39a00f55f446"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"events": []
|
||||
}
|
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"ver": "2.1.0",
|
||||
"uuid": "411f964a-4dd8-424c-b2e2-d92b10474ce2",
|
||||
"subMetas": {}
|
||||
}
|
@@ -0,0 +1,43 @@
|
||||
{
|
||||
"__type__": "cc.AnimationClip",
|
||||
"_name": "TurnAround1",
|
||||
"_objFlags": 0,
|
||||
"_native": "",
|
||||
"_duration": 0.15,
|
||||
"sample": 60,
|
||||
"speed": 1,
|
||||
"wrapMode": 1,
|
||||
"curveData": {
|
||||
"comps": {
|
||||
"cc.Sprite": {
|
||||
"spriteFrame": [
|
||||
{
|
||||
"frame": 0,
|
||||
"value": {
|
||||
"__uuid__": "28ee1f29-e538-4d36-bb5c-275f9e3b392b"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.03333333333333333,
|
||||
"value": {
|
||||
"__uuid__": "211a73bb-31d7-4e6c-901e-f6939d9214e0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.08333333333333333,
|
||||
"value": {
|
||||
"__uuid__": "048c41dc-fc00-4bc4-8041-6003e7c2b6e4"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.13333333333333333,
|
||||
"value": {
|
||||
"__uuid__": "9435195e-4560-495e-b1ae-083c0c87e8a0"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"events": []
|
||||
}
|
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"ver": "2.1.0",
|
||||
"uuid": "e906322d-a08b-4477-a2e9-98acd42fa034",
|
||||
"subMetas": {}
|
||||
}
|
@@ -3,7 +3,7 @@
|
||||
"_name": "Walking",
|
||||
"_objFlags": 0,
|
||||
"_native": "",
|
||||
"_duration": 1.5166666666666666,
|
||||
"_duration": 0.6333333333333333,
|
||||
"sample": 60,
|
||||
"speed": 1.2,
|
||||
"wrapMode": 2,
|
||||
@@ -13,78 +13,78 @@
|
||||
"spriteFrame": [
|
||||
{
|
||||
"frame": 0,
|
||||
"value": {
|
||||
"__uuid__": "c3b14ecc-a6d9-4cb3-8637-ca7b407a0f5c"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.08333333333333333,
|
||||
"value": {
|
||||
"__uuid__": "9435195e-4560-495e-b1ae-083c0c87e8a0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.18333333333333332,
|
||||
"frame": 0.06666666666666667,
|
||||
"value": {
|
||||
"__uuid__": "ec048360-7a17-4f22-ba52-eb86ec1acae8"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.2833333333333333,
|
||||
"frame": 0.11666666666666667,
|
||||
"value": {
|
||||
"__uuid__": "82bb81e3-667c-4280-8710-211f4904ef2f"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.4,
|
||||
"frame": 0.16666666666666666,
|
||||
"value": {
|
||||
"__uuid__": "c3b14ecc-a6d9-4cb3-8637-ca7b407a0f5c"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.21666666666666667,
|
||||
"value": {
|
||||
"__uuid__": "f958fb7f-ef5a-4918-81f3-564004572f45"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.5333333333333333,
|
||||
"frame": 0.26666666666666666,
|
||||
"value": {
|
||||
"__uuid__": "8a0ecf92-db26-4206-9a80-20e749055def"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.65,
|
||||
"frame": 0.31666666666666665,
|
||||
"value": {
|
||||
"__uuid__": "942f2e02-a700-4fbf-877e-08c93e4d4010"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.7666666666666667,
|
||||
"frame": 0.36666666666666664,
|
||||
"value": {
|
||||
"__uuid__": "30546064-1a11-499e-8523-a82c83951c73"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.9,
|
||||
"frame": 0.4166666666666667,
|
||||
"value": {
|
||||
"__uuid__": "515bb75f-7a1f-4500-8aa9-c895915ce19f"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 1.0333333333333334,
|
||||
"frame": 0.4666666666666667,
|
||||
"value": {
|
||||
"__uuid__": "9100da6b-7582-4afb-9698-3d67d3b2012d"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 1.2166666666666666,
|
||||
"frame": 0.5166666666666667,
|
||||
"value": {
|
||||
"__uuid__": "1257f72d-0cb3-4750-ae70-13c2d8eb2269"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 1.3833333333333333,
|
||||
"frame": 0.5666666666666667,
|
||||
"value": {
|
||||
"__uuid__": "1d34b6db-27ba-4e26-864d-0f00d501765e"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 1.5,
|
||||
"frame": 0.6166666666666667,
|
||||
"value": {
|
||||
"__uuid__": "c317a75a-52c0-4c38-9300-a064cbf4efb3"
|
||||
}
|
||||
|
7
frontend/assets/resources/animation/Monk.meta
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"ver": "1.0.1",
|
||||
"uuid": "e0e9bbc6-e22a-4277-b674-1308432d9734",
|
||||
"isSubpackage": false,
|
||||
"subpackageName": "",
|
||||
"subMetas": {}
|
||||
}
|
61
frontend/assets/resources/animation/Monk/Atk1.anim
Normal file
@@ -0,0 +1,61 @@
|
||||
{
|
||||
"__type__": "cc.AnimationClip",
|
||||
"_name": "Atk1",
|
||||
"_objFlags": 0,
|
||||
"_native": "",
|
||||
"_duration": 0.5,
|
||||
"sample": 60,
|
||||
"speed": 1,
|
||||
"wrapMode": 1,
|
||||
"curveData": {
|
||||
"comps": {
|
||||
"cc.Sprite": {
|
||||
"spriteFrame": [
|
||||
{
|
||||
"frame": 0,
|
||||
"value": {
|
||||
"__uuid__": "c7107ebe-c5c1-4ba6-8ef4-6eb768f7faf9"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.06666666666666667,
|
||||
"value": {
|
||||
"__uuid__": "e0e20918-ff59-43bc-aeaf-035087934092"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.2,
|
||||
"value": {
|
||||
"__uuid__": "5896a135-36da-4fa9-9257-a9042ba4b546"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.26666666666666666,
|
||||
"value": {
|
||||
"__uuid__": "4a16667a-f3b3-405c-8565-d65a4281cfc8"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.35,
|
||||
"value": {
|
||||
"__uuid__": "5ad9858c-52aa-4742-be68-d680210e0d0a"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.43333333333333335,
|
||||
"value": {
|
||||
"__uuid__": "e54dbc94-3eeb-450a-9206-655e960771d2"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.48333333333333334,
|
||||
"value": {
|
||||
"__uuid__": "f79260b7-7702-4f15-8f12-eb19f018aff1"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"events": []
|
||||
}
|
5
frontend/assets/resources/animation/Monk/Atk1.anim.meta
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"ver": "2.1.0",
|
||||
"uuid": "d044ab74-be6a-49a2-85ab-eba41922c2cd",
|
||||
"subMetas": {}
|
||||
}
|
103
frontend/assets/resources/animation/Monk/Atk2.anim
Normal file
@@ -0,0 +1,103 @@
|
||||
{
|
||||
"__type__": "cc.AnimationClip",
|
||||
"_name": "Atk2",
|
||||
"_objFlags": 0,
|
||||
"_native": "",
|
||||
"_duration": 0.6166666666666667,
|
||||
"sample": 60,
|
||||
"speed": 1,
|
||||
"wrapMode": 1,
|
||||
"curveData": {
|
||||
"comps": {
|
||||
"cc.Sprite": {
|
||||
"spriteFrame": [
|
||||
{
|
||||
"frame": 0,
|
||||
"value": {
|
||||
"__uuid__": "549e581f-5121-4cbb-96e9-b3b8b5b0f227"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.06666666666666667,
|
||||
"value": {
|
||||
"__uuid__": "0355243d-755f-497b-b1ff-4ec105f4efe7"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.11666666666666667,
|
||||
"value": {
|
||||
"__uuid__": "22386328-484b-441e-9675-6553ede6118c"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.15,
|
||||
"value": {
|
||||
"__uuid__": "1ed0eb22-5a20-405f-a15e-8a66348bd025"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.18333333333333332,
|
||||
"value": {
|
||||
"__uuid__": "6e12225f-2300-4e0e-bcf6-00049bfbc48f"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.21666666666666667,
|
||||
"value": {
|
||||
"__uuid__": "08e1ec2a-500f-4a16-a19d-383de218cc14"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.25,
|
||||
"value": {
|
||||
"__uuid__": "024b3ae9-7d24-4057-83d7-4b58f8651ce0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.3,
|
||||
"value": {
|
||||
"__uuid__": "57f241ae-ce40-49ed-bf63-71d016e41e2f"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.35,
|
||||
"value": {
|
||||
"__uuid__": "d2685f61-3365-4c14-9fb1-d7b2311871c4"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.4,
|
||||
"value": {
|
||||
"__uuid__": "59587d34-25af-42bd-ba0c-747c5f5fa697"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.45,
|
||||
"value": {
|
||||
"__uuid__": "3bceacb5-309a-41e0-bdad-26e85bcf859a"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.5,
|
||||
"value": {
|
||||
"__uuid__": "57f6da9e-f131-4fab-9a3d-f2e894d203aa"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.55,
|
||||
"value": {
|
||||
"__uuid__": "c35454f3-535b-4aec-b408-b8174a74556a"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.6,
|
||||
"value": {
|
||||
"__uuid__": "24f5b898-42dc-4f67-b6fc-946cdb5e369f"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"events": []
|
||||
}
|
5
frontend/assets/resources/animation/Monk/Atk2.anim.meta
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"ver": "2.1.0",
|
||||
"uuid": "2cab337d-df23-476d-8a98-b5f115a52d04",
|
||||
"subMetas": {}
|
||||
}
|
91
frontend/assets/resources/animation/Monk/Atk3.anim
Normal file
@@ -0,0 +1,91 @@
|
||||
{
|
||||
"__type__": "cc.AnimationClip",
|
||||
"_name": "Atk3",
|
||||
"_objFlags": 0,
|
||||
"_native": "",
|
||||
"_duration": 0.5333333333333333,
|
||||
"sample": 60,
|
||||
"speed": 1,
|
||||
"wrapMode": 1,
|
||||
"curveData": {
|
||||
"comps": {
|
||||
"cc.Sprite": {
|
||||
"spriteFrame": [
|
||||
{
|
||||
"frame": 0,
|
||||
"value": {
|
||||
"__uuid__": "d97f6a5f-8e63-40d7-bd14-9dc71e15e5db"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.03333333333333333,
|
||||
"value": {
|
||||
"__uuid__": "196bcbf9-e89f-4b26-b736-73e2fa787e50"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.08333333333333333,
|
||||
"value": {
|
||||
"__uuid__": "3229e023-e63d-4a4e-af72-2b1409ea43c5"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.11666666666666667,
|
||||
"value": {
|
||||
"__uuid__": "e2d6e8b8-b468-4edb-b8c3-860bd85ebeae"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.16666666666666666,
|
||||
"value": {
|
||||
"__uuid__": "318745eb-06b1-4e7f-88d1-e23e02d99e67"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.21666666666666667,
|
||||
"value": {
|
||||
"__uuid__": "bba6f088-0e1f-4a12-9872-41670be1152a"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.26666666666666666,
|
||||
"value": {
|
||||
"__uuid__": "2c5de5b2-9009-48fa-bef4-ae34cc94f876"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.31666666666666665,
|
||||
"value": {
|
||||
"__uuid__": "6f27b252-6eaf-4b4b-9c5a-46ba899e4845"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.36666666666666664,
|
||||
"value": {
|
||||
"__uuid__": "4ebd5c60-efa6-4950-a4c8-74a7a8517333"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.4166666666666667,
|
||||
"value": {
|
||||
"__uuid__": "a207290f-4556-4adb-8a11-e1d5ba342550"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.4666666666666667,
|
||||
"value": {
|
||||
"__uuid__": "e9d442d2-981d-437d-87c0-085162017de7"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.5166666666666667,
|
||||
"value": {
|
||||
"__uuid__": "9b4d5c8c-5ec0-4fd7-a45e-6b0bc8ff9119"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"events": []
|
||||
}
|
5
frontend/assets/resources/animation/Monk/Atk3.anim.meta
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"ver": "2.1.0",
|
||||
"uuid": "504dd9c8-7850-44e8-a944-bbdb2260b18a",
|
||||
"subMetas": {}
|
||||
}
|
115
frontend/assets/resources/animation/Monk/Atk4.anim
Normal file
@@ -0,0 +1,115 @@
|
||||
{
|
||||
"__type__": "cc.AnimationClip",
|
||||
"_name": "Atk4",
|
||||
"_objFlags": 0,
|
||||
"_native": "",
|
||||
"_duration": 0.6833333333333333,
|
||||
"sample": 60,
|
||||
"speed": 1,
|
||||
"wrapMode": 1,
|
||||
"curveData": {
|
||||
"comps": {
|
||||
"cc.Sprite": {
|
||||
"spriteFrame": [
|
||||
{
|
||||
"frame": 0,
|
||||
"value": {
|
||||
"__uuid__": "a4f724de-140f-472a-be83-731520d3da38"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.03333333333333333,
|
||||
"value": {
|
||||
"__uuid__": "3594a12d-5b5c-4dc6-8138-1b48eacf0798"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.05,
|
||||
"value": {
|
||||
"__uuid__": "cdef413d-f009-45d3-aeb6-423652fc366d"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.08333333333333333,
|
||||
"value": {
|
||||
"__uuid__": "688682c4-ea77-4d2c-b1e4-079f5880d3cd"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.11666666666666667,
|
||||
"value": {
|
||||
"__uuid__": "ca9f0a44-9977-4b24-8243-ac5536f14bc8"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.15,
|
||||
"value": {
|
||||
"__uuid__": "6b4dbc7c-a872-40d6-be0e-4d1a96eddd44"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.2,
|
||||
"value": {
|
||||
"__uuid__": "b43c8a38-1d55-4d6b-b6a1-fc888a9e53b5"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.25,
|
||||
"value": {
|
||||
"__uuid__": "0eb3d73a-a724-46f3-b1f1-56d315150320"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.3,
|
||||
"value": {
|
||||
"__uuid__": "ddac83f4-f0bf-460e-9a83-cc75c69ef024"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.35,
|
||||
"value": {
|
||||
"__uuid__": "8e673fdc-2cc8-435c-8a0d-38dcfc7b8600"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.4,
|
||||
"value": {
|
||||
"__uuid__": "7a345895-6501-4388-88f6-984992a3799b"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.4666666666666667,
|
||||
"value": {
|
||||
"__uuid__": "99b4e340-52ca-4f3e-a86f-ca385ff8797a"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.5166666666666667,
|
||||
"value": {
|
||||
"__uuid__": "554d0862-0d1c-4f61-8d47-03362cd9eb1d"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.5666666666666667,
|
||||
"value": {
|
||||
"__uuid__": "cd15a283-cf0d-48d4-9162-2d72202baf82"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.6166666666666667,
|
||||
"value": {
|
||||
"__uuid__": "b2bb7fdf-2532-408f-a3d1-fe8bf0e34f61"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.6666666666666666,
|
||||
"value": {
|
||||
"__uuid__": "435c0195-a5c3-4a8f-9d44-e6f026649b70"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"events": []
|
||||
}
|
5
frontend/assets/resources/animation/Monk/Atk4.anim.meta
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"ver": "2.1.0",
|
||||
"uuid": "7e0a1e98-ee5a-446f-bec2-7d72b6916503",
|
||||
"subMetas": {}
|
||||
}
|
85
frontend/assets/resources/animation/Monk/Atk5.anim
Normal file
@@ -0,0 +1,85 @@
|
||||
{
|
||||
"__type__": "cc.AnimationClip",
|
||||
"_name": "Atk5",
|
||||
"_objFlags": 0,
|
||||
"_native": "",
|
||||
"_duration": 1.0166666666666666,
|
||||
"sample": 60,
|
||||
"speed": 1,
|
||||
"wrapMode": 1,
|
||||
"curveData": {
|
||||
"comps": {
|
||||
"cc.Sprite": {
|
||||
"spriteFrame": [
|
||||
{
|
||||
"frame": 0,
|
||||
"value": {
|
||||
"__uuid__": "6aa88bb9-0427-496f-ae7d-dc06410e904e"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.08333333333333333,
|
||||
"value": {
|
||||
"__uuid__": "cdc65f83-c526-48b6-8a96-758b098568fe"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.16666666666666666,
|
||||
"value": {
|
||||
"__uuid__": "927636af-2d1d-4801-a546-857f5eeb256d"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.26666666666666666,
|
||||
"value": {
|
||||
"__uuid__": "2aeeb833-9151-4160-9775-9e08a376fd63"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.36666666666666664,
|
||||
"value": {
|
||||
"__uuid__": "2bd1de9e-30e5-4bc5-b6c3-5c286754b0b7"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.4666666666666667,
|
||||
"value": {
|
||||
"__uuid__": "15a6ebb3-289a-46fb-ac94-f6efa0d90510"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.5833333333333334,
|
||||
"value": {
|
||||
"__uuid__": "6ca922c0-cb62-4b1b-8773-79685a58bbd6"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.7,
|
||||
"value": {
|
||||
"__uuid__": "d60ceb6f-3a45-47dd-8d3f-bcfe8c919d85"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.8,
|
||||
"value": {
|
||||
"__uuid__": "c313f6a1-e0fa-4321-8336-c32f471b2592"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.9,
|
||||
"value": {
|
||||
"__uuid__": "bb886d03-7f3e-45c8-acfd-393091f09adb"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 1,
|
||||
"value": {
|
||||
"__uuid__": "1be255c3-f8c9-43ae-be68-2e500e7f1125"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"events": []
|
||||
}
|
5
frontend/assets/resources/animation/Monk/Atk5.anim.meta
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"ver": "2.1.0",
|
||||
"uuid": "0abbd156-980e-475e-9994-3c958bd913fc",
|
||||
"subMetas": {}
|
||||
}
|
31
frontend/assets/resources/animation/Monk/Atked1.anim
Normal file
@@ -0,0 +1,31 @@
|
||||
{
|
||||
"__type__": "cc.AnimationClip",
|
||||
"_name": "Atked1",
|
||||
"_objFlags": 0,
|
||||
"_native": "",
|
||||
"_duration": 0.06666666666666667,
|
||||
"sample": 60,
|
||||
"speed": 1,
|
||||
"wrapMode": 1,
|
||||
"curveData": {
|
||||
"comps": {
|
||||
"cc.Sprite": {
|
||||
"spriteFrame": [
|
||||
{
|
||||
"frame": 0,
|
||||
"value": {
|
||||
"__uuid__": "7ceb8a79-f5bf-4918-afa1-d76a85a571b0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.05,
|
||||
"value": {
|
||||
"__uuid__": "23ce7632-8b44-4138-b3b2-3e296ba9184c"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"events": []
|
||||
}
|
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"ver": "2.1.0",
|
||||
"uuid": "488ad635-2683-4884-9e93-d1ee67bd0e49",
|
||||
"subMetas": {}
|
||||
}
|
133
frontend/assets/resources/animation/Monk/BlownUp1.anim
Normal file
@@ -0,0 +1,133 @@
|
||||
{
|
||||
"__type__": "cc.AnimationClip",
|
||||
"_name": "BlownUp1",
|
||||
"_objFlags": 0,
|
||||
"_native": "",
|
||||
"_duration": 0.55,
|
||||
"sample": 60,
|
||||
"speed": 1,
|
||||
"wrapMode": 1,
|
||||
"curveData": {
|
||||
"comps": {
|
||||
"cc.Sprite": {
|
||||
"spriteFrame": [
|
||||
{
|
||||
"frame": 0,
|
||||
"value": {
|
||||
"__uuid__": "ba708108-b18f-4ec0-81f6-0e516e4f832b"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.016666666666666666,
|
||||
"value": {
|
||||
"__uuid__": "aeeaa976-f3b4-4b77-a18b-b08ddd28d812"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.03333333333333333,
|
||||
"value": {
|
||||
"__uuid__": "89d06edf-8838-4ab4-adbd-059acf21dc8c"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.05,
|
||||
"value": {
|
||||
"__uuid__": "c2f38b89-f7a0-477b-921c-f56ee385b737"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.08333333333333333,
|
||||
"value": {
|
||||
"__uuid__": "90186972-a736-449d-8e64-d15c4ebcbfd1"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.11666666666666667,
|
||||
"value": {
|
||||
"__uuid__": "1d64b1f5-5f08-4247-a43c-ffe2d58e09df"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.15,
|
||||
"value": {
|
||||
"__uuid__": "cf158505-bb9c-4836-b45f-2b253dfef117"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.18333333333333332,
|
||||
"value": {
|
||||
"__uuid__": "a2984de9-99db-40bf-9969-0b163a97d9eb"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.21666666666666667,
|
||||
"value": {
|
||||
"__uuid__": "66f0b5dc-4e0e-4597-a7f9-b9ee6752bc98"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.25,
|
||||
"value": {
|
||||
"__uuid__": "3cf0f5bd-0104-4315-a750-55b5fb26e1ec"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.2833333333333333,
|
||||
"value": {
|
||||
"__uuid__": "a31b8683-ca31-4268-80d6-5b117af86ee6"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.31666666666666665,
|
||||
"value": {
|
||||
"__uuid__": "a7ab4cb1-2221-4aba-8ced-dc93d8dca2f3"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.35,
|
||||
"value": {
|
||||
"__uuid__": "2ac3a00d-059a-4e15-a9cb-378bd671c9f3"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.38333333333333336,
|
||||
"value": {
|
||||
"__uuid__": "2b5cab9a-420c-406a-bef4-6aaee4ae6e8f"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.4166666666666667,
|
||||
"value": {
|
||||
"__uuid__": "6df0a35f-062b-49ec-aa73-146f8b2207a7"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.45,
|
||||
"value": {
|
||||
"__uuid__": "afaac620-4293-4336-9a44-bf7927c6751c"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.48333333333333334,
|
||||
"value": {
|
||||
"__uuid__": "410823b3-14e4-475b-b658-dc4d5325f307"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.5166666666666667,
|
||||
"value": {
|
||||
"__uuid__": "34a43c48-497b-4495-97c9-8de53cbcc229"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.5333333333333333,
|
||||
"value": {
|
||||
"__uuid__": "c7ffc314-70ae-4a2b-9238-db1778a336d1"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"events": []
|
||||
}
|
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"ver": "2.1.0",
|
||||
"uuid": "8e17dfc6-68d0-47fe-af06-d30dc2790a6b",
|
||||
"subMetas": {}
|
||||
}
|
61
frontend/assets/resources/animation/Monk/Dashing.anim
Normal file
@@ -0,0 +1,61 @@
|
||||
{
|
||||
"__type__": "cc.AnimationClip",
|
||||
"_name": "Dashing",
|
||||
"_objFlags": 0,
|
||||
"_native": "",
|
||||
"_duration": 0.18333333333333332,
|
||||
"sample": 60,
|
||||
"speed": 1,
|
||||
"wrapMode": 1,
|
||||
"curveData": {
|
||||
"comps": {
|
||||
"cc.Sprite": {
|
||||
"spriteFrame": [
|
||||
{
|
||||
"frame": 0,
|
||||
"value": {
|
||||
"__uuid__": "ec69a078-4153-49e1-9450-656942c2a567"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.016666666666666666,
|
||||
"value": {
|
||||
"__uuid__": "bbf23710-9dc6-4bbb-9565-df8848819d07"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.03333333333333333,
|
||||
"value": {
|
||||
"__uuid__": "cc7b4103-1d6b-44c1-8e0c-ee1c49052837"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.05,
|
||||
"value": {
|
||||
"__uuid__": "90409bfe-7b6c-4eab-953b-ea630585fad4"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.06666666666666667,
|
||||
"value": {
|
||||
"__uuid__": "9614dc2a-9bfe-4b85-9aa6-d7d62feec82b"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.15,
|
||||
"value": {
|
||||
"__uuid__": "c326e3c0-140f-457b-a086-fe95c025d576"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.16666666666666666,
|
||||
"value": {
|
||||
"__uuid__": "8e2d7c5b-452d-44db-b0b4-8ee03b36e7f2"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"events": []
|
||||
}
|
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"ver": "2.1.0",
|
||||
"uuid": "337d57ad-118c-40e2-be90-2aa1505c152b",
|
||||
"subMetas": {}
|
||||
}
|
115
frontend/assets/resources/animation/Monk/Dying.anim
Normal file
@@ -0,0 +1,115 @@
|
||||
{
|
||||
"__type__": "cc.AnimationClip",
|
||||
"_name": "Dying",
|
||||
"_objFlags": 0,
|
||||
"_native": "",
|
||||
"_duration": 0.5333333333333333,
|
||||
"sample": 60,
|
||||
"speed": 1,
|
||||
"wrapMode": 1,
|
||||
"curveData": {
|
||||
"comps": {
|
||||
"cc.Sprite": {
|
||||
"spriteFrame": [
|
||||
{
|
||||
"frame": 0,
|
||||
"value": {
|
||||
"__uuid__": "6d1cd049-7a44-4dcb-9018-4f0fbbf3fdf8"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.03333333333333333,
|
||||
"value": {
|
||||
"__uuid__": "50245b04-bcb1-4488-951c-49944c1037da"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.06666666666666667,
|
||||
"value": {
|
||||
"__uuid__": "7a6721bb-2321-4947-832f-9a317565ea88"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.11666666666666667,
|
||||
"value": {
|
||||
"__uuid__": "c3553a29-e04a-42e2-8b46-82aa85706e26"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.15,
|
||||
"value": {
|
||||
"__uuid__": "e221838e-740f-45b1-8fd5-80d4ab8563c3"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.2,
|
||||
"value": {
|
||||
"__uuid__": "37ebbd1d-9a18-4514-8331-1358a59cab83"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.23333333333333334,
|
||||
"value": {
|
||||
"__uuid__": "b4a9ee91-4315-4fb9-9900-6d763406c81d"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.26666666666666666,
|
||||
"value": {
|
||||
"__uuid__": "e5388e53-5268-4f54-9a93-f6506db5b77b"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.3,
|
||||
"value": {
|
||||
"__uuid__": "078814c3-90e2-4b17-a90b-d2046df9a351"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.3333333333333333,
|
||||
"value": {
|
||||
"__uuid__": "c605bf48-9cc5-41f1-8ace-a273298f7b21"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.38333333333333336,
|
||||
"value": {
|
||||
"__uuid__": "5b5083ca-8fca-4827-9b76-eaa08685b031"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.4166666666666667,
|
||||
"value": {
|
||||
"__uuid__": "b454af6f-9e07-4b34-952b-eca69dc13d5e"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.45,
|
||||
"value": {
|
||||
"__uuid__": "af921d09-a72e-4b48-8585-ba72377ba410"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.48333333333333334,
|
||||
"value": {
|
||||
"__uuid__": "733d339e-ed74-49ab-8955-641d21528fcc"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.5,
|
||||
"value": {
|
||||
"__uuid__": "b7335bea-2985-4331-92c2-08c4c2a5ec86"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.5166666666666667,
|
||||
"value": {
|
||||
"__uuid__": "0ae606ea-93c0-4815-9e24-62c5fb59decc"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"events": []
|
||||
}
|
5
frontend/assets/resources/animation/Monk/Dying.anim.meta
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"ver": "2.1.0",
|
||||
"uuid": "657d4193-2224-44ea-94f7-0305a9f2b322",
|
||||
"subMetas": {}
|
||||
}
|
91
frontend/assets/resources/animation/Monk/GetUp1.anim
Normal file
@@ -0,0 +1,91 @@
|
||||
{
|
||||
"__type__": "cc.AnimationClip",
|
||||
"_name": "GetUp1",
|
||||
"_objFlags": 0,
|
||||
"_native": "",
|
||||
"_duration": 0.5166666666666667,
|
||||
"sample": 60,
|
||||
"speed": 1,
|
||||
"wrapMode": 1,
|
||||
"curveData": {
|
||||
"comps": {
|
||||
"cc.Sprite": {
|
||||
"spriteFrame": [
|
||||
{
|
||||
"frame": 0,
|
||||
"value": {
|
||||
"__uuid__": "ec0d05f4-3c30-4107-b9b4-3ccff5fb9a02"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.03333333333333333,
|
||||
"value": {
|
||||
"__uuid__": "3e0fa075-ffdc-490f-872c-b77e202df224"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.06666666666666667,
|
||||
"value": {
|
||||
"__uuid__": "f3c8e924-c86a-426b-a3de-ffc6e19060f3"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.1,
|
||||
"value": {
|
||||
"__uuid__": "35b847f0-f3f7-4ec9-ba93-5616f763d658"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.13333333333333333,
|
||||
"value": {
|
||||
"__uuid__": "a018eecc-27e6-4d60-973f-ed9fe86a147e"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.18333333333333332,
|
||||
"value": {
|
||||
"__uuid__": "3d70f10e-a3f7-4b7a-aedb-a010ad946abe"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.23333333333333334,
|
||||
"value": {
|
||||
"__uuid__": "b860cb8a-2445-49bc-96f0-aac4396be922"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.2833333333333333,
|
||||
"value": {
|
||||
"__uuid__": "bddec025-747e-4602-9352-6fc3bf921dc0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.3333333333333333,
|
||||
"value": {
|
||||
"__uuid__": "22053496-5240-40d3-98bd-49e16d05f7f9"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.4,
|
||||
"value": {
|
||||
"__uuid__": "9de8f787-3059-403d-bdcb-f7d4bd59ba65"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.45,
|
||||
"value": {
|
||||
"__uuid__": "471de8d2-34ee-4605-b8c5-9f3983db8a04"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.5,
|
||||
"value": {
|
||||
"__uuid__": "a4cb5179-60eb-41f8-bcef-56ce3299da19"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"events": []
|
||||
}
|
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"ver": "2.1.0",
|
||||
"uuid": "da6a7cc1-9709-42f4-b6d0-17c1917a08a3",
|
||||
"subMetas": {}
|
||||
}
|
67
frontend/assets/resources/animation/Monk/Idle1.anim
Normal file
@@ -0,0 +1,67 @@
|
||||
{
|
||||
"__type__": "cc.AnimationClip",
|
||||
"_name": "Idle1",
|
||||
"_objFlags": 0,
|
||||
"_native": "",
|
||||
"_duration": 0.8333333333333334,
|
||||
"sample": 60,
|
||||
"speed": 1,
|
||||
"wrapMode": 2,
|
||||
"curveData": {
|
||||
"comps": {
|
||||
"cc.Sprite": {
|
||||
"spriteFrame": [
|
||||
{
|
||||
"frame": 0,
|
||||
"value": {
|
||||
"__uuid__": "2c5f2d24-01f1-4a0f-8ddc-eacfbc9b6208"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.13333333333333333,
|
||||
"value": {
|
||||
"__uuid__": "fd29846b-1998-49ba-89f6-f665b9ea7002"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.23333333333333334,
|
||||
"value": {
|
||||
"__uuid__": "e3b30506-3a86-462e-b265-e7f6c7c09dc5"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.36666666666666664,
|
||||
"value": {
|
||||
"__uuid__": "84f15682-b73e-443d-8d9f-f530f152bcce"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.5,
|
||||
"value": {
|
||||
"__uuid__": "45249fea-e7e7-4b68-8971-49d825960248"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.6166666666666667,
|
||||
"value": {
|
||||
"__uuid__": "ca561428-9e45-41a9-8d66-c0468d4c85d9"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.7166666666666667,
|
||||
"value": {
|
||||
"__uuid__": "062f3bd5-beca-435a-8d82-524fd51a88a0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.8166666666666667,
|
||||
"value": {
|
||||
"__uuid__": "23068811-a6e5-4ef5-960f-7e6dea328c84"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"events": []
|
||||
}
|
5
frontend/assets/resources/animation/Monk/Idle1.anim.meta
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"ver": "2.1.0",
|
||||
"uuid": "2d402c67-e47d-4de0-8a80-40bc12073ffc",
|
||||
"subMetas": {}
|
||||
}
|
79
frontend/assets/resources/animation/Monk/InAirAtk1.anim
Normal file
@@ -0,0 +1,79 @@
|
||||
{
|
||||
"__type__": "cc.AnimationClip",
|
||||
"_name": "InAirAtk1",
|
||||
"_objFlags": 0,
|
||||
"_native": "",
|
||||
"_duration": 0.6,
|
||||
"sample": 60,
|
||||
"speed": 1,
|
||||
"wrapMode": 1,
|
||||
"curveData": {
|
||||
"comps": {
|
||||
"cc.Sprite": {
|
||||
"spriteFrame": [
|
||||
{
|
||||
"frame": 0,
|
||||
"value": {
|
||||
"__uuid__": "70adb814-3dca-492f-a0fe-36d4d6b37e01"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.06666666666666667,
|
||||
"value": {
|
||||
"__uuid__": "7c67ab61-96e0-4c43-a2d8-742fa1021107"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.15,
|
||||
"value": {
|
||||
"__uuid__": "beb4bc62-b6bf-4a07-973e-1b91e3942ab3"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.21666666666666667,
|
||||
"value": {
|
||||
"__uuid__": "422441bd-8551-46d3-9383-162553035080"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.3,
|
||||
"value": {
|
||||
"__uuid__": "312f8dd2-7d02-4a80-a960-17d197c96da4"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.35,
|
||||
"value": {
|
||||
"__uuid__": "42597d6a-b982-43aa-90bd-2e9a01063628"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.4,
|
||||
"value": {
|
||||
"__uuid__": "487b65c3-44e3-4b0e-9350-e0d1c952785b"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.4166666666666667,
|
||||
"value": {
|
||||
"__uuid__": "9a5357ae-a160-4198-a6d5-cc9631fde754"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.5333333333333333,
|
||||
"value": {
|
||||
"__uuid__": "d08fc3b2-f6e8-4ff8-bba4-69ce3eb771df"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.5833333333333334,
|
||||
"value": {
|
||||
"__uuid__": "9f8ef3e0-6f56-41d2-97d1-ac7f3cc690ee"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"events": []
|
||||
}
|
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"ver": "2.1.0",
|
||||
"uuid": "5035ddfe-ff75-4dff-a506-89cbb26220da",
|
||||
"subMetas": {}
|
||||
}
|
49
frontend/assets/resources/animation/Monk/InAirAtked1.anim
Normal file
@@ -0,0 +1,49 @@
|
||||
{
|
||||
"__type__": "cc.AnimationClip",
|
||||
"_name": "InAirAtked1",
|
||||
"_objFlags": 0,
|
||||
"_native": "",
|
||||
"_duration": 0.25,
|
||||
"sample": 60,
|
||||
"speed": 1,
|
||||
"wrapMode": 1,
|
||||
"curveData": {
|
||||
"comps": {
|
||||
"cc.Sprite": {
|
||||
"spriteFrame": [
|
||||
{
|
||||
"frame": 0,
|
||||
"value": {
|
||||
"__uuid__": "39c94369-a78d-459d-9305-13a2b9c15225"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.05,
|
||||
"value": {
|
||||
"__uuid__": "c85b7940-7bb2-4597-a309-155b7a116f94"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.11666666666666667,
|
||||
"value": {
|
||||
"__uuid__": "78f498f8-6517-4e28-91f9-b70ee87beff9"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.18333333333333332,
|
||||
"value": {
|
||||
"__uuid__": "02247899-3345-411a-aaa3-65e2f5e0b3e6"
|
||||
}
|
||||
},
|
||||
{
|
||||
"frame": 0.23333333333333334,
|
||||
"value": {
|
||||
"__uuid__": "bec5291d-8f6e-426c-8e16-1d0239a69bad"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"events": []
|
||||
}
|
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"ver": "2.1.0",
|
||||
"uuid": "ac0fa38d-d3ad-4dff-841d-4d98ee5017db",
|
||||
"subMetas": {}
|
||||
}
|