mirror of
https://github.com/Alex-Rachel/TEngine.git
synced 2025-08-14 16:51:28 +00:00
Compare commits
719 Commits
TEngine1.2
...
TEngine3.1
Author | SHA1 | Date | |
---|---|---|---|
![]() |
04a43a3f11 | ||
![]() |
54214cdd0b | ||
![]() |
fa870b6228 | ||
![]() |
8a49d3437b | ||
![]() |
f19b889deb | ||
![]() |
d55f6e29d9 | ||
![]() |
8e4af31f26 | ||
![]() |
58a4b3e043 | ||
![]() |
576bf3bb48 | ||
![]() |
d282b81546 | ||
![]() |
d6dcd8851c | ||
![]() |
bbea9c4cee | ||
![]() |
b1ccb1fd53 | ||
![]() |
0f2ad3c71d | ||
![]() |
0e6851e691 | ||
![]() |
75b9956261 | ||
![]() |
401c397fc8 | ||
![]() |
94b314e91f | ||
![]() |
a6573d9336 | ||
![]() |
abf5357f49 | ||
![]() |
aab353cca3 | ||
![]() |
e13071c4db | ||
![]() |
e071c20214 | ||
![]() |
bf73ce333b | ||
![]() |
d7a60002d4 | ||
![]() |
61f657322d | ||
![]() |
33223dc02e | ||
![]() |
0661c59877 | ||
![]() |
7c74e10857 | ||
![]() |
db935bfb5f | ||
![]() |
dc6b7bb21e | ||
![]() |
d32f3cb768 | ||
![]() |
a32ab30444 | ||
![]() |
aa0d40c758 | ||
![]() |
5239b89326 | ||
![]() |
53f0ecb6c1 | ||
![]() |
ea9447d0ea | ||
![]() |
0c6d59f53e | ||
![]() |
9986e22d18 | ||
![]() |
7deb049769 | ||
![]() |
fce8bd4d60 | ||
![]() |
7ec14c670f | ||
![]() |
efe3d2b25b | ||
![]() |
2107282368 | ||
![]() |
fb26ea2297 | ||
![]() |
9ac150425f | ||
![]() |
36d2c146b0 | ||
![]() |
774b73bbbf | ||
![]() |
32366eb127 | ||
![]() |
a843617e5f | ||
![]() |
46b139f7cf | ||
![]() |
e6ff1dec3f | ||
![]() |
4429732010 | ||
![]() |
60a5caebae | ||
![]() |
f7c95d8216 | ||
![]() |
98dcb80942 | ||
![]() |
30192d52cf | ||
![]() |
b7b2262d53 | ||
![]() |
d1c93f15d6 | ||
![]() |
1ac1ff7d56 | ||
![]() |
863788f303 | ||
![]() |
74790c7486 | ||
![]() |
1c223c8ad0 | ||
![]() |
e75b3a4e66 | ||
![]() |
91b0995911 | ||
![]() |
14c886ea8f | ||
![]() |
9babc0ba85 | ||
![]() |
f8056aef32 | ||
![]() |
846dc4d4bc | ||
![]() |
03ab7fb353 | ||
![]() |
3c11980e7c | ||
![]() |
c23aa0bd71 | ||
![]() |
df76d0b77a | ||
![]() |
35d2012546 | ||
![]() |
c96d20a89a | ||
![]() |
5787d0f9dc | ||
![]() |
8b35c8ca07 | ||
![]() |
e5456da482 | ||
![]() |
144ba9f222 | ||
![]() |
889fbdc8e1 | ||
![]() |
0d177e6868 | ||
![]() |
29135228be | ||
![]() |
c1a1de73cd | ||
![]() |
612e9b7eba | ||
![]() |
5ed6b8c378 | ||
![]() |
06dad5a68a | ||
![]() |
9e0462043c | ||
![]() |
c1178e284b | ||
![]() |
8e3dd138a6 | ||
![]() |
405253c507 | ||
![]() |
66ef50a9e0 | ||
![]() |
413f4dcda7 | ||
![]() |
75fdb4d7de | ||
![]() |
1ada1e4e33 | ||
![]() |
3848b6aaaa | ||
![]() |
2b33b405c0 | ||
![]() |
6766b930d7 | ||
![]() |
526baf45fa | ||
![]() |
a473971cfb | ||
![]() |
51effd2c97 | ||
![]() |
4205220b64 | ||
![]() |
e95c18ca67 | ||
![]() |
f5571716a2 | ||
![]() |
d61a8dfa4b | ||
![]() |
068ec709d0 | ||
![]() |
8b26b790ee | ||
![]() |
da35b4306b | ||
![]() |
ee2147e3d9 | ||
![]() |
a273e9d5f8 | ||
![]() |
31d4d6c0b8 | ||
![]() |
6a6f0591f1 | ||
![]() |
9cd0bac81e | ||
![]() |
4abe10eecf | ||
![]() |
bd10297dfa | ||
![]() |
7ce72b8aa8 | ||
![]() |
c6ecb48944 | ||
![]() |
c178f8bb75 | ||
![]() |
d4f160d284 | ||
![]() |
d87653a9fb | ||
![]() |
04a5a0e048 | ||
![]() |
c825f4d920 | ||
![]() |
b3e59b92d6 | ||
![]() |
37af620d71 | ||
![]() |
493172a925 | ||
![]() |
1382db8c61 | ||
![]() |
72b7149aa1 | ||
![]() |
0c51ae7bdd | ||
![]() |
79dc302f14 | ||
![]() |
95e4dd93a8 | ||
![]() |
2b310c00f2 | ||
![]() |
fbb26ea9ea | ||
![]() |
bff8f20af3 | ||
![]() |
0c7ce5f28c | ||
![]() |
31fc9abdf9 | ||
![]() |
a087f40e8a | ||
![]() |
7b2fc7ce9f | ||
![]() |
dc4bb8cc9c | ||
![]() |
0c8f3a5f92 | ||
![]() |
a69f53592e | ||
![]() |
8757e1f550 | ||
![]() |
336d4b2eb9 | ||
![]() |
e0be062006 | ||
![]() |
5e69129667 | ||
![]() |
4c39ab79ca | ||
![]() |
a710d1cb76 | ||
![]() |
8472839394 | ||
![]() |
4988c99d31 | ||
![]() |
4fa62b2d79 | ||
![]() |
f549514d7c | ||
![]() |
f588038848 | ||
![]() |
9e0e3ebd50 | ||
![]() |
b07ef836a9 | ||
![]() |
7a1d593195 | ||
![]() |
bc113c5c6e | ||
![]() |
753bbdfb82 | ||
![]() |
6a6d33c536 | ||
![]() |
57a014a83a | ||
![]() |
9d1a8e8c9d | ||
![]() |
86c26cd21b | ||
![]() |
b60b9fff42 | ||
![]() |
990e17a6cc | ||
![]() |
be531bfad0 | ||
![]() |
6c46f3e5fd | ||
![]() |
e4b48e3c58 | ||
![]() |
68e5b1d482 | ||
![]() |
abd152b072 | ||
![]() |
470e62d9c4 | ||
![]() |
481b5911ab | ||
![]() |
05d3aff05e | ||
![]() |
86bb6353dc | ||
![]() |
334698b6e6 | ||
![]() |
2684bd29f5 | ||
![]() |
c568c62404 | ||
![]() |
699ccb3b09 | ||
![]() |
f92bf5c602 | ||
![]() |
cd87c71281 | ||
![]() |
94c137b3c6 | ||
![]() |
120a86b396 | ||
![]() |
383dc50fe3 | ||
![]() |
2369e8723c | ||
![]() |
344f3293ad | ||
![]() |
5d361dd188 | ||
![]() |
a2f7fe907a | ||
![]() |
5b3f64689f | ||
![]() |
2258c13892 | ||
![]() |
a70d2e7d17 | ||
![]() |
b15f51631a | ||
![]() |
da12bd7cab | ||
![]() |
98bcaef6b7 | ||
![]() |
71d1286144 | ||
![]() |
9359a81a96 | ||
![]() |
a9542646c1 | ||
![]() |
0890ca9bdb | ||
![]() |
ec409c7e15 | ||
![]() |
4bc63fafc8 | ||
![]() |
fe0f9afd6d | ||
![]() |
4632a0c099 | ||
![]() |
60e57bb80b | ||
![]() |
b7c79d0438 | ||
![]() |
62b7c9e4d6 | ||
![]() |
75a6977afb | ||
![]() |
659da836ac | ||
![]() |
07c459051f | ||
![]() |
4253a81e78 | ||
![]() |
e498abacd1 | ||
![]() |
f16759483f | ||
![]() |
899472a5db | ||
![]() |
e65245371a | ||
![]() |
b04fff4ec9 | ||
![]() |
d8f8fd01d9 | ||
![]() |
9b1c5e6f0a | ||
![]() |
b2b5c9274c | ||
![]() |
b814d689d8 | ||
![]() |
ca6de42d67 | ||
![]() |
c3e9b76fd6 | ||
![]() |
dca7b71457 | ||
![]() |
7106454dfb | ||
![]() |
b97e24aa6d | ||
![]() |
bec4cba501 | ||
![]() |
0568d5f8b2 | ||
![]() |
49db48e7fc | ||
![]() |
92fc5e0bcd | ||
![]() |
11391e597e | ||
![]() |
6b64f3b261 | ||
![]() |
dff6ba4e6d | ||
![]() |
036c89a6d1 | ||
![]() |
fd7d8a798b | ||
![]() |
4db89019dd | ||
![]() |
de0d4e58a5 | ||
![]() |
d64a7d6777 | ||
![]() |
0c32dad70b | ||
![]() |
c44c3e8c67 | ||
![]() |
dfc8b5eb8f | ||
![]() |
80f004c942 | ||
![]() |
da11c0915f | ||
![]() |
fdc526cfca | ||
![]() |
73b3ae6527 | ||
![]() |
0ce268aaf6 | ||
![]() |
c7ff2de374 | ||
![]() |
050003bd7b | ||
![]() |
43c49aabbb | ||
![]() |
29985b819e | ||
![]() |
5a07650f73 | ||
![]() |
fd199e344a | ||
![]() |
a827e501f2 | ||
![]() |
35f7c9309c | ||
![]() |
d8149dc743 | ||
![]() |
ec357fa5fb | ||
![]() |
1c2dec1381 | ||
![]() |
30ad711907 | ||
![]() |
3be06cac21 | ||
![]() |
22ead28974 | ||
![]() |
c40391a65b | ||
![]() |
5c7223213b | ||
![]() |
699930f6e8 | ||
![]() |
026a1f458c | ||
![]() |
6fddedf0b2 | ||
![]() |
e88d54e63f | ||
![]() |
6a04371045 | ||
![]() |
0f51878471 | ||
![]() |
8cab13da79 | ||
![]() |
9c110e23a6 | ||
![]() |
1ee6dc2611 | ||
![]() |
a602633c9b | ||
![]() |
f32d42db62 | ||
![]() |
eac9d4a68e | ||
![]() |
e7c2fb6938 | ||
![]() |
4b7fed2745 | ||
![]() |
02c3055e11 | ||
![]() |
2f76cc012c | ||
![]() |
9016dd9e61 | ||
![]() |
878a05b614 | ||
![]() |
25e2617782 | ||
![]() |
de1558680c | ||
![]() |
079ff980a3 | ||
![]() |
edc83c8989 | ||
![]() |
80c4676430 | ||
![]() |
53ffc64699 | ||
![]() |
c072b82239 | ||
![]() |
598f1ef36b | ||
![]() |
991dddfdae | ||
![]() |
11fe2a8d18 | ||
![]() |
1992f4cda4 | ||
![]() |
5fb16b442e | ||
![]() |
ece41a730e | ||
![]() |
12105f649a | ||
![]() |
fd728d037c | ||
![]() |
23ee21162f | ||
![]() |
4634de28d7 | ||
![]() |
ef507c383d | ||
![]() |
9423fdc193 | ||
![]() |
c7b25e4781 | ||
![]() |
2ec2546230 | ||
![]() |
0815a30f83 | ||
![]() |
27549f11b2 | ||
![]() |
713661417b | ||
![]() |
906ec80904 | ||
![]() |
455c700953 | ||
![]() |
007b136724 | ||
![]() |
6aaec0599b | ||
![]() |
8549179a43 | ||
![]() |
7b239ee4da | ||
![]() |
f32159f19c | ||
![]() |
3196cf3b5e | ||
![]() |
b59139b94a | ||
![]() |
2a15db0690 | ||
![]() |
f3691e2145 | ||
![]() |
da39314f34 | ||
![]() |
6ea42a28cd | ||
![]() |
cd99f15374 | ||
![]() |
0e43421606 | ||
![]() |
64e39673d3 | ||
![]() |
d839808bce | ||
![]() |
2e1bbee994 | ||
![]() |
373a06bfd5 | ||
![]() |
4996dba84a | ||
![]() |
95afaa2a4d | ||
![]() |
d204675bd6 | ||
![]() |
9e4a2b34da | ||
![]() |
d3272e1bb1 | ||
![]() |
7db0d3fcc4 | ||
![]() |
293ea2e128 | ||
![]() |
9f187109a5 | ||
![]() |
1c0a570d74 | ||
![]() |
621a315eec | ||
![]() |
4db58f507d | ||
![]() |
89b5bc21ee | ||
![]() |
6320e75e7c | ||
![]() |
02d4e6686c | ||
![]() |
0c564f8571 | ||
![]() |
c4c345c5f7 | ||
![]() |
bf1d71d0f9 | ||
![]() |
9f6f314ac9 | ||
![]() |
a8588114b0 | ||
![]() |
4d35e61614 | ||
![]() |
03e58b921f | ||
![]() |
3228aed4db | ||
![]() |
aa3cf05f4a | ||
![]() |
d1fdedaaac | ||
![]() |
b79fe23229 | ||
![]() |
2de3fd2a1d | ||
![]() |
1328f71c9e | ||
![]() |
ab532c73d7 | ||
![]() |
3f67b27e45 | ||
![]() |
a285a635b9 | ||
![]() |
08c2ff4dcc | ||
![]() |
e0b42d3dbe | ||
![]() |
688b76b745 | ||
![]() |
8f972f9340 | ||
![]() |
ac25925406 | ||
![]() |
a5f0c395f0 | ||
![]() |
4bdea1d7ce | ||
![]() |
4c46af709a | ||
![]() |
8531332df1 | ||
![]() |
db619e6b6b | ||
![]() |
f628380347 | ||
![]() |
71cf223426 | ||
![]() |
e9ecdf2d16 | ||
![]() |
506f2835be | ||
![]() |
90c22db2d2 | ||
![]() |
72ffc58030 | ||
![]() |
f3663947cf | ||
![]() |
d5eced7471 | ||
![]() |
6b8d88fe67 | ||
![]() |
b50ef83c4f | ||
![]() |
8b03807dae | ||
![]() |
3e67aeb455 | ||
![]() |
2a1217558a | ||
![]() |
1957e30210 | ||
![]() |
77af3ac457 | ||
![]() |
c9016bf72e | ||
![]() |
c4df46eb57 | ||
![]() |
0dd2716c8e | ||
![]() |
17c4b9a05f | ||
![]() |
18770e55d5 | ||
![]() |
30f425ada2 | ||
![]() |
977eeb6fef | ||
![]() |
cdc9d5c99d | ||
![]() |
31d9834387 | ||
![]() |
a31646a2ec | ||
![]() |
cb2b9331cf | ||
![]() |
2caa6e686e | ||
![]() |
54c545b1eb | ||
![]() |
f8f9d999a8 | ||
![]() |
57ddbdb20b | ||
![]() |
786c2b319c | ||
![]() |
6ba385d59e | ||
![]() |
ef8fe7f3a0 | ||
![]() |
b9b132d778 | ||
![]() |
663c1342f7 | ||
![]() |
b791c1a44d | ||
![]() |
14abeb2427 | ||
![]() |
508607a87b | ||
![]() |
ec8fb24256 | ||
![]() |
cc5654b9ed | ||
![]() |
f1c8a91660 | ||
![]() |
2fcd02d69e | ||
![]() |
4f908d46af | ||
![]() |
91fff462cb | ||
![]() |
7c0d24cd2d | ||
![]() |
ec25b314e0 | ||
![]() |
c850ec359c | ||
![]() |
ec17437782 | ||
![]() |
069c5b93e0 | ||
![]() |
385d789c96 | ||
![]() |
db5985a236 | ||
![]() |
05a589e958 | ||
![]() |
65a0323e6e | ||
![]() |
e1afc4bd67 | ||
![]() |
d5826551b4 | ||
![]() |
4db704930d | ||
![]() |
4c78b70293 | ||
![]() |
c4a6efc1ca | ||
![]() |
6192b99bb1 | ||
![]() |
d8ff81d61f | ||
![]() |
366ff5c127 | ||
![]() |
b4afdb112a | ||
![]() |
2f194bbb4a | ||
![]() |
a6f3514665 | ||
![]() |
6cccf0b80f | ||
![]() |
8b1880b4fb | ||
![]() |
979a2039cf | ||
![]() |
323d05c53f | ||
![]() |
218348a836 | ||
![]() |
611f1ffab9 | ||
![]() |
3c908a7955 | ||
![]() |
f8365525cb | ||
![]() |
7cabdfeb7b | ||
![]() |
529dc232ee | ||
![]() |
76d9e82d69 | ||
![]() |
112aba9aca | ||
![]() |
744fcdee22 | ||
![]() |
7eaa932984 | ||
![]() |
db2ee2cd77 | ||
![]() |
46804603b7 | ||
![]() |
14356bbaf0 | ||
![]() |
7cb4d9ecf9 | ||
![]() |
be0fd4de1b | ||
![]() |
033cd12bc8 | ||
![]() |
c98cef4e1e | ||
![]() |
52f8a4f03f | ||
![]() |
264626c7dd | ||
![]() |
2d52b1683b | ||
![]() |
33264e6526 | ||
![]() |
2800f42acd | ||
![]() |
9f271036fd | ||
![]() |
3c02e1bc2a | ||
![]() |
1a0cd4b68d | ||
![]() |
9d6225b71b | ||
![]() |
6f22fb2177 | ||
![]() |
8061a124f3 | ||
![]() |
20f7451766 | ||
![]() |
fa634c47f9 | ||
![]() |
4953a46118 | ||
![]() |
fe69c18b4e | ||
![]() |
7a80f79b16 | ||
![]() |
3744860ef6 | ||
![]() |
8d1078cb91 | ||
![]() |
1766500f7c | ||
![]() |
51254bba57 | ||
![]() |
a6958f39e7 | ||
![]() |
7bc055dd00 | ||
![]() |
71816b04c7 | ||
![]() |
b5d76e1f22 | ||
![]() |
74ae3fb349 | ||
![]() |
402a35bfc2 | ||
![]() |
52f7e1bd60 | ||
![]() |
75594e3680 | ||
![]() |
21d2a96d51 | ||
![]() |
9d70c9d3fd | ||
![]() |
df97407c5f | ||
![]() |
a1f1af1b86 | ||
![]() |
6e0785623d | ||
![]() |
4e2b3756c9 | ||
![]() |
9ac5c4e172 | ||
![]() |
5dc6243d56 | ||
![]() |
00ba79baf0 | ||
![]() |
8da93ff447 | ||
![]() |
c99500f723 | ||
![]() |
280bca87fb | ||
![]() |
50a6181718 | ||
![]() |
749ae956d3 | ||
![]() |
2e0d7731b9 | ||
![]() |
db25782920 | ||
![]() |
c1e543d3d9 | ||
![]() |
30ab1fbbff | ||
![]() |
687e767e02 | ||
![]() |
aa694767af | ||
![]() |
5a663298a6 | ||
![]() |
0d27f784f4 | ||
![]() |
3ccc030cba | ||
![]() |
406d71ab2b | ||
![]() |
bd68a143c5 | ||
![]() |
51b2eaf6b4 | ||
![]() |
7d9c5eac69 | ||
![]() |
063c96b3f0 | ||
![]() |
447a0532d2 | ||
![]() |
1c8b3c1081 | ||
![]() |
86615c3a8c | ||
![]() |
b2068655aa | ||
![]() |
48724e4bde | ||
![]() |
3809da762c | ||
![]() |
af825a860e | ||
![]() |
3366a692ed | ||
![]() |
4519a3bad0 | ||
![]() |
3ad9323e9b | ||
![]() |
ecfde4d3a8 | ||
![]() |
1660c53035 | ||
![]() |
04a646d330 | ||
![]() |
9375c0acec | ||
![]() |
8adeb50f31 | ||
![]() |
714d6ffc56 | ||
![]() |
6014793f75 | ||
![]() |
1bda5c7d8e | ||
![]() |
d058043ac6 | ||
![]() |
ba7b635bd1 | ||
![]() |
ee9fb75407 | ||
![]() |
aa09ecd176 | ||
![]() |
2dd29a1328 | ||
![]() |
5d83df6b29 | ||
![]() |
774b48849c | ||
![]() |
a8ebc5dd31 | ||
![]() |
08e28edacc | ||
![]() |
fd2bc3e2b1 | ||
![]() |
8b164173ac | ||
![]() |
890723d4c9 | ||
![]() |
a6069af417 | ||
![]() |
9b041b2dc7 | ||
![]() |
41a0243d91 | ||
![]() |
6fbe17d7d5 | ||
![]() |
3f22fb72ee | ||
![]() |
aa6455f23e | ||
![]() |
3d13d5c8e5 | ||
![]() |
469a6287cf | ||
![]() |
7ef52245ac | ||
![]() |
99ff4a443f | ||
![]() |
cbf145c5cd | ||
![]() |
12712870d6 | ||
![]() |
2c1b9a8743 | ||
![]() |
0b4f17d2c8 | ||
![]() |
505354f82d | ||
![]() |
eb153270a1 | ||
![]() |
b0559ec6be | ||
![]() |
0dca33f123 | ||
![]() |
b0e33b3c3a | ||
![]() |
0c401e4713 | ||
![]() |
8d547ee4de | ||
![]() |
2a91275eea | ||
![]() |
172b0d55e8 | ||
![]() |
212f4192ac | ||
![]() |
db425ff58a | ||
![]() |
aeed0f9230 | ||
![]() |
5e86bc279e | ||
![]() |
933785205d | ||
![]() |
f571605b9a | ||
![]() |
aeb1ff29f3 | ||
![]() |
2213588713 | ||
![]() |
d2e940248a | ||
![]() |
7067dcc8e6 | ||
![]() |
7768727ab1 | ||
![]() |
090cf7433a | ||
![]() |
90a2398105 | ||
![]() |
aff27b7e5d | ||
![]() |
8dbecb3f33 | ||
![]() |
75f6c670ac | ||
![]() |
0fc4fabdba | ||
![]() |
020f538e79 | ||
![]() |
1c393ae1e4 | ||
![]() |
17fe247cb8 | ||
![]() |
2df234e999 | ||
![]() |
717ecfed07 | ||
![]() |
36353294d6 | ||
![]() |
179765c43c | ||
![]() |
bc5f12ed88 | ||
![]() |
1edbfcc086 | ||
![]() |
f1bd8e4a5f | ||
![]() |
3dafe7ec45 | ||
![]() |
74092e6399 | ||
![]() |
2e175fbcac | ||
![]() |
54ff5fab41 | ||
![]() |
3146dfdc73 | ||
![]() |
94be77bec5 | ||
![]() |
5186b2f8fc | ||
![]() |
6eb4f25137 | ||
![]() |
a3d4b39443 | ||
![]() |
9195856bb9 | ||
![]() |
06d60c35f5 | ||
![]() |
7f919f1bd4 | ||
![]() |
c7478134f4 | ||
![]() |
e3b78989cd | ||
![]() |
0af3e8facc | ||
![]() |
f0af27bde6 | ||
![]() |
9bf3a97050 | ||
![]() |
d9b8e75fbb | ||
![]() |
5e85b546f3 | ||
![]() |
44ef66fc39 | ||
![]() |
eac570dd74 | ||
![]() |
8f8101e566 | ||
![]() |
28d480b07d | ||
![]() |
bd5bb60680 | ||
![]() |
49c9ee4e97 | ||
![]() |
bdd4a1cff7 | ||
![]() |
eb19b04cee | ||
![]() |
f121d83fbe | ||
![]() |
50d9ca28d0 | ||
![]() |
b8421a393e | ||
![]() |
b4eb10cc50 | ||
![]() |
3aedadc060 | ||
![]() |
7f33bd76f7 | ||
![]() |
9f14200da7 | ||
![]() |
f775c2abfb | ||
![]() |
a23f74c2f9 | ||
![]() |
752cf4bad6 | ||
![]() |
87e502ed21 | ||
![]() |
82c76052c2 | ||
![]() |
2c9a77e346 | ||
![]() |
a2cc78cf52 | ||
![]() |
818bd8eafd | ||
![]() |
a35830a912 | ||
![]() |
d7ca31596d | ||
![]() |
f3e0b46fe7 | ||
![]() |
38aa170529 | ||
![]() |
642eab2849 | ||
![]() |
af7ff8749b | ||
![]() |
3a4e40e53d | ||
![]() |
f0c9ec2000 | ||
![]() |
8b84530d0e | ||
![]() |
f25015ec39 | ||
![]() |
625167430d | ||
![]() |
7c5641a860 | ||
![]() |
adfe06bc04 | ||
![]() |
20e0de606b | ||
![]() |
511abf0a87 | ||
![]() |
b7cad18b16 | ||
![]() |
9c22db2b7a | ||
![]() |
6f3808a97e | ||
![]() |
196d2b0666 | ||
![]() |
1a9ab2d78c | ||
![]() |
219649e684 | ||
![]() |
0766482fab | ||
![]() |
455e57b435 | ||
![]() |
092de9937c | ||
![]() |
f27cfa2158 | ||
![]() |
4a6cf28df3 | ||
![]() |
a0d811ee16 | ||
![]() |
cddb45b654 | ||
![]() |
7f3b8efbd8 | ||
![]() |
4bd5cb4f08 | ||
![]() |
284c16a4d7 | ||
![]() |
5bfa23bcf9 | ||
![]() |
73007437ac | ||
![]() |
6bb7dcc672 | ||
![]() |
1a6b17cd5f | ||
![]() |
0236a79da4 | ||
![]() |
4af929beb6 | ||
![]() |
b0119b711c | ||
![]() |
fee3e475f0 | ||
![]() |
fb668bfb48 | ||
![]() |
d85e49e923 | ||
![]() |
c2f0e03c80 | ||
![]() |
a2503421b8 | ||
![]() |
af96cd0649 | ||
![]() |
610e1e847f | ||
![]() |
e1a0f851f2 | ||
![]() |
acd7b09320 | ||
![]() |
d0b18aebfe | ||
![]() |
c6691d9e2f | ||
![]() |
5f6054c986 | ||
![]() |
adc2cbd3db | ||
![]() |
3d7c49a94a | ||
![]() |
b9e68ed948 | ||
![]() |
6d38c5ae68 | ||
![]() |
5223d4f936 | ||
![]() |
f72821443c | ||
![]() |
789341701a | ||
![]() |
63d3817dde | ||
![]() |
13c2e53693 | ||
![]() |
6765125f25 | ||
![]() |
4368c0a2b8 | ||
![]() |
5fc0015144 | ||
![]() |
8c1c3b7291 | ||
![]() |
f5e783a42c | ||
![]() |
7158915169 | ||
![]() |
ce1eab346b | ||
![]() |
793b9e8b36 | ||
![]() |
a3fde33dfc | ||
![]() |
2c7367fab7 | ||
![]() |
8e563e4877 | ||
![]() |
baa26dba51 | ||
![]() |
702e29177e | ||
![]() |
072a117643 | ||
![]() |
052d81e039 | ||
![]() |
9640b55a79 | ||
![]() |
d89ebf85b1 | ||
![]() |
7302010182 | ||
![]() |
6b096d5ade | ||
![]() |
41dc431897 | ||
![]() |
8983c52b59 | ||
![]() |
776b84adc2 | ||
![]() |
158d6a1cd8 | ||
![]() |
50aec0cb06 | ||
![]() |
edf32a6fcd | ||
![]() |
a9b6466334 | ||
![]() |
ed4a75011f | ||
![]() |
2a920fcb36 | ||
![]() |
d2806b3c0c | ||
![]() |
dc0b132bf1 | ||
![]() |
cd18e98a8b | ||
![]() |
a12ee7699e | ||
![]() |
8be2dc5ec3 | ||
![]() |
0c6aa88ac5 | ||
![]() |
de58febd79 | ||
![]() |
9d53c68de6 | ||
![]() |
6bdb44abc8 | ||
![]() |
54d7a4558c | ||
![]() |
d1bf852371 | ||
![]() |
e614be853f | ||
![]() |
40bc2d3491 | ||
![]() |
cc908c2b99 |
65
.gitignore
vendored
65
.gitignore
vendored
@@ -13,7 +13,8 @@
|
||||
# /[Aa]ssets/TResources/DLL/
|
||||
/[Aa]ssets/StreamingAssets
|
||||
/BuildBundleInfo/
|
||||
/[Aa]ssets/AATest/
|
||||
[Aa]ssets/AATest/
|
||||
[Aa]ssets/AATest.meta
|
||||
|
||||
# Asset meta data should only be ignored when the corresponding asset is also ignored
|
||||
!/[Aa]ssets/**/*.meta
|
||||
@@ -62,8 +63,8 @@ sysinfo.txt
|
||||
# Crashlytics generated file
|
||||
crashlytics-build.properties
|
||||
|
||||
# Log
|
||||
TEnginePersistentDataPath/Log
|
||||
# TEnginePersistentDataPath
|
||||
TEnginePersistentDataPath/
|
||||
|
||||
# Hotfix
|
||||
TEngineHotUpdate/bin
|
||||
@@ -71,3 +72,61 @@ TEngineHotUpdate/obj
|
||||
|
||||
#HybirdCLR(HuaTuo)
|
||||
/HybirdCLRData/
|
||||
[Hh]ybridCLRData/
|
||||
|
||||
|
||||
#AATemp
|
||||
[Aa]ssets/AATemp/
|
||||
[Aa]ssets/AATemp.meta
|
||||
|
||||
#Rider
|
||||
/.idea/
|
||||
|
||||
# ABConfig
|
||||
[Aa]ssets/BuildConfig/
|
||||
[Aa]ssets/BuildConfig.meta
|
||||
|
||||
[Aa]ssets/StreamingAssets/
|
||||
[Aa]ssets/StreamingAssets.meta
|
||||
Assets/HybridCLRBuildCache/AssetBundleOutput.meta
|
||||
Assets/HybridCLRBuildCache/AssetBundleOutput/StandaloneWindows.meta
|
||||
Assets/HybridCLRBuildCache.meta
|
||||
Assets/HybridCLRBuildCache/AssetBundleSourceData.meta
|
||||
Assets/HybridCLRBuildCache/AssetBundleSourceData/StandaloneWindows.meta
|
||||
|
||||
#Bundles
|
||||
Bundles/
|
||||
|
||||
#Sandbox
|
||||
Sandbox/
|
||||
|
||||
#Luban
|
||||
Luban/.cache.meta
|
||||
GenerateDatas/
|
||||
|
||||
#HybridCLR
|
||||
Assets/HybridCLRData.meta
|
||||
UserSettings/Search.settings
|
||||
|
||||
#Unity UserSettings
|
||||
UserSettings/Search.index
|
||||
UserSettings/Layouts/default-2021.dwlt
|
||||
|
||||
#UnityOnlineServiceData
|
||||
Assets/UnityOnlineServiceData.meta
|
||||
Assets/UnityOnlineServiceData
|
||||
|
||||
#MAC
|
||||
.DS_Store
|
||||
|
||||
#Server_sln
|
||||
DotNet/.idea/
|
||||
DotNet/App/obj/
|
||||
DotNet/Core/obj/
|
||||
DotNet/Logic/obj/
|
||||
DotNet/ThirdParty/obj/
|
||||
|
||||
Bin/
|
||||
|
||||
#Server_Config
|
||||
DotNet/Config/GameConfig
|
8
Assets/AssetRaw.meta
Normal file
8
Assets/AssetRaw.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ff3591c28885e0947b42ef41853b14b6
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
8
Assets/AssetRaw/Actor.meta
Normal file
8
Assets/AssetRaw/Actor.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9c67ce0c9edfd4e4aa1006ee39846d66
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
8
Assets/AssetRaw/Audios.meta
Normal file
8
Assets/AssetRaw/Audios.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8ef7a411b66e70f4cb65c2233c9a0868
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
8
Assets/AssetRaw/Configs.meta
Normal file
8
Assets/AssetRaw/Configs.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: dd2928019aef34248af368b99bc53bea
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
1
Assets/AssetRaw/Configs/about.txt
Normal file
1
Assets/AssetRaw/Configs/about.txt
Normal file
@@ -0,0 +1 @@
|
||||
Powered by TEngine @alex
|
7
Assets/AssetRaw/Configs/about.txt.meta
Normal file
7
Assets/AssetRaw/Configs/about.txt.meta
Normal file
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ba11f0707eb5f814392cbf12498aba94
|
||||
TextScriptImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
8
Assets/AssetRaw/Configs/bidx.meta
Normal file
8
Assets/AssetRaw/Configs/bidx.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6a824de3af698c34bb4343dbb911498b
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
8
Assets/AssetRaw/Configs/bytes.meta
Normal file
8
Assets/AssetRaw/Configs/bytes.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: afddbfe87a53e9049bf031ee18842f87
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
BIN
Assets/AssetRaw/Configs/bytes/battle_tbbuff.bytes
Normal file
BIN
Assets/AssetRaw/Configs/bytes/battle_tbbuff.bytes
Normal file
Binary file not shown.
7
Assets/AssetRaw/Configs/bytes/battle_tbbuff.bytes.meta
Normal file
7
Assets/AssetRaw/Configs/bytes/battle_tbbuff.bytes.meta
Normal file
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8f3bcefaf67e76141a6d8edeb8354fea
|
||||
TextScriptImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
BIN
Assets/AssetRaw/Configs/bytes/battle_tbbuffattr.bytes
Normal file
BIN
Assets/AssetRaw/Configs/bytes/battle_tbbuffattr.bytes
Normal file
Binary file not shown.
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 25113973d38eb5a48b064863830539a4
|
||||
TextScriptImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
BIN
Assets/AssetRaw/Configs/bytes/battle_tbskill.bytes
Normal file
BIN
Assets/AssetRaw/Configs/bytes/battle_tbskill.bytes
Normal file
Binary file not shown.
7
Assets/AssetRaw/Configs/bytes/battle_tbskill.bytes.meta
Normal file
7
Assets/AssetRaw/Configs/bytes/battle_tbskill.bytes.meta
Normal file
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ef51ed54e72f97a4ab530b932680e08b
|
||||
TextScriptImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
BIN
Assets/AssetRaw/Configs/bytes/item_tbitem.bytes
Normal file
BIN
Assets/AssetRaw/Configs/bytes/item_tbitem.bytes
Normal file
Binary file not shown.
7
Assets/AssetRaw/Configs/bytes/item_tbitem.bytes.meta
Normal file
7
Assets/AssetRaw/Configs/bytes/item_tbitem.bytes.meta
Normal file
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 090163c612f34ac4fb80004ac5f057b4
|
||||
TextScriptImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
8
Assets/AssetRaw/DLL.meta
Normal file
8
Assets/AssetRaw/DLL.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3aad79ec1ea08c24c891bd3c669d4125
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
8
Assets/AssetRaw/Effects.meta
Normal file
8
Assets/AssetRaw/Effects.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0fe175e1e1bd49a4ca71e66b6a9b7237
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
8
Assets/AssetRaw/Fonts.meta
Normal file
8
Assets/AssetRaw/Fonts.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2473375c9ee163a4b861278b38091455
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
8
Assets/AssetRaw/Materials.meta
Normal file
8
Assets/AssetRaw/Materials.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 228b1547e7065d546ad0bf215fd6a276
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
8
Assets/AssetRaw/Scenes.meta
Normal file
8
Assets/AssetRaw/Scenes.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: cace6ee6539f661419b5e5f8ae1c0146
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
8
Assets/AssetRaw/Shaders.meta
Normal file
8
Assets/AssetRaw/Shaders.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2a4bceb84ed685447ace957f497eb810
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
8
Assets/AssetRaw/UI.meta
Normal file
8
Assets/AssetRaw/UI.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 27e87d83814156648b58f380b834e046
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
3000
Assets/AssetRaw/UI/GMPanel.prefab
Normal file
3000
Assets/AssetRaw/UI/GMPanel.prefab
Normal file
File diff suppressed because it is too large
Load Diff
7
Assets/AssetRaw/UI/GMPanel.prefab.meta
Normal file
7
Assets/AssetRaw/UI/GMPanel.prefab.meta
Normal file
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 930f8bca659c7504b8fe431ee8c40e7b
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
382
Assets/AssetRaw/UI/LogUI.prefab
Normal file
382
Assets/AssetRaw/UI/LogUI.prefab
Normal file
@@ -0,0 +1,382 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &2683445925571829816
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 2683445925571829817}
|
||||
- component: {fileID: 2683445925571829820}
|
||||
- component: {fileID: 2683445925571829823}
|
||||
- component: {fileID: 2683445925571829822}
|
||||
m_Layer: 5
|
||||
m_Name: LogUI
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &2683445925571829817
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2683445925571829816}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 2683445927021212027}
|
||||
- {fileID: 2683445926897574365}
|
||||
- {fileID: 6164213652418733423}
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 0}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!223 &2683445925571829820
|
||||
Canvas:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2683445925571829816}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 3
|
||||
m_RenderMode: 0
|
||||
m_Camera: {fileID: 0}
|
||||
m_PlaneDistance: 100
|
||||
m_PixelPerfect: 0
|
||||
m_ReceivesEvents: 1
|
||||
m_OverrideSorting: 0
|
||||
m_OverridePixelPerfect: 0
|
||||
m_SortingBucketNormalizedSize: 0
|
||||
m_AdditionalShaderChannelsFlag: 0
|
||||
m_SortingLayerID: 0
|
||||
m_SortingOrder: 0
|
||||
m_TargetDisplay: 0
|
||||
--- !u!114 &2683445925571829823
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2683445925571829816}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 0cd44c1031e13a943bb63640046fad76, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_UiScaleMode: 0
|
||||
m_ReferencePixelsPerUnit: 100
|
||||
m_ScaleFactor: 1
|
||||
m_ReferenceResolution: {x: 800, y: 600}
|
||||
m_ScreenMatchMode: 0
|
||||
m_MatchWidthOrHeight: 0
|
||||
m_PhysicalUnit: 3
|
||||
m_FallbackScreenDPI: 96
|
||||
m_DefaultSpriteDPI: 96
|
||||
m_DynamicPixelsPerUnit: 1
|
||||
m_PresetInfoIsWorld: 0
|
||||
--- !u!114 &2683445925571829822
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2683445925571829816}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: dc42784cf147c0c48a680349fa168899, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_IgnoreReversedGraphics: 1
|
||||
m_BlockingObjects: 0
|
||||
m_BlockingMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 55
|
||||
--- !u!1 &2683445926897574364
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 2683445926897574365}
|
||||
- component: {fileID: 2683445926897574339}
|
||||
- component: {fileID: 2683445926897574338}
|
||||
m_Layer: 5
|
||||
m_Name: m_textError
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &2683445926897574365
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2683445926897574364}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 2683445925571829817}
|
||||
m_RootOrder: 1
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
m_AnchoredPosition: {x: 0, y: -10}
|
||||
m_SizeDelta: {x: -40, y: -60}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &2683445926897574339
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2683445926897574364}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &2683445926897574338
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2683445926897574364}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 0, g: 1, b: 0.25490198, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_FontData:
|
||||
m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
|
||||
m_FontSize: 36
|
||||
m_FontStyle: 0
|
||||
m_BestFit: 0
|
||||
m_MinSize: 2
|
||||
m_MaxSize: 40
|
||||
m_Alignment: 0
|
||||
m_AlignByGeometry: 0
|
||||
m_RichText: 1
|
||||
m_HorizontalOverflow: 0
|
||||
m_VerticalOverflow: 0
|
||||
m_LineSpacing: 1
|
||||
m_Text:
|
||||
--- !u!1 &2683445927021212026
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 2683445927021212027}
|
||||
- component: {fileID: 2683445927021212025}
|
||||
- component: {fileID: 2683445927021212024}
|
||||
m_Layer: 5
|
||||
m_Name: Panel
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &2683445927021212027
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2683445927021212026}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 2683445925571829817}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 0}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &2683445927021212025
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2683445927021212026}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &2683445927021212024
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2683445927021212026}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 0, g: 0, b: 0, a: 0.34901962}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_Sprite: {fileID: 10907, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_Type: 1
|
||||
m_PreserveAspect: 0
|
||||
m_FillCenter: 1
|
||||
m_FillMethod: 4
|
||||
m_FillAmount: 1
|
||||
m_FillClockwise: 1
|
||||
m_FillOrigin: 0
|
||||
m_UseSpriteMesh: 0
|
||||
m_PixelsPerUnitMultiplier: 1
|
||||
--- !u!1 &4229713281919198382
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 6164213652418733423}
|
||||
- component: {fileID: 9023329926868908831}
|
||||
- component: {fileID: 5643637730633076069}
|
||||
- component: {fileID: 6030240422437967231}
|
||||
m_Layer: 5
|
||||
m_Name: m_btnClose
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &6164213652418733423
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4229713281919198382}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 2683445925571829817}
|
||||
m_RootOrder: 2
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 0}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &9023329926868908831
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4229713281919198382}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &5643637730633076069
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4229713281919198382}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 0, g: 0, b: 0, a: 0.007843138}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_Sprite: {fileID: 10907, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_Type: 1
|
||||
m_PreserveAspect: 0
|
||||
m_FillCenter: 1
|
||||
m_FillMethod: 4
|
||||
m_FillAmount: 1
|
||||
m_FillClockwise: 1
|
||||
m_FillOrigin: 0
|
||||
m_UseSpriteMesh: 0
|
||||
m_PixelsPerUnitMultiplier: 1
|
||||
--- !u!114 &6030240422437967231
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4229713281919198382}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Navigation:
|
||||
m_Mode: 3
|
||||
m_WrapAround: 0
|
||||
m_SelectOnUp: {fileID: 0}
|
||||
m_SelectOnDown: {fileID: 0}
|
||||
m_SelectOnLeft: {fileID: 0}
|
||||
m_SelectOnRight: {fileID: 0}
|
||||
m_Transition: 1
|
||||
m_Colors:
|
||||
m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
|
||||
m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
|
||||
m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
|
||||
m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
|
||||
m_ColorMultiplier: 1
|
||||
m_FadeDuration: 0.1
|
||||
m_SpriteState:
|
||||
m_HighlightedSprite: {fileID: 0}
|
||||
m_PressedSprite: {fileID: 0}
|
||||
m_SelectedSprite: {fileID: 0}
|
||||
m_DisabledSprite: {fileID: 0}
|
||||
m_AnimationTriggers:
|
||||
m_NormalTrigger: Normal
|
||||
m_HighlightedTrigger: Highlighted
|
||||
m_PressedTrigger: Pressed
|
||||
m_SelectedTrigger: Selected
|
||||
m_DisabledTrigger: Disabled
|
||||
m_Interactable: 1
|
||||
m_TargetGraphic: {fileID: 5643637730633076069}
|
||||
m_OnClick:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
7
Assets/AssetRaw/UI/LogUI.prefab.meta
Normal file
7
Assets/AssetRaw/UI/LogUI.prefab.meta
Normal file
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ad23fce0bd282924fa4aedb4da24684f
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
1888
Assets/AssetRaw/UI/NetWorkDemoUI.prefab
Normal file
1888
Assets/AssetRaw/UI/NetWorkDemoUI.prefab
Normal file
File diff suppressed because it is too large
Load Diff
7
Assets/AssetRaw/UI/NetWorkDemoUI.prefab.meta
Normal file
7
Assets/AssetRaw/UI/NetWorkDemoUI.prefab.meta
Normal file
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ed92f6b6b24543747bc10eba9141feb1
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
8
Assets/AssetRaw/UIRaw.meta
Normal file
8
Assets/AssetRaw/UIRaw.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 30ac6ece1d52a824986d28eb79ec7e51
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
8
Assets/AssetRaw/UIRaw/Atlas.meta
Normal file
8
Assets/AssetRaw/UIRaw/Atlas.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6d11fa91acc253840a648b58f23db139
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
8
Assets/AssetRaw/UIRaw/Atlas/Common.meta
Normal file
8
Assets/AssetRaw/UIRaw/Atlas/Common.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9066612920ca0654fb4c5a9229a06f33
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
BIN
Assets/AssetRaw/UIRaw/Atlas/Common/blue_button.png
Normal file
BIN
Assets/AssetRaw/UIRaw/Atlas/Common/blue_button.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 7.4 KiB |
96
Assets/AssetRaw/UIRaw/Atlas/Common/blue_button.png.meta
Normal file
96
Assets/AssetRaw/UIRaw/Atlas/Common/blue_button.png.meta
Normal file
@@ -0,0 +1,96 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f9a06e163014f4f46b14f4499d3e7240
|
||||
TextureImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 11
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 0
|
||||
sRGBTexture: 1
|
||||
linearTexture: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapsPreserveCoverage: 0
|
||||
alphaTestReferenceValue: 0.5
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
isReadable: 0
|
||||
streamingMipmaps: 0
|
||||
streamingMipmapsPriority: 0
|
||||
vTOnly: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: 1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: 1
|
||||
aniso: 1
|
||||
mipBias: 0
|
||||
wrapU: 1
|
||||
wrapV: 1
|
||||
wrapW: 1
|
||||
nPOTScale: 0
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 1
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spritePixelsToUnits: 100
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spriteGenerateFallbackPhysicsShape: 0
|
||||
alphaUsage: 1
|
||||
alphaIsTransparency: 1
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 8
|
||||
textureShape: 1
|
||||
singleChannelComponent: 0
|
||||
flipbookRows: 1
|
||||
flipbookColumns: 1
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
ignorePngGamma: 0
|
||||
applyGammaDecoding: 0
|
||||
platformSettings:
|
||||
- serializedVersion: 3
|
||||
buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID: 5e97eb03825dee720800000000000000
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
spritePackingTag:
|
||||
pSDRemoveMatte: 0
|
||||
pSDShowRemoveMatteOption: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
BIN
Assets/AssetRaw/UIRaw/Atlas/Common/red_button.png
Normal file
BIN
Assets/AssetRaw/UIRaw/Atlas/Common/red_button.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 7.2 KiB |
147
Assets/AssetRaw/UIRaw/Atlas/Common/red_button.png.meta
Normal file
147
Assets/AssetRaw/UIRaw/Atlas/Common/red_button.png.meta
Normal file
@@ -0,0 +1,147 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2761fc23b4aa7e34187ac5ffbc3fad9b
|
||||
TextureImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 12
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 0
|
||||
sRGBTexture: 1
|
||||
linearTexture: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapsPreserveCoverage: 0
|
||||
alphaTestReferenceValue: 0.5
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
isReadable: 0
|
||||
streamingMipmaps: 0
|
||||
streamingMipmapsPriority: 0
|
||||
vTOnly: 0
|
||||
ignoreMasterTextureLimit: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: 1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: 1
|
||||
aniso: 1
|
||||
mipBias: 0
|
||||
wrapU: 1
|
||||
wrapV: 1
|
||||
wrapW: 1
|
||||
nPOTScale: 0
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 1
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spritePixelsToUnits: 100
|
||||
spriteBorder: {x: 268, y: 79, z: 267, w: 82}
|
||||
spriteGenerateFallbackPhysicsShape: 0
|
||||
alphaUsage: 1
|
||||
alphaIsTransparency: 1
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 8
|
||||
textureShape: 1
|
||||
singleChannelComponent: 0
|
||||
flipbookRows: 1
|
||||
flipbookColumns: 1
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
ignorePngGamma: 0
|
||||
applyGammaDecoding: 0
|
||||
cookieLightType: 1
|
||||
platformSettings:
|
||||
- serializedVersion: 3
|
||||
buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Standalone
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Server
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Android
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: WebGL
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID: 5e97eb03825dee720800000000000000
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
nameFileIdTable: {}
|
||||
spritePackingTag:
|
||||
pSDRemoveMatte: 0
|
||||
pSDShowRemoveMatteOption: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
BIN
Assets/AssetRaw/UIRaw/Atlas/Common/white_background.png
Normal file
BIN
Assets/AssetRaw/UIRaw/Atlas/Common/white_background.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.9 KiB |
147
Assets/AssetRaw/UIRaw/Atlas/Common/white_background.png.meta
Normal file
147
Assets/AssetRaw/UIRaw/Atlas/Common/white_background.png.meta
Normal file
@@ -0,0 +1,147 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d623a2b7e069a4c4592d3da48f476189
|
||||
TextureImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 12
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 0
|
||||
sRGBTexture: 1
|
||||
linearTexture: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapsPreserveCoverage: 0
|
||||
alphaTestReferenceValue: 0.5
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
isReadable: 0
|
||||
streamingMipmaps: 0
|
||||
streamingMipmapsPriority: 0
|
||||
vTOnly: 0
|
||||
ignoreMasterTextureLimit: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: 1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: 1
|
||||
aniso: 1
|
||||
mipBias: 0
|
||||
wrapU: 1
|
||||
wrapV: 1
|
||||
wrapW: 1
|
||||
nPOTScale: 0
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 1
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spritePixelsToUnits: 100
|
||||
spriteBorder: {x: 39, y: 38, z: 40, w: 37}
|
||||
spriteGenerateFallbackPhysicsShape: 0
|
||||
alphaUsage: 1
|
||||
alphaIsTransparency: 1
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 8
|
||||
textureShape: 1
|
||||
singleChannelComponent: 0
|
||||
flipbookRows: 1
|
||||
flipbookColumns: 1
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
ignorePngGamma: 0
|
||||
applyGammaDecoding: 0
|
||||
cookieLightType: 1
|
||||
platformSettings:
|
||||
- serializedVersion: 3
|
||||
buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Standalone
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Server
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Android
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: WebGL
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID: 5e97eb03825dee720800000000000000
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
nameFileIdTable: {}
|
||||
spritePackingTag:
|
||||
pSDRemoveMatte: 0
|
||||
pSDShowRemoveMatteOption: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
BIN
Assets/AssetRaw/UIRaw/Atlas/Common/white_button.png
Normal file
BIN
Assets/AssetRaw/UIRaw/Atlas/Common/white_button.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 6.0 KiB |
147
Assets/AssetRaw/UIRaw/Atlas/Common/white_button.png.meta
Normal file
147
Assets/AssetRaw/UIRaw/Atlas/Common/white_button.png.meta
Normal file
@@ -0,0 +1,147 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 57e4117f4cd6ae54284898652e70d553
|
||||
TextureImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 12
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 0
|
||||
sRGBTexture: 1
|
||||
linearTexture: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapsPreserveCoverage: 0
|
||||
alphaTestReferenceValue: 0.5
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
isReadable: 0
|
||||
streamingMipmaps: 0
|
||||
streamingMipmapsPriority: 0
|
||||
vTOnly: 0
|
||||
ignoreMasterTextureLimit: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: 1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: 1
|
||||
aniso: 1
|
||||
mipBias: 0
|
||||
wrapU: 1
|
||||
wrapV: 1
|
||||
wrapW: 1
|
||||
nPOTScale: 0
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 1
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spritePixelsToUnits: 100
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spriteGenerateFallbackPhysicsShape: 0
|
||||
alphaUsage: 1
|
||||
alphaIsTransparency: 1
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 8
|
||||
textureShape: 1
|
||||
singleChannelComponent: 0
|
||||
flipbookRows: 1
|
||||
flipbookColumns: 1
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
ignorePngGamma: 0
|
||||
applyGammaDecoding: 0
|
||||
cookieLightType: 1
|
||||
platformSettings:
|
||||
- serializedVersion: 3
|
||||
buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Standalone
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Server
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Android
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: WebGL
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID: 5e97eb03825dee720800000000000000
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
nameFileIdTable: {}
|
||||
spritePackingTag:
|
||||
pSDRemoveMatte: 0
|
||||
pSDShowRemoveMatteOption: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
8
Assets/AssetRaw/UIRaw/Raw.meta
Normal file
8
Assets/AssetRaw/UIRaw/Raw.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6bc134b912ac6bb4399ea1bec4c11636
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
8
Assets/Atlas.meta
Normal file
8
Assets/Atlas.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9a8dc99c296a5ab4fa2fffa1b9bdfbb2
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
69
Assets/Atlas/UIRaw_Atlas_Common.spriteatlas
Normal file
69
Assets/Atlas/UIRaw_Atlas_Common.spriteatlas
Normal file
@@ -0,0 +1,69 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!687078895 &4343727234628468602
|
||||
SpriteAtlas:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: UIRaw_Atlas_Common
|
||||
serializedVersion: 2
|
||||
m_EditorData:
|
||||
serializedVersion: 2
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
anisoLevel: 0
|
||||
compressionQuality: 0
|
||||
maxTextureSize: 0
|
||||
textureCompression: 0
|
||||
filterMode: 1
|
||||
generateMipMaps: 0
|
||||
readable: 0
|
||||
crunchedCompression: 0
|
||||
sRGB: 1
|
||||
platformSettings:
|
||||
- serializedVersion: 3
|
||||
m_BuildTarget: iPhone
|
||||
m_MaxTextureSize: 2048
|
||||
m_ResizeAlgorithm: 0
|
||||
m_TextureFormat: 49
|
||||
m_TextureCompression: 1
|
||||
m_CompressionQuality: 100
|
||||
m_CrunchedCompression: 0
|
||||
m_AllowsAlphaSplitting: 0
|
||||
m_Overridden: 1
|
||||
m_AndroidETC2FallbackOverride: 0
|
||||
m_ForceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
packingSettings:
|
||||
serializedVersion: 2
|
||||
padding: 2
|
||||
blockOffset: 1
|
||||
allowAlphaSplitting: 0
|
||||
enableRotation: 1
|
||||
enableTightPacking: 0
|
||||
enableAlphaDilation: 0
|
||||
secondaryTextureSettings: {}
|
||||
variantMultiplier: 1
|
||||
packables:
|
||||
- {fileID: 21300000, guid: f9a06e163014f4f46b14f4499d3e7240, type: 3}
|
||||
- {fileID: 21300000, guid: 2761fc23b4aa7e34187ac5ffbc3fad9b, type: 3}
|
||||
- {fileID: 21300000, guid: d623a2b7e069a4c4592d3da48f476189, type: 3}
|
||||
- {fileID: 21300000, guid: 57e4117f4cd6ae54284898652e70d553, type: 3}
|
||||
bindAsDefault: 1
|
||||
isAtlasV2: 0
|
||||
cachedData: {fileID: 0}
|
||||
m_MasterAtlas: {fileID: 0}
|
||||
m_PackedSprites:
|
||||
- {fileID: 21300000, guid: 2761fc23b4aa7e34187ac5ffbc3fad9b, type: 3}
|
||||
- {fileID: 21300000, guid: f9a06e163014f4f46b14f4499d3e7240, type: 3}
|
||||
- {fileID: 21300000, guid: d623a2b7e069a4c4592d3da48f476189, type: 3}
|
||||
- {fileID: 21300000, guid: 57e4117f4cd6ae54284898652e70d553, type: 3}
|
||||
m_PackedSpriteNamesToIndex:
|
||||
- red_button
|
||||
- blue_button
|
||||
- white_background
|
||||
- white_button
|
||||
m_RenderDataMap: {}
|
||||
m_Tag: UIRaw_Atlas_Common
|
||||
m_IsVariant: 0
|
||||
m_IsPlaceholder: 0
|
8
Assets/Atlas/UIRaw_Atlas_Common.spriteatlas.meta
Normal file
8
Assets/Atlas/UIRaw_Atlas_Common.spriteatlas.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1a8431d2a64361c4d821790ed88aeb3d
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 4343727234628468602
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c7be6642490fcb64dbcb3c9e89a4a056
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8ba72e20a8a751a45aeaafcdfa8807f5
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@@ -1,344 +0,0 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!29 &1
|
||||
OcclusionCullingSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_OcclusionBakeSettings:
|
||||
smallestOccluder: 5
|
||||
smallestHole: 0.25
|
||||
backfaceThreshold: 100
|
||||
m_SceneGUID: 00000000000000000000000000000000
|
||||
m_OcclusionCullingData: {fileID: 0}
|
||||
--- !u!104 &2
|
||||
RenderSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 9
|
||||
m_Fog: 0
|
||||
m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1}
|
||||
m_FogMode: 3
|
||||
m_FogDensity: 0.01
|
||||
m_LinearFogStart: 0
|
||||
m_LinearFogEnd: 300
|
||||
m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1}
|
||||
m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1}
|
||||
m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1}
|
||||
m_AmbientIntensity: 1
|
||||
m_AmbientMode: 0
|
||||
m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1}
|
||||
m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_HaloStrength: 0.5
|
||||
m_FlareStrength: 1
|
||||
m_FlareFadeSpeed: 3
|
||||
m_HaloTexture: {fileID: 0}
|
||||
m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0}
|
||||
m_DefaultReflectionMode: 0
|
||||
m_DefaultReflectionResolution: 128
|
||||
m_ReflectionBounces: 1
|
||||
m_ReflectionIntensity: 1
|
||||
m_CustomReflection: {fileID: 0}
|
||||
m_Sun: {fileID: 0}
|
||||
m_IndirectSpecularColor: {r: 0.44657898, g: 0.4964133, b: 0.5748178, a: 1}
|
||||
m_UseRadianceAmbientProbe: 0
|
||||
--- !u!157 &3
|
||||
LightmapSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 12
|
||||
m_GIWorkflowMode: 1
|
||||
m_GISettings:
|
||||
serializedVersion: 2
|
||||
m_BounceScale: 1
|
||||
m_IndirectOutputScale: 1
|
||||
m_AlbedoBoost: 1
|
||||
m_EnvironmentLightingMode: 0
|
||||
m_EnableBakedLightmaps: 1
|
||||
m_EnableRealtimeLightmaps: 0
|
||||
m_LightmapEditorSettings:
|
||||
serializedVersion: 12
|
||||
m_Resolution: 2
|
||||
m_BakeResolution: 40
|
||||
m_AtlasSize: 1024
|
||||
m_AO: 0
|
||||
m_AOMaxDistance: 1
|
||||
m_CompAOExponent: 1
|
||||
m_CompAOExponentDirect: 0
|
||||
m_ExtractAmbientOcclusion: 0
|
||||
m_Padding: 2
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_LightmapsBakeMode: 1
|
||||
m_TextureCompression: 1
|
||||
m_FinalGather: 0
|
||||
m_FinalGatherFiltering: 1
|
||||
m_FinalGatherRayCount: 256
|
||||
m_ReflectionCompression: 2
|
||||
m_MixedBakeMode: 2
|
||||
m_BakeBackend: 1
|
||||
m_PVRSampling: 1
|
||||
m_PVRDirectSampleCount: 32
|
||||
m_PVRSampleCount: 512
|
||||
m_PVRBounces: 2
|
||||
m_PVREnvironmentSampleCount: 256
|
||||
m_PVREnvironmentReferencePointCount: 2048
|
||||
m_PVRFilteringMode: 1
|
||||
m_PVRDenoiserTypeDirect: 1
|
||||
m_PVRDenoiserTypeIndirect: 1
|
||||
m_PVRDenoiserTypeAO: 1
|
||||
m_PVRFilterTypeDirect: 0
|
||||
m_PVRFilterTypeIndirect: 0
|
||||
m_PVRFilterTypeAO: 0
|
||||
m_PVREnvironmentMIS: 1
|
||||
m_PVRCulling: 1
|
||||
m_PVRFilteringGaussRadiusDirect: 1
|
||||
m_PVRFilteringGaussRadiusIndirect: 5
|
||||
m_PVRFilteringGaussRadiusAO: 2
|
||||
m_PVRFilteringAtrousPositionSigmaDirect: 0.5
|
||||
m_PVRFilteringAtrousPositionSigmaIndirect: 2
|
||||
m_PVRFilteringAtrousPositionSigmaAO: 1
|
||||
m_ExportTrainingData: 0
|
||||
m_TrainingDataDestination: TrainingData
|
||||
m_LightProbeSampleCountMultiplier: 4
|
||||
m_LightingDataAsset: {fileID: 0}
|
||||
m_LightingSettings: {fileID: 0}
|
||||
--- !u!196 &4
|
||||
NavMeshSettings:
|
||||
serializedVersion: 2
|
||||
m_ObjectHideFlags: 0
|
||||
m_BuildSettings:
|
||||
serializedVersion: 2
|
||||
agentTypeID: 0
|
||||
agentRadius: 0.5
|
||||
agentHeight: 2
|
||||
agentSlope: 45
|
||||
agentClimb: 0.4
|
||||
ledgeDropHeight: 0
|
||||
maxJumpAcrossDistance: 0
|
||||
minRegionArea: 2
|
||||
manualCellSize: 0
|
||||
cellSize: 0.16666667
|
||||
manualTileSize: 0
|
||||
tileSize: 256
|
||||
accuratePlacement: 0
|
||||
maxJobWorkers: 0
|
||||
preserveTilesOutsideBounds: 0
|
||||
debug:
|
||||
m_Flags: 0
|
||||
m_NavMeshData: {fileID: 0}
|
||||
--- !u!1 &209661865
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 209661867}
|
||||
- component: {fileID: 209661866}
|
||||
m_Layer: 0
|
||||
m_Name: Directional Light
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!108 &209661866
|
||||
Light:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 209661865}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 10
|
||||
m_Type: 1
|
||||
m_Shape: 0
|
||||
m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1}
|
||||
m_Intensity: 1
|
||||
m_Range: 10
|
||||
m_SpotAngle: 30
|
||||
m_InnerSpotAngle: 21.80208
|
||||
m_CookieSize: 10
|
||||
m_Shadows:
|
||||
m_Type: 2
|
||||
m_Resolution: -1
|
||||
m_CustomResolution: -1
|
||||
m_Strength: 1
|
||||
m_Bias: 0.05
|
||||
m_NormalBias: 0.4
|
||||
m_NearPlane: 0.2
|
||||
m_CullingMatrixOverride:
|
||||
e00: 1
|
||||
e01: 0
|
||||
e02: 0
|
||||
e03: 0
|
||||
e10: 0
|
||||
e11: 1
|
||||
e12: 0
|
||||
e13: 0
|
||||
e20: 0
|
||||
e21: 0
|
||||
e22: 1
|
||||
e23: 0
|
||||
e30: 0
|
||||
e31: 0
|
||||
e32: 0
|
||||
e33: 1
|
||||
m_UseCullingMatrixOverride: 0
|
||||
m_Cookie: {fileID: 0}
|
||||
m_DrawHalo: 0
|
||||
m_Flare: {fileID: 0}
|
||||
m_RenderMode: 0
|
||||
m_CullingMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_RenderingLayerMask: 1
|
||||
m_Lightmapping: 4
|
||||
m_LightShadowCasterMode: 0
|
||||
m_AreaSize: {x: 1, y: 1}
|
||||
m_BounceIntensity: 1
|
||||
m_ColorTemperature: 6570
|
||||
m_UseColorTemperature: 0
|
||||
m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_UseBoundingSphereOverride: 0
|
||||
m_UseViewFrustumForShadowCasterCull: 1
|
||||
m_ShadowRadius: 0
|
||||
m_ShadowAngle: 0
|
||||
--- !u!4 &209661867
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 209661865}
|
||||
m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261}
|
||||
m_LocalPosition: {x: 0, y: 3, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 1
|
||||
m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0}
|
||||
--- !u!1 &400364856
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 400364859}
|
||||
- component: {fileID: 400364858}
|
||||
- component: {fileID: 400364857}
|
||||
m_Layer: 0
|
||||
m_Name: Main Camera
|
||||
m_TagString: MainCamera
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!81 &400364857
|
||||
AudioListener:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 400364856}
|
||||
m_Enabled: 1
|
||||
--- !u!20 &400364858
|
||||
Camera:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 400364856}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 2
|
||||
m_ClearFlags: 1
|
||||
m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0}
|
||||
m_projectionMatrixMode: 1
|
||||
m_GateFitMode: 2
|
||||
m_FOVAxisMode: 0
|
||||
m_SensorSize: {x: 36, y: 24}
|
||||
m_LensShift: {x: 0, y: 0}
|
||||
m_FocalLength: 50
|
||||
m_NormalizedViewPortRect:
|
||||
serializedVersion: 2
|
||||
x: 0
|
||||
y: 0
|
||||
width: 1
|
||||
height: 1
|
||||
near clip plane: 0.3
|
||||
far clip plane: 1000
|
||||
field of view: 60
|
||||
orthographic: 0
|
||||
orthographic size: 5
|
||||
m_Depth: -1
|
||||
m_CullingMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_RenderingPath: -1
|
||||
m_TargetTexture: {fileID: 0}
|
||||
m_TargetDisplay: 0
|
||||
m_TargetEye: 3
|
||||
m_HDR: 1
|
||||
m_AllowMSAA: 1
|
||||
m_AllowDynamicResolution: 0
|
||||
m_ForceIntoRT: 0
|
||||
m_OcclusionCulling: 1
|
||||
m_StereoConvergence: 10
|
||||
m_StereoSeparation: 0.022
|
||||
--- !u!4 &400364859
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 400364856}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 1, z: -10}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &1891593711
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1891593712}
|
||||
- component: {fileID: 1891593713}
|
||||
m_Layer: 0
|
||||
m_Name: TEngine
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &1891593712
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1891593711}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 2
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &1891593713
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1891593711}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 6c3c520ddf3e7a74499ea41cf4b09db2, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
@@ -1,7 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8ef518d49b9758848883444880ef20c8
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
8
Assets/GameScripts.meta
Normal file
8
Assets/GameScripts.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e350730b37a348a4ab35189c9739c329
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
8
Assets/GameScripts/DotNet.meta
Normal file
8
Assets/GameScripts/DotNet.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: dbb608c870018e94d9603500e9cb4d5e
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
8
Assets/GameScripts/DotNet/Core.meta
Normal file
8
Assets/GameScripts/DotNet/Core.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: fdae3569c5cbfe54e97778a1f7e7af21
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
117
Assets/GameScripts/DotNet/Core/App.cs
Normal file
117
Assets/GameScripts/DotNet/Core/App.cs
Normal file
@@ -0,0 +1,117 @@
|
||||
#if TENGINE_NET
|
||||
using CommandLine;
|
||||
using TEngine.Core;
|
||||
using NLog;
|
||||
|
||||
namespace TEngine
|
||||
{
|
||||
public static class App
|
||||
{
|
||||
public static void Init()
|
||||
{
|
||||
try
|
||||
{
|
||||
// 设置默认的线程的同步上下文
|
||||
SynchronizationContext.SetSynchronizationContext(ThreadSynchronizationContext.Main);
|
||||
// 解析命令行参数
|
||||
Parser.Default.ParseArguments<CommandLineOptions>(Environment.GetCommandLineArgs())
|
||||
.WithNotParsed(error => throw new Exception("Command line format error!"))
|
||||
.WithParsed(option => AppDefine.Options = option);
|
||||
// 加载框架配置
|
||||
TEngineSettingsHelper.Initialize();
|
||||
// 检查启动参数
|
||||
switch (AppDefine.Options.AppType)
|
||||
{
|
||||
case AppType.Game:
|
||||
{
|
||||
break;
|
||||
}
|
||||
case AppType.Export:
|
||||
{
|
||||
new Exporter().Start();
|
||||
return;
|
||||
}
|
||||
default:
|
||||
{
|
||||
throw new NotSupportedException($"AppType is {AppDefine.Options.AppType} Unrecognized!");
|
||||
}
|
||||
}
|
||||
|
||||
// 根据不同的运行模式来选择日志的方式
|
||||
switch (AppDefine.Options.Mode)
|
||||
{
|
||||
case Mode.Develop:
|
||||
{
|
||||
LogManager.Configuration.RemoveRuleByName("ConsoleTrace");
|
||||
LogManager.Configuration.RemoveRuleByName("ConsoleDebug");
|
||||
LogManager.Configuration.RemoveRuleByName("ConsoleInfo");
|
||||
LogManager.Configuration.RemoveRuleByName("ConsoleWarn");
|
||||
LogManager.Configuration.RemoveRuleByName("ConsoleError");
|
||||
|
||||
LogManager.Configuration.RemoveRuleByName("ServerDebug");
|
||||
LogManager.Configuration.RemoveRuleByName("ServerTrace");
|
||||
LogManager.Configuration.RemoveRuleByName("ServerInfo");
|
||||
LogManager.Configuration.RemoveRuleByName("ServerWarn");
|
||||
LogManager.Configuration.RemoveRuleByName("ServerError");
|
||||
break;
|
||||
}
|
||||
case Mode.Release:
|
||||
{
|
||||
LogManager.Configuration.RemoveRuleByName("ConsoleTrace");
|
||||
LogManager.Configuration.RemoveRuleByName("ConsoleDebug");
|
||||
LogManager.Configuration.RemoveRuleByName("ConsoleInfo");
|
||||
LogManager.Configuration.RemoveRuleByName("ConsoleWarn");
|
||||
LogManager.Configuration.RemoveRuleByName("ConsoleError");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// 初始化SingletonSystemCenter这个一定要放到最前面
|
||||
// 因为SingletonSystem会注册AssemblyManager的OnLoadAssemblyEvent和OnUnLoadAssemblyEvent的事件
|
||||
// 如果不这样、会无法把程序集的单例注册到SingletonManager中
|
||||
SingletonSystem.Initialize();
|
||||
// 加载核心程序集
|
||||
AssemblyManager.Initialize();
|
||||
|
||||
Log.Info($"Start Server Param => {Parser.Default.FormatCommandLine(AppDefine.Options)}");
|
||||
}
|
||||
catch (Exception exception)
|
||||
{
|
||||
Log.Error(exception);
|
||||
}
|
||||
}
|
||||
|
||||
public static async FTask Start()
|
||||
{
|
||||
switch (AppDefine.Options.Mode)
|
||||
{
|
||||
case Mode.Develop:
|
||||
{
|
||||
// 开发模式默认所有Server都在一个进程中、方便调试、但网络还都是独立的
|
||||
var serverConfigInfos = ConfigTableManage.AllServerConfig();
|
||||
|
||||
foreach (var serverConfig in serverConfigInfos)
|
||||
{
|
||||
await Server.Create(serverConfig.Id);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
case Mode.Release:
|
||||
{
|
||||
// 发布模式只会启动启动参数传递的Server、也就是只会启动一个Server
|
||||
// 您可以做一个Server专门用于管理启动所有Server的工作
|
||||
await Server.Create(AppDefine.Options.AppId);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void Close()
|
||||
{
|
||||
SingletonSystem.Dispose();
|
||||
AssemblyManager.Dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
11
Assets/GameScripts/DotNet/Core/App.cs.meta
Normal file
11
Assets/GameScripts/DotNet/Core/App.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f6b4f60ee2b59b649835c9b25028d9e4
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
11
Assets/GameScripts/DotNet/Core/AppDefine.cs
Normal file
11
Assets/GameScripts/DotNet/Core/AppDefine.cs
Normal file
@@ -0,0 +1,11 @@
|
||||
#if TENGINE_NET
|
||||
#pragma warning disable CS8618
|
||||
namespace TEngine
|
||||
{
|
||||
public static class AppDefine
|
||||
{
|
||||
public static CommandLineOptions Options;
|
||||
public static uint AppId => Options.AppId;
|
||||
}
|
||||
}
|
||||
#endif
|
11
Assets/GameScripts/DotNet/Core/AppDefine.cs.meta
Normal file
11
Assets/GameScripts/DotNet/Core/AppDefine.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e08a4791989b16843a924bf798cdaa34
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
8
Assets/GameScripts/DotNet/Core/Assembly.meta
Normal file
8
Assets/GameScripts/DotNet/Core/Assembly.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9d838cbc15b0f034bb83f3aa5ea5b72d
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
44
Assets/GameScripts/DotNet/Core/Assembly/AssemblyInfo.cs
Normal file
44
Assets/GameScripts/DotNet/Core/Assembly/AssemblyInfo.cs
Normal file
@@ -0,0 +1,44 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using TEngine.DataStructure;
|
||||
|
||||
namespace TEngine.Core
|
||||
{
|
||||
public sealed class AssemblyInfo
|
||||
{
|
||||
public Assembly Assembly { get; private set; }
|
||||
public readonly List<Type> AssemblyTypeList = new List<Type>();
|
||||
public readonly OneToManyList<Type, Type> AssemblyTypeGroupList = new OneToManyList<Type, Type>();
|
||||
|
||||
public void Load(Assembly assembly)
|
||||
{
|
||||
Assembly = assembly;
|
||||
var assemblyTypes = assembly.GetTypes().ToList();
|
||||
|
||||
foreach (var type in assemblyTypes)
|
||||
{
|
||||
if (type.IsAbstract || type.IsInterface)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
var interfaces = type.GetInterfaces();
|
||||
|
||||
foreach (var interfaceType in interfaces)
|
||||
{
|
||||
AssemblyTypeGroupList.Add(interfaceType, type);
|
||||
}
|
||||
}
|
||||
|
||||
AssemblyTypeList.AddRange(assemblyTypes);
|
||||
}
|
||||
|
||||
public void Unload()
|
||||
{
|
||||
AssemblyTypeList.Clear();
|
||||
AssemblyTypeGroupList.Clear();
|
||||
}
|
||||
}
|
||||
}
|
11
Assets/GameScripts/DotNet/Core/Assembly/AssemblyInfo.cs.meta
Normal file
11
Assets/GameScripts/DotNet/Core/Assembly/AssemblyInfo.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: aee73bf0d744afd439ef9b6a5d531951
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
172
Assets/GameScripts/DotNet/Core/Assembly/AssemblyManager.cs
Normal file
172
Assets/GameScripts/DotNet/Core/Assembly/AssemblyManager.cs
Normal file
@@ -0,0 +1,172 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Reflection;
|
||||
#if TENGINE_NET
|
||||
using System.Runtime.Loader;
|
||||
// ReSharper disable ConditionIsAlwaysTrueOrFalseAccordingToNullableAPIContract
|
||||
#endif
|
||||
#pragma warning disable CS8603
|
||||
#pragma warning disable CS8618
|
||||
namespace TEngine.Core
|
||||
{
|
||||
public static class AssemblyManager
|
||||
{
|
||||
public static event Action<int> OnLoadAssemblyEvent;
|
||||
public static event Action<int> OnUnLoadAssemblyEvent;
|
||||
public static event Action<int> OnReLoadAssemblyEvent;
|
||||
private static readonly Dictionary<int, AssemblyInfo> AssemblyList = new Dictionary<int, AssemblyInfo>();
|
||||
|
||||
public static void Initialize()
|
||||
{
|
||||
LoadAssembly(int.MaxValue, typeof(AssemblyManager).Assembly);
|
||||
}
|
||||
|
||||
public static void LoadAssembly(int assemblyName, Assembly assembly)
|
||||
{
|
||||
var isReLoad = false;
|
||||
|
||||
if (!AssemblyList.TryGetValue(assemblyName, out var assemblyInfo))
|
||||
{
|
||||
assemblyInfo = new AssemblyInfo();
|
||||
AssemblyList.Add(assemblyName, assemblyInfo);
|
||||
}
|
||||
else
|
||||
{
|
||||
isReLoad = true;
|
||||
assemblyInfo.Unload();
|
||||
|
||||
if (OnUnLoadAssemblyEvent != null)
|
||||
{
|
||||
OnUnLoadAssemblyEvent(assemblyName);
|
||||
}
|
||||
}
|
||||
|
||||
assemblyInfo.Load(assembly);
|
||||
|
||||
if (OnLoadAssemblyEvent != null)
|
||||
{
|
||||
OnLoadAssemblyEvent(assemblyName);
|
||||
}
|
||||
|
||||
if (isReLoad && OnReLoadAssemblyEvent != null)
|
||||
{
|
||||
OnReLoadAssemblyEvent(assemblyName);
|
||||
}
|
||||
}
|
||||
|
||||
public static void Load(int assemblyName, Assembly assembly)
|
||||
{
|
||||
if (int.MaxValue == assemblyName)
|
||||
{
|
||||
throw new NotSupportedException("AssemblyName cannot be 2147483647");
|
||||
}
|
||||
|
||||
LoadAssembly(assemblyName, assembly);
|
||||
}
|
||||
|
||||
public static IEnumerable<int> ForEachAssemblyName()
|
||||
{
|
||||
foreach (var (key, _) in AssemblyList)
|
||||
{
|
||||
yield return key;
|
||||
}
|
||||
}
|
||||
|
||||
public static IEnumerable<Type> ForEach()
|
||||
{
|
||||
foreach (var (_, assemblyInfo) in AssemblyList)
|
||||
{
|
||||
foreach (var type in assemblyInfo.AssemblyTypeList)
|
||||
{
|
||||
yield return type;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static IEnumerable<Type> ForEach(int assemblyName)
|
||||
{
|
||||
if (!AssemblyList.TryGetValue(assemblyName, out var assemblyInfo))
|
||||
{
|
||||
yield break;
|
||||
}
|
||||
|
||||
foreach (var type in assemblyInfo.AssemblyTypeList)
|
||||
{
|
||||
yield return type;
|
||||
}
|
||||
}
|
||||
|
||||
public static IEnumerable<Type> ForEach(Type findType)
|
||||
{
|
||||
foreach (var (_, assemblyInfo) in AssemblyList)
|
||||
{
|
||||
if (!assemblyInfo.AssemblyTypeGroupList.TryGetValue(findType, out var assemblyLoad))
|
||||
{
|
||||
yield break;
|
||||
}
|
||||
|
||||
foreach (var type in assemblyLoad)
|
||||
{
|
||||
yield return type;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static IEnumerable<Type> ForEach(int assemblyName, Type findType)
|
||||
{
|
||||
if (!AssemblyList.TryGetValue(assemblyName, out var assemblyInfo))
|
||||
{
|
||||
yield break;
|
||||
}
|
||||
|
||||
if (!assemblyInfo.AssemblyTypeGroupList.TryGetValue(findType, out var assemblyLoad))
|
||||
{
|
||||
yield break;
|
||||
}
|
||||
|
||||
foreach (var type in assemblyLoad)
|
||||
{
|
||||
yield return type;
|
||||
}
|
||||
}
|
||||
|
||||
public static Assembly GetAssembly(int assemblyName)
|
||||
{
|
||||
return !AssemblyList.TryGetValue(assemblyName, out var assemblyInfo) ? null : assemblyInfo.Assembly;
|
||||
}
|
||||
|
||||
public static void Dispose()
|
||||
{
|
||||
foreach (var (_, assemblyInfo) in AssemblyList)
|
||||
{
|
||||
assemblyInfo.Unload();
|
||||
}
|
||||
|
||||
AssemblyList.Clear();
|
||||
|
||||
if (OnLoadAssemblyEvent != null)
|
||||
{
|
||||
foreach (var @delegate in OnLoadAssemblyEvent.GetInvocationList())
|
||||
{
|
||||
OnLoadAssemblyEvent -= @delegate as Action<int>;
|
||||
}
|
||||
}
|
||||
|
||||
if (OnUnLoadAssemblyEvent != null)
|
||||
{
|
||||
foreach (var @delegate in OnUnLoadAssemblyEvent.GetInvocationList())
|
||||
{
|
||||
OnUnLoadAssemblyEvent -= @delegate as Action<int>;
|
||||
}
|
||||
}
|
||||
|
||||
if (OnReLoadAssemblyEvent != null)
|
||||
{
|
||||
foreach (var @delegate in OnReLoadAssemblyEvent.GetInvocationList())
|
||||
{
|
||||
OnReLoadAssemblyEvent -= @delegate as Action<int>;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8d7a578f700ea034a9b98a5f63491eb3
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
67
Assets/GameScripts/DotNet/Core/CommandLineOptions.cs
Normal file
67
Assets/GameScripts/DotNet/Core/CommandLineOptions.cs
Normal file
@@ -0,0 +1,67 @@
|
||||
#if TENGINE_NET
|
||||
using CommandLine;
|
||||
using TEngine.Core;
|
||||
|
||||
#pragma warning disable CS8618
|
||||
|
||||
namespace TEngine;
|
||||
|
||||
public enum AppType
|
||||
{
|
||||
Game,
|
||||
|
||||
Export,
|
||||
|
||||
/// <summary>
|
||||
/// 每台物理机一个守护进程,用来启动该物理机上的所有进程。
|
||||
/// </summary>
|
||||
Watcher,
|
||||
}
|
||||
|
||||
|
||||
public enum Mode
|
||||
{
|
||||
/// <summary>
|
||||
/// Develop:所有Server都在一个进程中,Release:每个Server都在独立的进程中。
|
||||
/// </summary>
|
||||
Release,
|
||||
|
||||
Develop,
|
||||
}
|
||||
|
||||
public class CommandLineOptions
|
||||
{
|
||||
/// <summary>
|
||||
/// 进程Id
|
||||
/// </summary>
|
||||
[Option("AppId", Required = false, Default = (uint)0, HelpText = "Enter an AppId such as 1")]
|
||||
public uint AppId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// App类型
|
||||
/// Game - 游戏服务器App
|
||||
/// Export - 导表App
|
||||
/// </summary>
|
||||
[Option("AppType", Required = false, Default = AppType.Game, HelpText = "AppType enum")]
|
||||
public AppType AppType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 服务器运行模式
|
||||
/// Develop - 开发模式(所有Server都在一个进程中)
|
||||
/// Release - 发布模式(每个Server都在独立的进程中)
|
||||
/// </summary>
|
||||
[Option("Mode", Required = false, Default = Mode.Develop, HelpText = "Mode enum")]
|
||||
public Mode Mode { get; set; }
|
||||
|
||||
[Option("LogLevel", Required = false, Default = 2)]
|
||||
public int LogLevel { get; set; }
|
||||
|
||||
#if TENGINE_NET
|
||||
/// <summary>
|
||||
/// 导表的类型
|
||||
/// </summary>
|
||||
[Option("ExcelExportType", Required = false, Default = ExportType.None, HelpText = "Increment,All")]
|
||||
public ExportType ExportType { get; set; }
|
||||
#endif
|
||||
}
|
||||
#endif
|
11
Assets/GameScripts/DotNet/Core/CommandLineOptions.cs.meta
Normal file
11
Assets/GameScripts/DotNet/Core/CommandLineOptions.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c644dc25b4098d24683e949b5a14f754
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
12
Assets/GameScripts/DotNet/Core/CoreErrorCode.cs
Normal file
12
Assets/GameScripts/DotNet/Core/CoreErrorCode.cs
Normal file
@@ -0,0 +1,12 @@
|
||||
namespace TEngine.Core
|
||||
{
|
||||
public class CoreErrorCode
|
||||
{
|
||||
public const uint ErrRpcFail = 100000002; // Rpc消息发送失败
|
||||
public const uint ErrNotFoundRoute = 100000003; // 没有找到Route消息
|
||||
public const uint ErrRouteTimeout = 100000004; // 发送Route消息超时
|
||||
public const uint Error_NotFindEntity = 100000008; // 没有找到Entity
|
||||
public const uint Error_CopyTimeout = 100000009; // CopyTimeout不能小于或等于0
|
||||
public const uint Error_Transfer = 100000010;// 传送发生了错误
|
||||
}
|
||||
}
|
11
Assets/GameScripts/DotNet/Core/CoreErrorCode.cs.meta
Normal file
11
Assets/GameScripts/DotNet/Core/CoreErrorCode.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d0b2fb99ac2580c418659e6a1328206b
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
8
Assets/GameScripts/DotNet/Core/CoroutineLock.meta
Normal file
8
Assets/GameScripts/DotNet/Core/CoroutineLock.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 21519f62191bd1447bfafd815de9046d
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@@ -0,0 +1,61 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace TEngine.Core
|
||||
{
|
||||
public sealed class CoroutineLockQueue : IDisposable
|
||||
{
|
||||
public long Key { get; private set; }
|
||||
public CoroutineLockQueueType CoroutineLockQueueType { get; private set; }
|
||||
private readonly Queue<WaitCoroutineLock> _waitCoroutineLocks = new Queue<WaitCoroutineLock>();
|
||||
|
||||
public static CoroutineLockQueue Create(long key, int time, CoroutineLockQueueType coroutineLockQueueType)
|
||||
{
|
||||
var coroutineLockQueue = Pool<CoroutineLockQueue>.Rent();
|
||||
coroutineLockQueue.Key = key;
|
||||
coroutineLockQueue.CoroutineLockQueueType = coroutineLockQueueType;
|
||||
return coroutineLockQueue;
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
Key = 0;
|
||||
CoroutineLockQueueType = null;
|
||||
Pool<CoroutineLockQueue>.Return(this);
|
||||
}
|
||||
|
||||
public async FTask<WaitCoroutineLock> Lock(string tag, int time)
|
||||
{
|
||||
#if TENGINE_DEVELOP
|
||||
if (_waitCoroutineLocks.Count >= 100)
|
||||
{
|
||||
// 当等待队列超过100个、表示这个协程锁可能有问题、打印一个警告方便排查错误
|
||||
Log.Warning($"too much waitCoroutineLock CoroutineLockQueueType:{CoroutineLockQueueType.Name} Key:{Key} Count: {_waitCoroutineLocks.Count} ");
|
||||
}
|
||||
#endif
|
||||
var waitCoroutineLock = WaitCoroutineLock.Create(this, tag, time);
|
||||
_waitCoroutineLocks.Enqueue(waitCoroutineLock);
|
||||
return await waitCoroutineLock.Tcs;
|
||||
}
|
||||
|
||||
public void Release()
|
||||
{
|
||||
if (_waitCoroutineLocks.Count == 0)
|
||||
{
|
||||
CoroutineLockQueueType.Remove(Key);
|
||||
return;
|
||||
}
|
||||
|
||||
while (_waitCoroutineLocks.TryDequeue(out var waitCoroutineLock))
|
||||
{
|
||||
if (waitCoroutineLock.IsDisposed)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
waitCoroutineLock.SetResult();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8f07b80619d455d4499aefbc3eab9f65
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@@ -0,0 +1,37 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace TEngine.Core
|
||||
{
|
||||
public sealed class CoroutineLockQueueType
|
||||
{
|
||||
public readonly string Name;
|
||||
private readonly Dictionary<long, CoroutineLockQueue> _coroutineLockQueues = new Dictionary<long, CoroutineLockQueue>();
|
||||
|
||||
private CoroutineLockQueueType() { }
|
||||
public CoroutineLockQueueType(string name)
|
||||
{
|
||||
Name = name;
|
||||
}
|
||||
|
||||
public async FTask<WaitCoroutineLock> Lock(long key, string tag = null, int time = 10000)
|
||||
{
|
||||
if (_coroutineLockQueues.TryGetValue(key, out var coroutineLockQueue))
|
||||
{
|
||||
return await coroutineLockQueue.Lock(tag,time);
|
||||
}
|
||||
|
||||
coroutineLockQueue = CoroutineLockQueue.Create(key, time, this);
|
||||
_coroutineLockQueues.Add(key, coroutineLockQueue);
|
||||
return WaitCoroutineLock.Create(coroutineLockQueue, tag, time);
|
||||
}
|
||||
|
||||
public void Remove(long key)
|
||||
{
|
||||
if (_coroutineLockQueues.Remove(key, out var coroutineLockQueue))
|
||||
{
|
||||
coroutineLockQueue.Dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2067a4304a800324bbe9c547eefac9fa
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@@ -0,0 +1,93 @@
|
||||
using System;
|
||||
using TEngine.Core;
|
||||
|
||||
namespace TEngine.Core
|
||||
{
|
||||
public struct CoroutineLockTimeout
|
||||
{
|
||||
public long LockId;
|
||||
public WaitCoroutineLock WaitCoroutineLock;
|
||||
}
|
||||
|
||||
public sealed class OnCoroutineLockTimeout : EventSystem<CoroutineLockTimeout>
|
||||
{
|
||||
public override void Handler(CoroutineLockTimeout self)
|
||||
{
|
||||
if (self.LockId != self.WaitCoroutineLock.LockId)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var coroutineLockQueue = self.WaitCoroutineLock.CoroutineLockQueue;
|
||||
var coroutineLockQueueType = coroutineLockQueue.CoroutineLockQueueType;
|
||||
var key = coroutineLockQueue.Key;
|
||||
Log.Error($"coroutine lock timeout CoroutineLockQueueType:{coroutineLockQueueType.Name} Key:{key} Tag:{self.WaitCoroutineLock.Tag}");
|
||||
}
|
||||
}
|
||||
|
||||
public sealed class WaitCoroutineLock : IDisposable
|
||||
{
|
||||
private long _timerId;
|
||||
public bool IsDisposed => LockId == 0;
|
||||
public string Tag { get; private set; }
|
||||
public long LockId { get; private set; }
|
||||
public FTask<WaitCoroutineLock> Tcs { get; private set; }
|
||||
public CoroutineLockQueue CoroutineLockQueue{ get; private set; }
|
||||
|
||||
public static WaitCoroutineLock Create(CoroutineLockQueue coroutineLockQueue, string tag, int timeOut)
|
||||
{
|
||||
var lockId = IdFactory.NextRunTimeId();
|
||||
var waitCoroutineLock = Pool<WaitCoroutineLock>.Rent();
|
||||
|
||||
waitCoroutineLock.Tag = tag;
|
||||
waitCoroutineLock.LockId = lockId;
|
||||
waitCoroutineLock.CoroutineLockQueue = coroutineLockQueue;
|
||||
waitCoroutineLock.Tcs = FTask<WaitCoroutineLock>.Create();
|
||||
waitCoroutineLock._timerId = TimerScheduler.Instance.Core.OnceTimer(timeOut, new CoroutineLockTimeout()
|
||||
{
|
||||
LockId = lockId, WaitCoroutineLock = waitCoroutineLock
|
||||
});
|
||||
|
||||
return waitCoroutineLock;
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
if (IsDisposed)
|
||||
{
|
||||
Log.Error("WaitCoroutineLock is Dispose");
|
||||
return;
|
||||
}
|
||||
|
||||
Release(CoroutineLockQueue);
|
||||
|
||||
LockId = 0;
|
||||
Tcs = null;
|
||||
Tag = null;
|
||||
CoroutineLockQueue = null;
|
||||
|
||||
if (_timerId != 0)
|
||||
{
|
||||
TimerScheduler.Instance.Core.RemoveByRef(ref _timerId);
|
||||
}
|
||||
|
||||
Pool<WaitCoroutineLock>.Return(this);
|
||||
}
|
||||
|
||||
private static void Release(CoroutineLockQueue coroutineLockQueue)
|
||||
{
|
||||
// 放到下一帧执行释放锁、如果不这样、会导致逻辑的顺序不正常
|
||||
ThreadSynchronizationContext.Main.Post(coroutineLockQueue.Release);
|
||||
}
|
||||
|
||||
public void SetResult()
|
||||
{
|
||||
if (Tcs == null)
|
||||
{
|
||||
throw new NullReferenceException("SetResult tcs is null");
|
||||
}
|
||||
|
||||
Tcs.SetResult(this);
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1ee0d61ec53909c4695fe2ecc97f42bd
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
8
Assets/GameScripts/DotNet/Core/DataBase.meta
Normal file
8
Assets/GameScripts/DotNet/Core/DataBase.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9f6012de0e164ce4da102c93fa2df9ea
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
8
Assets/GameScripts/DotNet/Core/DataBase/Base.meta
Normal file
8
Assets/GameScripts/DotNet/Core/DataBase/Base.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: bd10fb6ee217e1e4a82db518e161aaec
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
48
Assets/GameScripts/DotNet/Core/DataBase/Base/IDateBase.cs
Normal file
48
Assets/GameScripts/DotNet/Core/DataBase/Base/IDateBase.cs
Normal file
@@ -0,0 +1,48 @@
|
||||
#if TENGINE_NET
|
||||
using System.Linq.Expressions;
|
||||
#pragma warning disable CS8625
|
||||
|
||||
namespace TEngine.Core.DataBase;
|
||||
|
||||
public interface IDateBase
|
||||
{
|
||||
public static readonly CoroutineLockQueueType DataBaseLock = new CoroutineLockQueueType("DataBaseLock");
|
||||
IDateBase Initialize(string connectionString, string dbName);
|
||||
FTask<long> Count<T>(string collection = null) where T : Entity;
|
||||
FTask<long> Count<T>(Expression<Func<T, bool>> filter, string collection = null) where T : Entity;
|
||||
FTask<bool> Exist<T>(string collection = null) where T : Entity;
|
||||
FTask<bool> Exist<T>(Expression<Func<T, bool>> filter, string collection = null) where T : Entity;
|
||||
FTask<T> QueryNotLock<T>(long id, string collection = null) where T : Entity;
|
||||
FTask<T> Query<T>(long id, string collection = null) where T : Entity;
|
||||
FTask<(int count, List<T> dates)> QueryCountAndDatesByPage<T>(Expression<Func<T, bool>> filter, int pageIndex, int pageSize, string collection = null) where T : Entity;
|
||||
FTask<(int count, List<T> dates)> QueryCountAndDatesByPage<T>(Expression<Func<T, bool>> filter, int pageIndex, int pageSize, string[] cols, string collection = null) where T : Entity;
|
||||
FTask<List<T>> QueryByPage<T>(Expression<Func<T, bool>> filter, int pageIndex, int pageSize, string collection = null) where T : Entity;
|
||||
FTask<List<T>> QueryByPage<T>(Expression<Func<T, bool>> filter, int pageIndex, int pageSize, string[] cols, string collection = null) where T : Entity;
|
||||
FTask<List<T>> QueryByPageOrderBy<T>(Expression<Func<T, bool>> filter, int pageIndex, int pageSize, Expression<Func<T, object>> orderByExpression, bool isAsc = true, string collection = null) where T : Entity;
|
||||
FTask<T> First<T>(Expression<Func<T, bool>> filter, string collection = null) where T : Entity;
|
||||
FTask<T> First<T>(string json, string[] cols, string collection = null) where T : Entity;
|
||||
FTask<T> Last<T>(Expression<Func<T, bool>> filter, string collection = null) where T : Entity;
|
||||
FTask<List<T>> QueryOrderBy<T>(Expression<Func<T, bool>> filter, Expression<Func<T, object>> orderByExpression, bool isAsc = true, string collection = null) where T : Entity;
|
||||
FTask<List<T>> Query<T>(Expression<Func<T, bool>> filter, string collection = null) where T : Entity;
|
||||
FTask Query(long id, List<string> collectionNames, List<Entity> result);
|
||||
FTask<List<T>> QueryJson<T>(string json, string collection = null) where T : Entity;
|
||||
FTask<List<T>> QueryJson<T>(string json, string[] cols, string collection = null) where T : Entity;
|
||||
FTask<List<T>> QueryJson<T>(long taskId, string json, string collection = null) where T : Entity;
|
||||
FTask<List<T>> Query<T>(Expression<Func<T, bool>> filter, string[] cols, string collection = null) where T : class;
|
||||
FTask Save<T>(T entity, string collection = null) where T : Entity, new();
|
||||
FTask Save(long id, List<Entity> entities);
|
||||
FTask Save<T>(object transactionSession, T entity, string collection = null) where T : Entity;
|
||||
FTask Insert<T>(T entity, string collection = null) where T : Entity, new();
|
||||
FTask InsertBatch<T>(IEnumerable<T> list, string collection = null) where T : Entity, new();
|
||||
FTask InsertBatch<T>(object transactionSession, IEnumerable<T> list, string collection = null) where T : Entity, new();
|
||||
FTask<long> Remove<T>(object transactionSession, long id, string collection = null) where T : Entity, new();
|
||||
FTask<long> Remove<T>(long id, string collection = null) where T : Entity, new();
|
||||
FTask<long> Remove<T>(long id,object transactionSession, Expression<Func<T, bool>> filter, string collection = null) where T : Entity, new();
|
||||
FTask<long> Remove<T>(long id, Expression<Func<T, bool>> filter, string collection = null) where T : Entity, new();
|
||||
FTask<long> Sum<T>(Expression<Func<T, bool>> filter, Expression<Func<T, object>> sumExpression, string collection = null) where T : Entity;
|
||||
FTask CreateIndex<T>(string collection, params object[] keys) where T : Entity;
|
||||
FTask CreateIndex<T>(params object[] keys) where T : Entity;
|
||||
FTask CreateDB<T>() where T : Entity;
|
||||
FTask CreateDB(Type type);
|
||||
}
|
||||
#endif
|
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 801a4f2fbf5d7944480423ade9d8a998
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
42
Assets/GameScripts/DotNet/Core/DataBase/Base/World.cs
Normal file
42
Assets/GameScripts/DotNet/Core/DataBase/Base/World.cs
Normal file
@@ -0,0 +1,42 @@
|
||||
#if TENGINE_NET
|
||||
namespace TEngine.Core.DataBase;
|
||||
|
||||
public sealed class World
|
||||
{
|
||||
public uint Id { get; private init; }
|
||||
public IDateBase DateBase { get; private init; }
|
||||
public WorldConfigInfo Config => ConfigTableManage.WorldConfigInfo(Id);
|
||||
private static readonly Dictionary<uint, World> Worlds = new();
|
||||
|
||||
public World(WorldConfigInfo worldConfigInfo)
|
||||
{
|
||||
Id = worldConfigInfo.Id;
|
||||
var dbType = worldConfigInfo.DbType.ToLower();
|
||||
|
||||
switch (dbType)
|
||||
{
|
||||
case "mongodb":
|
||||
{
|
||||
DateBase = new MongoDataBase();
|
||||
DateBase.Initialize(worldConfigInfo.DbConnection, worldConfigInfo.DbName);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
throw new Exception("No supported database");
|
||||
}
|
||||
}
|
||||
|
||||
public static World Create(uint id)
|
||||
{
|
||||
if (Worlds.TryGetValue(id, out var world))
|
||||
{
|
||||
return world;
|
||||
}
|
||||
|
||||
var worldConfigInfo = ConfigTableManage.WorldConfigInfo(id);
|
||||
world = new World(worldConfigInfo);
|
||||
Worlds.Add(id, world);
|
||||
return world;
|
||||
}
|
||||
}
|
||||
#endif
|
11
Assets/GameScripts/DotNet/Core/DataBase/Base/World.cs.meta
Normal file
11
Assets/GameScripts/DotNet/Core/DataBase/Base/World.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e207b62400a4d2742945b50eb84f8233
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@@ -0,0 +1,12 @@
|
||||
#if TENGINE_NET
|
||||
namespace TEngine.Core.DataBase;
|
||||
|
||||
public class WorldConfigInfo
|
||||
{
|
||||
public uint Id;
|
||||
public string WorldName;
|
||||
public string DbConnection;
|
||||
public string DbName;
|
||||
public string DbType;
|
||||
}
|
||||
#endif
|
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1c1d63a41ee591348a2aeab0a1ff5b2f
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
556
Assets/GameScripts/DotNet/Core/DataBase/MongoDataBase.cs
Normal file
556
Assets/GameScripts/DotNet/Core/DataBase/MongoDataBase.cs
Normal file
@@ -0,0 +1,556 @@
|
||||
#if TENGINE_NET
|
||||
using System.Linq.Expressions;
|
||||
using TEngine.Core;
|
||||
using MongoDB.Bson;
|
||||
using MongoDB.Driver;
|
||||
|
||||
namespace TEngine.Core.DataBase;
|
||||
|
||||
public sealed class MongoDataBase : IDateBase
|
||||
{
|
||||
private string _dbName;
|
||||
private string _connectionString;
|
||||
private MongoClient _mongoClient;
|
||||
private IMongoDatabase _mongoDatabase;
|
||||
private readonly HashSet<string> _collections = new HashSet<string>();
|
||||
|
||||
public IDateBase Initialize(string connectionString, string dbName)
|
||||
{
|
||||
_dbName = dbName;
|
||||
_connectionString = connectionString;
|
||||
_mongoClient = new MongoClient(connectionString);
|
||||
_mongoDatabase = _mongoClient.GetDatabase(dbName);
|
||||
// 记录所有集合名
|
||||
_collections.UnionWith(_mongoDatabase.ListCollectionNames().ToList());
|
||||
return this;
|
||||
}
|
||||
|
||||
#region Other
|
||||
|
||||
public async FTask<long> Sum<T>(Expression<Func<T, bool>> filter, Expression<Func<T, object>> sumExpression, string collection = null) where T : Entity
|
||||
{
|
||||
var member = (MemberExpression) ((UnaryExpression) sumExpression.Body).Operand;
|
||||
|
||||
var projection =
|
||||
new BsonDocument("_id", "null").Add("Result", new BsonDocument("$sum", $"${member.Member.Name}"));
|
||||
|
||||
var data = await GetCollection<T>(collection).Aggregate().Match(filter).Group(projection)
|
||||
.FirstOrDefaultAsync();
|
||||
|
||||
return data == null ? 0 : Convert.ToInt64(data["Result"]);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region GetCollection
|
||||
|
||||
private IMongoCollection<T> GetCollection<T>(string collection = null)
|
||||
{
|
||||
return _mongoDatabase.GetCollection<T>(collection ?? typeof(T).Name);
|
||||
}
|
||||
|
||||
private IMongoCollection<Entity> GetCollection(string name)
|
||||
{
|
||||
return _mongoDatabase.GetCollection<Entity>(name);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Count
|
||||
|
||||
public async FTask<long> Count<T>(string collection = null) where T : Entity
|
||||
{
|
||||
return await GetCollection<T>(collection).CountDocumentsAsync(d => true);
|
||||
}
|
||||
|
||||
public async FTask<long> Count<T>(Expression<Func<T, bool>> filter, string collection = null) where T : Entity
|
||||
{
|
||||
return await GetCollection<T>(collection).CountDocumentsAsync(filter);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Exist
|
||||
|
||||
public async FTask<bool> Exist<T>(string collection = null) where T : Entity
|
||||
{
|
||||
return await Count<T>(collection) > 0;
|
||||
}
|
||||
|
||||
public async FTask<bool> Exist<T>(Expression<Func<T, bool>> filter, string collection = null) where T : Entity
|
||||
{
|
||||
return await Count(filter, collection) > 0;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Query
|
||||
public async FTask<T> QueryNotLock<T>(long id, string collection = null) where T : Entity
|
||||
{
|
||||
var cursor = await GetCollection<T>(collection).FindAsync(d => d.Id == id);
|
||||
var v = await cursor.FirstOrDefaultAsync();
|
||||
return v;
|
||||
}
|
||||
|
||||
public async FTask<T> Query<T>(long id, string collection = null) where T : Entity
|
||||
{
|
||||
using (await IDateBase.DataBaseLock.Lock(id))
|
||||
{
|
||||
var cursor = await GetCollection<T>(collection).FindAsync(d => d.Id == id);
|
||||
var v = await cursor.FirstOrDefaultAsync();
|
||||
return v;
|
||||
}
|
||||
}
|
||||
|
||||
public async FTask<(int count, List<T> dates)> QueryCountAndDatesByPage<T>(Expression<Func<T, bool>> filter, int pageIndex, int pageSize, string collection = null) where T : Entity
|
||||
{
|
||||
using (await IDateBase.DataBaseLock.Lock(RandomHelper.RandInt64()))
|
||||
{
|
||||
var count = await Count(filter);
|
||||
var dates = await QueryByPage(filter, pageIndex, pageSize, collection);
|
||||
return ((int)count, dates);
|
||||
}
|
||||
}
|
||||
|
||||
public async FTask<(int count, List<T> dates)> QueryCountAndDatesByPage<T>(Expression<Func<T, bool>> filter, int pageIndex, int pageSize, string[] cols, string collection = null) where T : Entity
|
||||
{
|
||||
using (await IDateBase.DataBaseLock.Lock(RandomHelper.RandInt64()))
|
||||
{
|
||||
var count = await Count(filter);
|
||||
|
||||
var dates = await QueryByPage(filter, pageIndex, pageSize, cols, collection);
|
||||
|
||||
return ((int) count, dates);
|
||||
}
|
||||
}
|
||||
|
||||
public async FTask<List<T>> QueryByPage<T>(Expression<Func<T, bool>> filter, int pageIndex, int pageSize, string collection = null) where T : Entity
|
||||
{
|
||||
using (await IDateBase.DataBaseLock.Lock(RandomHelper.RandInt64()))
|
||||
{
|
||||
return await GetCollection<T>(collection).Find(filter).Skip((pageIndex - 1) * pageSize)
|
||||
.Limit(pageSize)
|
||||
.ToListAsync();
|
||||
}
|
||||
}
|
||||
|
||||
public async FTask<List<T>> QueryByPage<T>(Expression<Func<T, bool>> filter, int pageIndex, int pageSize, string[] cols, string collection = null) where T : Entity
|
||||
{
|
||||
using (await IDateBase.DataBaseLock.Lock(RandomHelper.RandInt64()))
|
||||
{
|
||||
var projection = Builders<T>.Projection.Include("");
|
||||
|
||||
foreach (var col in cols)
|
||||
{
|
||||
projection = projection.Include(col);
|
||||
}
|
||||
|
||||
return await GetCollection<T>(collection).Find(filter).Project<T>(projection)
|
||||
.Skip((pageIndex - 1) * pageSize).Limit(pageSize).ToListAsync();
|
||||
}
|
||||
}
|
||||
|
||||
public async FTask<List<T>> QueryByPageOrderBy<T>(Expression<Func<T, bool>> filter, int pageIndex, int pageSize, Expression<Func<T, object>> orderByExpression, bool isAsc = true, string collection = null) where T : Entity
|
||||
{
|
||||
using (await IDateBase.DataBaseLock.Lock(RandomHelper.RandInt64()))
|
||||
{
|
||||
if (isAsc)
|
||||
{
|
||||
return await GetCollection<T>(collection).Find(filter).SortBy(orderByExpression)
|
||||
.Skip((pageIndex - 1) * pageSize).Limit(pageSize).ToListAsync();
|
||||
}
|
||||
|
||||
return await GetCollection<T>(collection).Find(filter).SortByDescending(orderByExpression)
|
||||
.Skip((pageIndex - 1) * pageSize).Limit(pageSize).ToListAsync();
|
||||
}
|
||||
}
|
||||
|
||||
public async FTask<T> First<T>(Expression<Func<T, bool>> filter, string collection = null) where T : Entity
|
||||
{
|
||||
using (await IDateBase.DataBaseLock.Lock(RandomHelper.RandInt64()))
|
||||
{
|
||||
var cursor = await GetCollection<T>(collection).FindAsync(filter);
|
||||
|
||||
return await cursor.FirstOrDefaultAsync();
|
||||
}
|
||||
}
|
||||
|
||||
public async FTask<T> First<T>(string json, string[] cols, string collection = null) where T : Entity
|
||||
{
|
||||
using (await IDateBase.DataBaseLock.Lock(RandomHelper.RandInt64()))
|
||||
{
|
||||
var projection = Builders<T>.Projection.Include("");
|
||||
|
||||
foreach (var col in cols)
|
||||
{
|
||||
projection = projection.Include(col);
|
||||
}
|
||||
|
||||
var options = new FindOptions<T, T> {Projection = projection};
|
||||
|
||||
FilterDefinition<T> filterDefinition = new JsonFilterDefinition<T>(json);
|
||||
|
||||
var cursor = await GetCollection<T>(collection).FindAsync(filterDefinition, options);
|
||||
|
||||
return await cursor.FirstOrDefaultAsync();
|
||||
}
|
||||
}
|
||||
|
||||
public async FTask<T> Last<T>(Expression<Func<T, bool>> filter, string collection = null) where T : Entity
|
||||
{
|
||||
using (await IDateBase.DataBaseLock.Lock(RandomHelper.RandInt64()))
|
||||
{
|
||||
var cursor = await GetCollection<T>(collection).FindAsync(filter);
|
||||
|
||||
var list = await cursor.ToListAsync();
|
||||
|
||||
return list.LastOrDefault();
|
||||
}
|
||||
}
|
||||
|
||||
public async FTask<List<T>> QueryOrderBy<T>(Expression<Func<T, bool>> filter, Expression<Func<T, object>> orderByExpression, bool isAsc = true, string collection = null) where T : Entity
|
||||
{
|
||||
using (await IDateBase.DataBaseLock.Lock(RandomHelper.RandInt64()))
|
||||
{
|
||||
if (isAsc)
|
||||
{
|
||||
return await GetCollection<T>(collection).Find(filter).SortBy(orderByExpression).ToListAsync();
|
||||
}
|
||||
|
||||
return await GetCollection<T>(collection).Find(filter).SortByDescending(orderByExpression)
|
||||
.ToListAsync();
|
||||
}
|
||||
}
|
||||
|
||||
public async FTask<List<T>> Query<T>(Expression<Func<T, bool>> filter, string collection = null) where T : Entity
|
||||
{
|
||||
using (await IDateBase.DataBaseLock.Lock(RandomHelper.RandInt64()))
|
||||
{
|
||||
var cursor = await GetCollection<T>(collection).FindAsync(filter);
|
||||
var v = await cursor.ToListAsync();
|
||||
return v;
|
||||
}
|
||||
}
|
||||
|
||||
public async FTask Query(long id, List<string> collectionNames, List<Entity> result)
|
||||
{
|
||||
using (await IDateBase.DataBaseLock.Lock(id))
|
||||
{
|
||||
if (collectionNames == null || collectionNames.Count == 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
foreach (var collectionName in collectionNames)
|
||||
{
|
||||
var cursor = await GetCollection(collectionName).FindAsync(d => d.Id == id);
|
||||
|
||||
var e = await cursor.FirstOrDefaultAsync();
|
||||
|
||||
if (e == null)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
result.Add(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public async FTask<List<T>> QueryJson<T>(string json, string collection = null) where T : Entity
|
||||
{
|
||||
using (await IDateBase.DataBaseLock.Lock(RandomHelper.RandInt64()))
|
||||
{
|
||||
FilterDefinition<T> filterDefinition = new JsonFilterDefinition<T>(json);
|
||||
var cursor = await GetCollection<T>(collection).FindAsync(filterDefinition);
|
||||
var v = await cursor.ToListAsync();
|
||||
return v;
|
||||
}
|
||||
}
|
||||
|
||||
public async FTask<List<T>> QueryJson<T>(string json, string[] cols, string collection = null) where T : Entity
|
||||
{
|
||||
using (await IDateBase.DataBaseLock.Lock(RandomHelper.RandInt64()))
|
||||
{
|
||||
var projection = Builders<T>.Projection.Include("");
|
||||
|
||||
foreach (var col in cols)
|
||||
{
|
||||
projection = projection.Include(col);
|
||||
}
|
||||
|
||||
var options = new FindOptions<T, T> {Projection = projection};
|
||||
|
||||
FilterDefinition<T> filterDefinition = new JsonFilterDefinition<T>(json);
|
||||
|
||||
var cursor = await GetCollection<T>(collection).FindAsync(filterDefinition, options);
|
||||
var v = await cursor.ToListAsync();
|
||||
return v;
|
||||
}
|
||||
}
|
||||
|
||||
public async FTask<List<T>> QueryJson<T>(long taskId, string json, string collection = null) where T : Entity
|
||||
{
|
||||
using (await IDateBase.DataBaseLock.Lock(taskId))
|
||||
{
|
||||
FilterDefinition<T> filterDefinition = new JsonFilterDefinition<T>(json);
|
||||
var cursor = await GetCollection<T>(collection).FindAsync(filterDefinition);
|
||||
var v = await cursor.ToListAsync();
|
||||
return v;
|
||||
}
|
||||
}
|
||||
|
||||
public async FTask<List<T>> Query<T>(Expression<Func<T, bool>> filter, string[] cols, string collection = null) where T : class
|
||||
{
|
||||
using (await IDateBase.DataBaseLock.Lock(RandomHelper.RandInt64()))
|
||||
{
|
||||
var projection = Builders<T>.Projection.Include(cols[0]);
|
||||
|
||||
for (var i = 1; i < cols.Length; i++)
|
||||
{
|
||||
projection = projection.Include(cols[i]);
|
||||
}
|
||||
|
||||
return await GetCollection<T>(collection).Find(filter).Project<T>(projection).ToListAsync();
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Save
|
||||
|
||||
public async FTask Save<T>(object transactionSession, T entity, string collection = null) where T : Entity
|
||||
{
|
||||
if (entity == null)
|
||||
{
|
||||
Log.Error($"save entity is null: {typeof(T).Name}");
|
||||
return;
|
||||
}
|
||||
|
||||
var clone = MongoHelper.Instance.Clone(entity);
|
||||
|
||||
using (await IDateBase.DataBaseLock.Lock(clone.Id))
|
||||
{
|
||||
await GetCollection(collection ?? clone.GetType().Name).ReplaceOneAsync(
|
||||
(IClientSessionHandle) transactionSession, d => d.Id == clone.Id, clone,
|
||||
new ReplaceOptions {IsUpsert = true});
|
||||
}
|
||||
}
|
||||
|
||||
public async FTask Save<T>(T entity, string collection = null) where T : Entity, new()
|
||||
{
|
||||
if (entity == null)
|
||||
{
|
||||
Log.Error($"save entity is null: {typeof(T).Name}");
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
var clone = MongoHelper.Instance.Clone(entity);
|
||||
|
||||
using (await IDateBase.DataBaseLock.Lock(clone.Id))
|
||||
{
|
||||
await GetCollection(collection ?? clone.GetType().Name).ReplaceOneAsync(d => d.Id == clone.Id, clone,
|
||||
new ReplaceOptions {IsUpsert = true});
|
||||
}
|
||||
}
|
||||
|
||||
private async FTask SaveBase<T>(T entity, string collection = null) where T : Entity
|
||||
{
|
||||
if (entity == null)
|
||||
{
|
||||
Log.Error($"save entity is null: {typeof(T).Name}");
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
var clone = MongoHelper.Instance.Clone(entity);
|
||||
|
||||
using (await IDateBase.DataBaseLock.Lock(clone.Id))
|
||||
{
|
||||
await GetCollection(collection ?? clone.GetType().Name).ReplaceOneAsync(d => d.Id == clone.Id, clone, new ReplaceOptions {IsUpsert = true});
|
||||
}
|
||||
}
|
||||
|
||||
public async FTask Save(long id, List<Entity> entities)
|
||||
{
|
||||
if (entities == null)
|
||||
{
|
||||
Log.Error("save entity is null");
|
||||
return;
|
||||
}
|
||||
|
||||
var clones = MongoHelper.Instance.Clone(entities);
|
||||
|
||||
using (await IDateBase.DataBaseLock.Lock(id))
|
||||
{
|
||||
foreach (Entity clone in clones)
|
||||
{
|
||||
try
|
||||
{
|
||||
await GetCollection(clone.GetType().Name).ReplaceOneAsync(d => d.Id == clone.Id, clone,
|
||||
new ReplaceOptions {IsUpsert = true});
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Log.Error($"Save List Entity Error: {clone.GetType().Name} {clone}\n{e}");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Insert
|
||||
|
||||
public FTask Insert<T>(T entity, string collection = null) where T : Entity, new()
|
||||
{
|
||||
return Save(entity);
|
||||
}
|
||||
|
||||
public async FTask InsertBatch<T>(IEnumerable<T> list, string collection = null) where T : Entity, new()
|
||||
{
|
||||
using (await IDateBase.DataBaseLock.Lock(RandomHelper.RandInt64()))
|
||||
{
|
||||
await GetCollection<T>(collection ?? typeof(T).Name).InsertManyAsync(list);
|
||||
}
|
||||
}
|
||||
|
||||
public async FTask InsertBatch<T>(object transactionSession, IEnumerable<T> list, string collection = null) where T : Entity, new()
|
||||
{
|
||||
using (await IDateBase.DataBaseLock.Lock(RandomHelper.RandInt64()))
|
||||
{
|
||||
await GetCollection<T>(collection ?? typeof(T).Name).InsertManyAsync((IClientSessionHandle) transactionSession, list);
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Remove
|
||||
|
||||
public async FTask<long> Remove<T>(object transactionSession, long id, string collection = null) where T : Entity, new()
|
||||
{
|
||||
using (await IDateBase.DataBaseLock.Lock(id))
|
||||
{
|
||||
var result = await GetCollection<T>(collection).DeleteOneAsync((IClientSessionHandle) transactionSession, d => d.Id == id);
|
||||
return result.DeletedCount;
|
||||
}
|
||||
}
|
||||
|
||||
public async FTask<long> Remove<T>(long id, string collection = null) where T : Entity, new()
|
||||
{
|
||||
using (await IDateBase.DataBaseLock.Lock(id))
|
||||
{
|
||||
var result = await GetCollection<T>(collection).DeleteOneAsync(d => d.Id == id);
|
||||
return result.DeletedCount;
|
||||
}
|
||||
}
|
||||
|
||||
public async FTask<long> Remove<T>(long id, object transactionSession, Expression<Func<T, bool>> filter, string collection = null) where T : Entity, new()
|
||||
{
|
||||
using (await IDateBase.DataBaseLock.Lock(id))
|
||||
{
|
||||
var result = await GetCollection<T>(collection).DeleteManyAsync((IClientSessionHandle) transactionSession, filter);
|
||||
return result.DeletedCount;
|
||||
}
|
||||
}
|
||||
|
||||
public async FTask<long> Remove<T>(long id, Expression<Func<T, bool>> filter, string collection = null) where T : Entity, new()
|
||||
{
|
||||
using (await IDateBase.DataBaseLock.Lock(id))
|
||||
{
|
||||
var result = await GetCollection<T>(collection).DeleteManyAsync(filter);
|
||||
return result.DeletedCount;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Index
|
||||
|
||||
/// <summary>
|
||||
/// 创建数据库索引
|
||||
/// </summary>
|
||||
/// <param name="collection"></param>
|
||||
/// <param name="keys"></param>
|
||||
/// <typeparam name="T"></typeparam>
|
||||
/// <code>
|
||||
/// 使用例子(可多个):
|
||||
/// 1 : Builders.IndexKeys.Ascending(d=>d.Id)
|
||||
/// 2 : Builders.IndexKeys.Descending(d=>d.Id).Ascending(d=>d.Name)
|
||||
/// 3 : Builders.IndexKeys.Descending(d=>d.Id),Builders.IndexKeys.Descending(d=>d.Name)
|
||||
/// </code>
|
||||
public async FTask CreateIndex<T>(string collection, params object[] keys) where T : Entity
|
||||
{
|
||||
if (keys == null || keys.Length <= 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var indexModels = new List<CreateIndexModel<T>>();
|
||||
|
||||
foreach (object key in keys)
|
||||
{
|
||||
IndexKeysDefinition<T> indexKeysDefinition = (IndexKeysDefinition<T>) key;
|
||||
|
||||
indexModels.Add(new CreateIndexModel<T>(indexKeysDefinition));
|
||||
}
|
||||
|
||||
await GetCollection<T>(collection).Indexes.CreateManyAsync(indexModels);
|
||||
}
|
||||
|
||||
public async FTask CreateIndex<T>(params object[] keys) where T : Entity
|
||||
{
|
||||
if (keys == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
List<CreateIndexModel<T>> indexModels = new List<CreateIndexModel<T>>();
|
||||
|
||||
foreach (object key in keys)
|
||||
{
|
||||
IndexKeysDefinition<T> indexKeysDefinition = (IndexKeysDefinition<T>) key;
|
||||
|
||||
indexModels.Add(new CreateIndexModel<T>(indexKeysDefinition));
|
||||
}
|
||||
|
||||
await GetCollection<T>().Indexes.CreateManyAsync(indexModels);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region CreateDB
|
||||
|
||||
public async FTask CreateDB<T>() where T : Entity
|
||||
{
|
||||
// 已经存在数据库表
|
||||
string name = typeof(T).Name;
|
||||
|
||||
if (_collections.Contains(name))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
await _mongoDatabase.CreateCollectionAsync(name);
|
||||
|
||||
_collections.Add(name);
|
||||
}
|
||||
|
||||
public async FTask CreateDB(Type type)
|
||||
{
|
||||
string name = type.Name;
|
||||
|
||||
if (_collections.Contains(name))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
await _mongoDatabase.CreateCollectionAsync(name);
|
||||
|
||||
_collections.Add(name);
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
#endif
|
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0aaa971dc58538e46b0e43df7cc72a2f
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
8
Assets/GameScripts/DotNet/Core/DataStructure.meta
Normal file
8
Assets/GameScripts/DotNet/Core/DataStructure.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ddb0edd718602754083d07d649e65d8f
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e9c6ac6ade3864b42887435f6eac263f
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@@ -0,0 +1,261 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
#pragma warning disable CS8625
|
||||
#pragma warning disable CS8618
|
||||
|
||||
namespace TEngine.DataStructure
|
||||
{
|
||||
/// <summary>
|
||||
/// 环形缓存(自动扩充、不会收缩缓存、所以不要用这个操作过大的IO流)
|
||||
/// 1、环大小8192,溢出的会自动增加环的大小。
|
||||
/// 2、每个块都是一个环形缓存,当溢出的时候会自动添加到下一个环中。
|
||||
/// 3、当读取完成后用过的环会放在缓存中,不会销毁掉。
|
||||
/// </summary>
|
||||
public sealed class CircularBuffer : Stream, IDisposable
|
||||
{
|
||||
private byte[] _lastBuffer;
|
||||
public const int ChunkSize = 8192; // 环形缓存块大小
|
||||
private readonly Queue<byte[]> _bufferCache = new Queue<byte[]>();
|
||||
private readonly Queue<byte[]> _bufferQueue = new Queue<byte[]>();
|
||||
public int FirstIndex { get; set; }
|
||||
public int LastIndex { get; set; }
|
||||
public override long Length
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_bufferQueue.Count == 0)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
return (_bufferQueue.Count - 1) * ChunkSize + LastIndex - FirstIndex;
|
||||
}
|
||||
}
|
||||
public byte[] First
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_bufferQueue.Count == 0)
|
||||
{
|
||||
AddLast();
|
||||
}
|
||||
|
||||
return _bufferQueue.Peek();
|
||||
}
|
||||
}
|
||||
public byte[] Last
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_bufferQueue.Count == 0)
|
||||
{
|
||||
AddLast();
|
||||
}
|
||||
|
||||
return _lastBuffer;
|
||||
}
|
||||
}
|
||||
|
||||
public void AddLast()
|
||||
{
|
||||
var buffer = _bufferCache.Count > 0 ? _bufferCache.Dequeue() : new byte[ChunkSize];
|
||||
_bufferQueue.Enqueue(buffer);
|
||||
_lastBuffer = buffer;
|
||||
}
|
||||
|
||||
public void RemoveFirst()
|
||||
{
|
||||
_bufferCache.Enqueue(_bufferQueue.Dequeue());
|
||||
}
|
||||
|
||||
public void Read(Stream stream, int count)
|
||||
{
|
||||
if (count > Length)
|
||||
{
|
||||
throw new Exception($"bufferList length < count, {Length} {count}");
|
||||
}
|
||||
|
||||
var copyCount = 0;
|
||||
while (copyCount < count)
|
||||
{
|
||||
var n = count - copyCount;
|
||||
if (ChunkSize - FirstIndex > n)
|
||||
{
|
||||
stream.Write(First, FirstIndex, n);
|
||||
FirstIndex += n;
|
||||
copyCount += n;
|
||||
}
|
||||
else
|
||||
{
|
||||
stream.Write(First, FirstIndex, ChunkSize - FirstIndex);
|
||||
copyCount += ChunkSize - FirstIndex;
|
||||
FirstIndex = 0;
|
||||
RemoveFirst();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void Read(Memory<byte> memory, int count)
|
||||
{
|
||||
if (count > Length)
|
||||
{
|
||||
throw new Exception($"bufferList length < count, {Length} {count}");
|
||||
}
|
||||
|
||||
var copyCount = 0;
|
||||
while (copyCount < count)
|
||||
{
|
||||
var n = count - copyCount;
|
||||
var asMemory = First.AsMemory();
|
||||
|
||||
if (ChunkSize - FirstIndex > n)
|
||||
{
|
||||
var slice = asMemory.Slice(FirstIndex, n);
|
||||
slice.CopyTo(memory.Slice(copyCount, n));
|
||||
FirstIndex += n;
|
||||
copyCount += n;
|
||||
}
|
||||
else
|
||||
{
|
||||
var length = ChunkSize - FirstIndex;
|
||||
var slice = asMemory.Slice(FirstIndex, length);
|
||||
slice.CopyTo(memory.Slice(copyCount, length));
|
||||
copyCount += ChunkSize - FirstIndex;
|
||||
FirstIndex = 0;
|
||||
RemoveFirst();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override int Read(byte[] buffer, int offset, int count)
|
||||
{
|
||||
if (buffer.Length < offset + count)
|
||||
{
|
||||
throw new Exception($"buffer length < count, buffer length: {buffer.Length} {offset} {count}");
|
||||
}
|
||||
|
||||
var length = Length;
|
||||
if (length < count)
|
||||
{
|
||||
count = (int) length;
|
||||
}
|
||||
|
||||
var copyCount = 0;
|
||||
while (copyCount < count)
|
||||
{
|
||||
var copyLength = count - copyCount;
|
||||
|
||||
if (ChunkSize - FirstIndex > copyLength)
|
||||
{
|
||||
Array.Copy(First, FirstIndex, buffer, copyCount + offset, copyLength);
|
||||
|
||||
FirstIndex += copyLength;
|
||||
copyCount += copyLength;
|
||||
continue;
|
||||
}
|
||||
|
||||
Array.Copy(First, FirstIndex, buffer, copyCount + offset, ChunkSize - FirstIndex);
|
||||
copyCount += ChunkSize - FirstIndex;
|
||||
FirstIndex = 0;
|
||||
|
||||
RemoveFirst();
|
||||
}
|
||||
|
||||
return count;
|
||||
}
|
||||
|
||||
public void Write(byte[] buffer)
|
||||
{
|
||||
Write(buffer, 0, buffer.Length);
|
||||
}
|
||||
|
||||
public void Write(Stream stream)
|
||||
{
|
||||
var copyCount = 0;
|
||||
var count = (int) (stream.Length - stream.Position);
|
||||
|
||||
while (copyCount < count)
|
||||
{
|
||||
if (LastIndex == ChunkSize)
|
||||
{
|
||||
AddLast();
|
||||
LastIndex = 0;
|
||||
}
|
||||
|
||||
var n = count - copyCount;
|
||||
|
||||
if (ChunkSize - LastIndex > n)
|
||||
{
|
||||
_ = stream.Read(Last, LastIndex, n);
|
||||
LastIndex += count - copyCount;
|
||||
copyCount += n;
|
||||
}
|
||||
else
|
||||
{
|
||||
_ = stream.Read(Last, LastIndex, ChunkSize - LastIndex);
|
||||
copyCount += ChunkSize - LastIndex;
|
||||
LastIndex = ChunkSize;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override void Write(byte[] buffer, int offset, int count)
|
||||
{
|
||||
var copyCount = 0;
|
||||
|
||||
while (copyCount < count)
|
||||
{
|
||||
if (ChunkSize == LastIndex)
|
||||
{
|
||||
AddLast();
|
||||
LastIndex = 0;
|
||||
}
|
||||
|
||||
var byteLength = count - copyCount;
|
||||
|
||||
if (ChunkSize - LastIndex > byteLength)
|
||||
{
|
||||
Array.Copy(buffer, copyCount + offset, Last, LastIndex, byteLength);
|
||||
LastIndex += byteLength;
|
||||
copyCount += byteLength;
|
||||
}
|
||||
else
|
||||
{
|
||||
Array.Copy(buffer, copyCount + offset, _lastBuffer, LastIndex, ChunkSize - LastIndex);
|
||||
copyCount += ChunkSize - LastIndex;
|
||||
LastIndex = ChunkSize;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override bool CanRead { get; } = true;
|
||||
public override bool CanSeek { get; } = false;
|
||||
public override bool CanWrite { get; } = true;
|
||||
public override long Position { get; set; }
|
||||
|
||||
public override void Flush()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public override long Seek(long offset, SeekOrigin origin)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public override void SetLength(long value)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public new void Dispose()
|
||||
{
|
||||
_bufferQueue.Clear();
|
||||
_lastBuffer = null;
|
||||
FirstIndex = 0;
|
||||
LastIndex = 0;
|
||||
base.Dispose();
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 28188b5e2acefe14a996fb93df6b2fc6
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@@ -0,0 +1,115 @@
|
||||
using System;
|
||||
using System.Collections.Concurrent;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
#pragma warning disable CS8603
|
||||
|
||||
namespace TEngine.DataStructure
|
||||
{
|
||||
public class ConcurrentOneToManyListPool<TKey, TValue> : ConcurrentOneToManyList<TKey, TValue>, IDisposable where TKey : notnull
|
||||
{
|
||||
private bool _isDispose;
|
||||
|
||||
public static ConcurrentOneToManyListPool<TKey, TValue> Create()
|
||||
{
|
||||
var a = Pool<ConcurrentOneToManyListPool<TKey, TValue>>.Rent();
|
||||
a._isDispose = false;
|
||||
return a;
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
if (_isDispose)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
_isDispose = true;
|
||||
Clear();
|
||||
Pool<ConcurrentOneToManyListPool<TKey, TValue>>.Return(this);
|
||||
}
|
||||
}
|
||||
|
||||
public class ConcurrentOneToManyList<TKey, TValue> : ConcurrentDictionary<TKey, List<TValue>> where TKey : notnull
|
||||
{
|
||||
private readonly Queue<List<TValue>> _queue = new Queue<List<TValue>>();
|
||||
private readonly int _recyclingLimit = 120;
|
||||
|
||||
public ConcurrentOneToManyList()
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 设置最大缓存数量
|
||||
/// </summary>
|
||||
/// <param name="recyclingLimit">
|
||||
/// 1:防止数据量过大、所以超过recyclingLimit的数据还是走GC.
|
||||
/// 2:设置成0不控制数量,全部缓存
|
||||
/// </param>
|
||||
public ConcurrentOneToManyList(int recyclingLimit)
|
||||
{
|
||||
_recyclingLimit = recyclingLimit;
|
||||
}
|
||||
|
||||
public bool Contains(TKey key, TValue value)
|
||||
{
|
||||
TryGetValue(key, out var list);
|
||||
|
||||
return list != null && list.Contains(value);
|
||||
}
|
||||
|
||||
public void Add(TKey key, TValue value)
|
||||
{
|
||||
if (!TryGetValue(key, out var list))
|
||||
{
|
||||
list = Fetch();
|
||||
list.Add(value);
|
||||
base[key] = list;
|
||||
return;
|
||||
}
|
||||
|
||||
list.Add(value);
|
||||
}
|
||||
|
||||
public TValue First(TKey key)
|
||||
{
|
||||
return !TryGetValue(key, out var list) ? default : list.FirstOrDefault();
|
||||
}
|
||||
|
||||
public void RemoveValue(TKey key, TValue value)
|
||||
{
|
||||
if (!TryGetValue(key, out var list)) return;
|
||||
|
||||
list.Remove(value);
|
||||
|
||||
if (list.Count == 0) RemoveKey(key);
|
||||
}
|
||||
|
||||
public void RemoveKey(TKey key)
|
||||
{
|
||||
if (!TryRemove(key, out var list)) return;
|
||||
|
||||
Recycle(list);
|
||||
}
|
||||
|
||||
private List<TValue> Fetch()
|
||||
{
|
||||
return _queue.Count <= 0 ? new List<TValue>() : _queue.Dequeue();
|
||||
}
|
||||
|
||||
private void Recycle(List<TValue> list)
|
||||
{
|
||||
list.Clear();
|
||||
|
||||
if (_recyclingLimit != 0 && _queue.Count > _recyclingLimit) return;
|
||||
|
||||
_queue.Enqueue(list);
|
||||
}
|
||||
|
||||
protected new void Clear()
|
||||
{
|
||||
base.Clear();
|
||||
_queue.Clear();
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f35e267f0b797464e856a9b9244b4215
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@@ -0,0 +1,116 @@
|
||||
using System;
|
||||
using System.Collections.Concurrent;
|
||||
using System.Collections.Generic;
|
||||
#pragma warning disable CS8603
|
||||
|
||||
namespace TEngine.DataStructure
|
||||
{
|
||||
public class ConcurrentOneToManyQueuePool<TKey, TValue> : ConcurrentOneToManyQueue<TKey, TValue>, IDisposable
|
||||
where TKey : notnull
|
||||
{
|
||||
private bool _isDispose;
|
||||
|
||||
public static ConcurrentOneToManyQueuePool<TKey, TValue> Create()
|
||||
{
|
||||
var a = Pool<ConcurrentOneToManyQueuePool<TKey, TValue>>.Rent();
|
||||
a._isDispose = false;
|
||||
return a;
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
if (_isDispose)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
_isDispose = true;
|
||||
Clear();
|
||||
Pool<ConcurrentOneToManyQueue<TKey, TValue>>.Return(this);
|
||||
}
|
||||
}
|
||||
|
||||
public class ConcurrentOneToManyQueue<TKey, TValue> : ConcurrentDictionary<TKey, Queue<TValue>> where TKey : notnull
|
||||
{
|
||||
private readonly Queue<Queue<TValue>> _queue = new Queue<Queue<TValue>>();
|
||||
private readonly int _recyclingLimit;
|
||||
|
||||
/// <summary>
|
||||
/// 设置最大缓存数量
|
||||
/// </summary>
|
||||
/// <param name="recyclingLimit">
|
||||
/// 1:防止数据量过大、所以超过recyclingLimit的数据还是走GC.
|
||||
/// 2:设置成0不控制数量,全部缓存
|
||||
/// </param>
|
||||
public ConcurrentOneToManyQueue(int recyclingLimit = 0)
|
||||
{
|
||||
_recyclingLimit = recyclingLimit;
|
||||
}
|
||||
|
||||
public bool Contains(TKey key, TValue value)
|
||||
{
|
||||
TryGetValue(key, out var list);
|
||||
|
||||
return list != null && list.Contains(value);
|
||||
}
|
||||
|
||||
public void Enqueue(TKey key, TValue value)
|
||||
{
|
||||
if (!TryGetValue(key, out var list))
|
||||
{
|
||||
list = Fetch();
|
||||
list.Enqueue(value);
|
||||
TryAdd(key, list);
|
||||
return;
|
||||
}
|
||||
|
||||
list.Enqueue(value);
|
||||
}
|
||||
|
||||
public TValue Dequeue(TKey key)
|
||||
{
|
||||
if (!TryGetValue(key, out var list) || list.Count == 0) return default;
|
||||
|
||||
var value = list.Dequeue();
|
||||
|
||||
if (list.Count == 0) RemoveKey(key);
|
||||
|
||||
return value;
|
||||
}
|
||||
|
||||
public bool TryDequeue(TKey key, out TValue value)
|
||||
{
|
||||
value = Dequeue(key);
|
||||
|
||||
return value != null;
|
||||
}
|
||||
|
||||
public void RemoveKey(TKey key)
|
||||
{
|
||||
if (!TryGetValue(key, out var list)) return;
|
||||
|
||||
TryRemove(key, out _);
|
||||
Recycle(list);
|
||||
}
|
||||
|
||||
private Queue<TValue> Fetch()
|
||||
{
|
||||
return _queue.Count <= 0 ? new Queue<TValue>() : _queue.Dequeue();
|
||||
}
|
||||
|
||||
private void Recycle(Queue<TValue> list)
|
||||
{
|
||||
list.Clear();
|
||||
|
||||
if (_recyclingLimit != 0 && _queue.Count > _recyclingLimit) return;
|
||||
|
||||
_queue.Enqueue(list);
|
||||
}
|
||||
|
||||
protected new void Clear()
|
||||
{
|
||||
base.Clear();
|
||||
_queue.Clear();
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 162f7b8459ead1940bfaef049f6d8e2c
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@@ -0,0 +1,44 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace TEngine.DataStructure
|
||||
{
|
||||
public sealed class EntityList<T> : List<T>, IDisposable where T : IDisposable
|
||||
{
|
||||
private bool _isDispose;
|
||||
|
||||
public static EntityList<T> Create()
|
||||
{
|
||||
var list = Pool<EntityList<T>>.Rent();
|
||||
list._isDispose = false;
|
||||
return list;
|
||||
}
|
||||
|
||||
public new void Clear()
|
||||
{
|
||||
for (var i = 0; i < this.Count; i++)
|
||||
{
|
||||
this[i].Dispose();
|
||||
}
|
||||
|
||||
base.Clear();
|
||||
}
|
||||
|
||||
public void ClearNotDispose()
|
||||
{
|
||||
base.Clear();
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
if (_isDispose)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
_isDispose = true;
|
||||
Clear();
|
||||
Pool<EntityList<T>>.Return(this);
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 763e9615aee0ac1428f141df39057bf7
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@@ -0,0 +1,45 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace TEngine.DataStructure
|
||||
{
|
||||
public sealed class HashSetPool<T> : HashSet<T>, IDisposable
|
||||
{
|
||||
private bool _isDispose;
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
if (_isDispose)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
_isDispose = true;
|
||||
Clear();
|
||||
Pool<HashSetPool<T>>.Return(this);
|
||||
}
|
||||
|
||||
public static HashSetPool<T> Create()
|
||||
{
|
||||
var list = Pool<HashSetPool<T>>.Rent();
|
||||
list._isDispose = false;
|
||||
return list;
|
||||
}
|
||||
}
|
||||
|
||||
public sealed class HashSetBasePool<T> : IDisposable
|
||||
{
|
||||
public HashSet<T> Set = new HashSet<T>();
|
||||
|
||||
public static HashSetBasePool<T> Create()
|
||||
{
|
||||
return Pool<HashSetBasePool<T>>.Rent();
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
Set.Clear();
|
||||
Pool<HashSetBasePool<T>>.Return(this);
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0f2f1a1f1a3f5f246a40be1e7bff871a
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@@ -0,0 +1,38 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace TEngine.DataStructure
|
||||
{
|
||||
public sealed class ListPool<T> : List<T>, IDisposable
|
||||
{
|
||||
private bool _isDispose;
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
if (_isDispose)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
_isDispose = true;
|
||||
Clear();
|
||||
Pool<ListPool<T>>.Return(this);
|
||||
}
|
||||
|
||||
public static ListPool<T> Create(params T[] args)
|
||||
{
|
||||
var list = Pool<ListPool<T>>.Rent();
|
||||
list._isDispose = false;
|
||||
if (args != null) list.AddRange(args);
|
||||
return list;
|
||||
}
|
||||
|
||||
public static ListPool<T> Create(List<T> args)
|
||||
{
|
||||
var list = Pool<ListPool<T>>.Rent();
|
||||
list._isDispose = false;
|
||||
if (args != null) list.AddRange(args);
|
||||
return list;
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3014ce89f46d33742acca54a28995242
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@@ -0,0 +1,121 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
#pragma warning disable CS8600
|
||||
|
||||
namespace TEngine.DataStructure
|
||||
{
|
||||
public class OneToManyHashSetPool<TKey, TValue> : OneToManyHashSet<TKey, TValue>, IDisposable where TKey : notnull
|
||||
{
|
||||
private bool _isDispose;
|
||||
|
||||
public static OneToManyHashSetPool<TKey, TValue> Create()
|
||||
{
|
||||
var a = Pool<OneToManyHashSetPool<TKey, TValue>>.Rent();
|
||||
a._isDispose = false;
|
||||
return a;
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
if (_isDispose)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
_isDispose = true;
|
||||
Clear();
|
||||
Pool<OneToManyHashSetPool<TKey, TValue>>.Return(this);
|
||||
}
|
||||
}
|
||||
|
||||
public class OneToManyHashSet<TKey, TValue> : Dictionary<TKey, HashSet<TValue>> where TKey : notnull
|
||||
{
|
||||
private readonly Queue<HashSet<TValue>> _queue = new Queue<HashSet<TValue>>();
|
||||
private readonly int _recyclingLimit = 120;
|
||||
private static HashSet<TValue> _empty = new HashSet<TValue>();
|
||||
|
||||
public OneToManyHashSet()
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 设置最大缓存数量
|
||||
/// </summary>
|
||||
/// <param name="recyclingLimit">
|
||||
/// 1:防止数据量过大、所以超过recyclingLimit的数据还是走GC.
|
||||
/// 2:设置成0不控制数量,全部缓存
|
||||
/// </param>
|
||||
public OneToManyHashSet(int recyclingLimit)
|
||||
{
|
||||
_recyclingLimit = recyclingLimit;
|
||||
}
|
||||
|
||||
public bool Contains(TKey key, TValue value)
|
||||
{
|
||||
TryGetValue(key, out var list);
|
||||
|
||||
return list != null && list.Contains(value);
|
||||
}
|
||||
|
||||
public void Add(TKey key, TValue value)
|
||||
{
|
||||
if (!TryGetValue(key, out var list))
|
||||
{
|
||||
list = Fetch();
|
||||
list.Add(value);
|
||||
Add(key, list);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
list.Add(value);
|
||||
}
|
||||
|
||||
public void RemoveValue(TKey key, TValue value)
|
||||
{
|
||||
if (!TryGetValue(key, out var list)) return;
|
||||
|
||||
list.Remove(value);
|
||||
|
||||
if (list.Count == 0) RemoveKey(key);
|
||||
}
|
||||
|
||||
public void RemoveKey(TKey key)
|
||||
{
|
||||
if (!TryGetValue(key, out var list)) return;
|
||||
|
||||
Remove(key);
|
||||
Recycle(list);
|
||||
}
|
||||
|
||||
public HashSet<TValue> GetValue(TKey key)
|
||||
{
|
||||
if (TryGetValue(key, out HashSet<TValue> value))
|
||||
{
|
||||
return value;
|
||||
}
|
||||
|
||||
return _empty;
|
||||
}
|
||||
|
||||
private HashSet<TValue> Fetch()
|
||||
{
|
||||
return _queue.Count <= 0 ? new HashSet<TValue>() : _queue.Dequeue();
|
||||
}
|
||||
|
||||
private void Recycle(HashSet<TValue> list)
|
||||
{
|
||||
list.Clear();
|
||||
|
||||
if (_recyclingLimit != 0 && _queue.Count > _recyclingLimit) return;
|
||||
|
||||
_queue.Enqueue(list);
|
||||
}
|
||||
|
||||
protected new void Clear()
|
||||
{
|
||||
base.Clear();
|
||||
_queue.Clear();
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 393302e735c4b2f4885c21dd4235b64a
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@@ -0,0 +1,141 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
#pragma warning disable CS8600
|
||||
#pragma warning disable CS8603
|
||||
|
||||
namespace TEngine.DataStructure
|
||||
{
|
||||
public class OneToManyListPool<TKey, TValue> : OneToManyList<TKey, TValue>, IDisposable where TKey : notnull
|
||||
{
|
||||
private bool _isDispose;
|
||||
|
||||
public static OneToManyListPool<TKey, TValue> Create()
|
||||
{
|
||||
var list = Pool<OneToManyListPool<TKey, TValue>>.Rent();
|
||||
list._isDispose = false;
|
||||
return list;
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
if (_isDispose)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
_isDispose = true;
|
||||
Clear();
|
||||
Pool<OneToManyListPool<TKey, TValue>>.Return(this);
|
||||
}
|
||||
}
|
||||
|
||||
public class OneToManyList<TKey, TValue> : Dictionary<TKey, List<TValue>> where TKey : notnull
|
||||
{
|
||||
private readonly Queue<List<TValue>> _queue = new Queue<List<TValue>>();
|
||||
private readonly int _recyclingLimit = 120;
|
||||
private static List<TValue> _empty = new List<TValue>();
|
||||
|
||||
public OneToManyList()
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 设置最大缓存数量
|
||||
/// </summary>
|
||||
/// <param name="recyclingLimit">
|
||||
/// 1:防止数据量过大、所以超过recyclingLimit的数据还是走GC.
|
||||
/// 2:设置成0不控制数量,全部缓存
|
||||
/// </param>
|
||||
public OneToManyList(int recyclingLimit)
|
||||
{
|
||||
_recyclingLimit = recyclingLimit;
|
||||
}
|
||||
|
||||
public bool Contains(TKey key, TValue value)
|
||||
{
|
||||
TryGetValue(key, out var list);
|
||||
|
||||
return list != null && list.Contains(value);
|
||||
}
|
||||
|
||||
public void Add(TKey key, TValue value)
|
||||
{
|
||||
if (!TryGetValue(key, out var list))
|
||||
{
|
||||
list = Fetch();
|
||||
list.Add(value);
|
||||
Add(key, list);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
list.Add(value);
|
||||
}
|
||||
|
||||
public TValue First(TKey key)
|
||||
{
|
||||
return !TryGetValue(key, out var list) ? default : list.FirstOrDefault();
|
||||
}
|
||||
|
||||
public bool RemoveValue(TKey key, TValue value)
|
||||
{
|
||||
if (!TryGetValue(key, out var list))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
var isRemove = list.Remove(value);
|
||||
|
||||
if (list.Count == 0)
|
||||
{
|
||||
isRemove = RemoveByKey(key);
|
||||
}
|
||||
|
||||
return isRemove;
|
||||
}
|
||||
|
||||
public bool RemoveByKey(TKey key)
|
||||
{
|
||||
if (!TryGetValue(key, out var list))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
Remove(key);
|
||||
Recycle(list);
|
||||
return true;
|
||||
}
|
||||
|
||||
public List<TValue> GetValues(TKey key)
|
||||
{
|
||||
if (TryGetValue(key, out List<TValue> list))
|
||||
{
|
||||
return list;
|
||||
}
|
||||
|
||||
return _empty;
|
||||
}
|
||||
|
||||
public new void Clear()
|
||||
{
|
||||
foreach (var keyValuePair in this) Recycle(keyValuePair.Value);
|
||||
|
||||
base.Clear();
|
||||
}
|
||||
|
||||
private List<TValue> Fetch()
|
||||
{
|
||||
return _queue.Count <= 0 ? new List<TValue>() : _queue.Dequeue();
|
||||
}
|
||||
|
||||
private void Recycle(List<TValue> list)
|
||||
{
|
||||
list.Clear();
|
||||
|
||||
if (_recyclingLimit != 0 && _queue.Count > _recyclingLimit) return;
|
||||
|
||||
_queue.Enqueue(list);
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7a6fdf7c8423c0e41804022df95a399d
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user