replace Referencer global with individual static instances

This commit is contained in:
2025-08-14 14:46:59 +10:00
parent 568104edf6
commit 1b803acdaa
11 changed files with 153 additions and 155 deletions

View File

@@ -29,7 +29,6 @@ config/icon="res://icon.svg"
Settings="*res://scripts/globals/settings.gd"
Inputer="*res://scripts/globals/inputer.gd"
Debugger="*res://scenes/debugger.tscn"
Referencer="*res://scripts/globals/referencer.gd"
Cursor="*res://scenes/ui/cursor.tscn"
Music="*res://scripts/audio/music.gd"

View File

@@ -145,57 +145,57 @@ attack = NodePath("Attacker")
[node name="Model" parent="." instance=ExtResource("3_f1ej7")]
[node name="Skeleton3D" parent="Model/Armature" index="0"]
bones/0/position = Vector3(-0.509322, 0.994931, -0.0478182)
bones/0/rotation = Quaternion(0.709228, -0.0727934, -0.698967, -0.056058)
bones/0/position = Vector3(-0.53169, 0.960631, -0.0966735)
bones/0/rotation = Quaternion(0.700257, -0.0952854, -0.701355, -0.0930696)
bones/0/scale = Vector3(1, 1, 1)
bones/1/position = Vector3(-9.75365e-05, 0.0319142, -0.124525)
bones/1/rotation = Quaternion(-0.000141591, 0.789452, 0.613812, 0.000224233)
bones/2/rotation = Quaternion(6.24507e-10, 4.41808e-08, -6.03351e-10, 1)
bones/2/scale = Vector3(1, 1, 1)
bones/3/rotation = Quaternion(1.74623e-10, -2.60798e-10, -1.30968e-10, 1)
bones/4/position = Vector3(0.0410619, 0.92757, -0.0356457)
bones/4/rotation = Quaternion(0.223396, -0.0946728, 0.0350542, 0.969486)
bones/4/position = Vector3(0.00831784, 0.913448, -0.0301781)
bones/4/rotation = Quaternion(0.206496, -0.159094, 0.0637163, 0.963322)
bones/5/position = Vector3(6.05363e-09, 0.111695, -8.19564e-08)
bones/5/rotation = Quaternion(0.0735332, -0.199554, 0.125582, 0.96902)
bones/6/rotation = Quaternion(-0.419307, -0.128549, 0.021893, 0.898431)
bones/7/rotation = Quaternion(0.350038, 0.103815, -0.281842, 0.887277)
bones/8/rotation = Quaternion(-0.205147, 0.350995, 0.0975189, 0.908409)
bones/5/rotation = Quaternion(0.0725644, -0.1943, 0.0982811, 0.973305)
bones/6/rotation = Quaternion(-0.418607, -0.151552, 0.0326413, 0.894838)
bones/7/rotation = Quaternion(0.33733, 0.177555, -0.296876, 0.875527)
bones/8/rotation = Quaternion(-0.127673, 0.359361, 0.0592861, 0.922521)
bones/9/rotation = Quaternion(1.13474e-07, 0.707107, 0.707107, -5.23149e-08)
bones/10/scale = Vector3(1, 1, 1)
bones/11/position = Vector3(-0.0110016, -3.04479e-08, -0.00873453)
bones/11/scale = Vector3(1.2664, 1, 0.772095)
bones/11/position = Vector3(-0.0110016, 1.63093e-07, -0.00873439)
bones/11/scale = Vector3(1.34295, 1, 1)
bones/12/position = Vector3(-0.00823868, 6.83734e-08, -0.0102097)
bones/13/position = Vector3(-0.023624, -1.3441e-09, -0.000726155)
bones/13/scale = Vector3(1.2664, 1, 0.772095)
bones/14/position = Vector3(-0.0398201, 2.06584e-08, -0.00621833)
bones/14/scale = Vector3(1.2664, 1, 0.772096)
bones/13/position = Vector3(-0.0248087, -1.5435e-07, -0.00352769)
bones/13/scale = Vector3(1.34295, 1, 0.440598)
bones/14/position = Vector3(-0.0419837, -2.38016e-07, -0.00730102)
bones/14/scale = Vector3(1.34295, 1, 0.440598)
bones/15/position = Vector3(-0.0186913, 1.4579e-07, -0.0116523)
bones/16/position = Vector3(0.0184269, 1.72027e-07, 0.00634607)
bones/16/scale = Vector3(1.2664, 1, 0.772096)
bones/17/position = Vector3(0.0354973, 7.84004e-08, 0.000267413)
bones/17/scale = Vector3(1.2664, 1, 0.772096)
bones/16/position = Vector3(0.0197839, -4.48731e-09, 0.000705954)
bones/16/scale = Vector3(1.34295, 1, 0.440598)
bones/17/position = Vector3(0.0378861, 1.73861e-07, -0.00293301)
bones/17/scale = Vector3(1.34295, 1, 1)
bones/18/position = Vector3(0.0138112, -1.99382e-07, -0.0106829)
bones/19/position = Vector3(-0.029965, -6.74833e-08, -0.0114938)
bones/20/position = Vector3(0.0319374, 2.70462e-10, -0.00811319)
bones/21/position = Vector3(0.0451364, 0.0764193, 0.0935001)
bones/21/position = Vector3(0.0449934, 0.0779631, 0.0935908)
bones/21/rotation = Quaternion(0.160115, 0.667183, 0.68874, -0.234237)
bones/22/position = Vector3(-0.00351833, -2.67936e-08, 0.0010112)
bones/25/position = Vector3(-0.0442962, 0.0756351, 0.094034)
bones/25/position = Vector3(-0.0441582, 0.0771796, 0.0941215)
bones/25/rotation = Quaternion(-0.161417, 0.667625, 0.688436, 0.232975)
bones/26/position = Vector3(0.00351835, 2.9417e-08, 0.00101115)
bones/29/rotation = Quaternion(0.0358131, -0.592919, 0.803027, 0.0480797)
bones/30/rotation = Quaternion(-0.05837, -0.00548176, -0.0421818, 0.997388)
bones/29/rotation = Quaternion(0.0455207, -0.401551, 0.913873, 0.0390142)
bones/30/rotation = Quaternion(0.0225766, -0.0205482, -0.104267, 0.994081)
bones/31/rotation = Quaternion(0.00282337, 0.992799, -0.117349, -0.0238866)
bones/32/rotation = Quaternion(0.559291, -4.29134e-08, -1.29076e-06, 0.828972)
bones/32/rotation = Quaternion(0.749723, -3.63566e-07, -1.24042e-06, 0.661751)
bones/33/rotation = Quaternion(-0.0342351, -3.5846e-07, 8.54711e-08, 0.999414)
bones/35/rotation = Quaternion(0.303073, -0.108151, 0.308508, 0.895138)
bones/36/rotation = Quaternion(-0.649846, 3.16898e-07, 4.62288e-07, 0.760066)
bones/37/rotation = Quaternion(-0.0486405, -0.104208, 0.204466, 0.972095)
bones/38/rotation = Quaternion(-0.645978, 2.48e-07, 1.00563e-06, 0.763356)
bones/35/rotation = Quaternion(0.546934, -0.0211991, 0.357283, 0.756811)
bones/36/rotation = Quaternion(-0.311366, 4.62084e-07, 3.12338e-07, 0.95029)
bones/37/rotation = Quaternion(0.12058, -0.0680784, 0.200371, 0.969885)
bones/38/rotation = Quaternion(-0.133768, 7.35097e-07, 7.04557e-07, 0.991013)
bones/39/rotation = Quaternion(0.197471, 0.678974, 0.678974, -0.19747)
bones/39/scale = Vector3(1.11231, 1, 0.867862)
bones/41/position = Vector3(0.0170023, 0.00022532, -0.00384271)
bones/41/rotation = Quaternion(-2.2793e-08, 0.00598484, -1.22011e-07, 0.999982)
bones/39/scale = Vector3(1.08305, 1, 0.88887)
bones/41/position = Vector3(0.0139192, 0.000225329, -0.00384292)
bones/41/rotation = Quaternion(-2.79136e-09, -0.00443414, -9.68612e-08, 0.99999)
bones/41/scale = Vector3(0.999981, 1, 0.538573)
bones/42/position = Vector3(0.0392888, -1.17533e-06, -0.00209796)
bones/43/position = Vector3(-0.0495715, -2.58908e-06, 0.0301691)
@@ -203,9 +203,9 @@ bones/44/position = Vector3(-0.00910762, -1.30386e-08, 0.00452032)
bones/45/position = Vector3(-0.013421, 6.33299e-08, -0.0283991)
bones/46/position = Vector3(-0.0513805, 8.90344e-07, -0.0104124)
bones/47/position = Vector3(0.0446487, -1.27684e-06, -0.0177286)
bones/48/scale = Vector3(1.11231, 1, 0.867862)
bones/50/position = Vector3(-0.0139197, 0.000225418, -0.00485518)
bones/50/rotation = Quaternion(-3.14144e-08, 0.00728461, 7.8241e-08, 0.999973)
bones/48/scale = Vector3(1.08305, 1, 0.811625)
bones/50/position = Vector3(-0.0170028, 0.000225411, -0.00485537)
bones/50/rotation = Quaternion(-3.93517e-08, -0.00539757, 4.09811e-08, 0.999985)
bones/50/scale = Vector3(0.999977, 1, 0.397035)
bones/51/position = Vector3(-0.0392888, -1.22121e-06, -0.00333335)
bones/52/position = Vector3(0.0495715, -2.68185e-06, 0.0147188)
@@ -213,16 +213,16 @@ bones/53/position = Vector3(0.00910765, -7.47593e-08, 0.000409614)
bones/54/position = Vector3(0.0134209, 4.70912e-08, -0.0184937)
bones/55/position = Vector3(0.0513805, 9.29226e-07, -0.0104125)
bones/56/position = Vector3(-0.0446488, -1.30966e-06, -0.0177287)
bones/57/rotation = Quaternion(0.273654, -0.0435965, -0.711669, 0.645554)
bones/58/rotation = Quaternion(0.658261, 0.173487, -0.20396, 0.703559)
bones/57/rotation = Quaternion(0.268205, -0.0285322, -0.735368, 0.62168)
bones/58/rotation = Quaternion(0.634128, 0.142278, -0.250851, 0.717435)
bones/58/scale = Vector3(1, 1, 1)
bones/59/position = Vector3(5.40815e-09, 0.307144, -9.06498e-09)
bones/59/rotation = Quaternion(0.395933, -0.398605, -0.162316, 0.811175)
bones/59/position = Vector3(-4.79034e-08, 0.303092, 9.34018e-10)
bones/59/rotation = Quaternion(0.380702, -0.0972702, -0.113142, 0.912581)
bones/59/scale = Vector3(1, 1, 1)
bones/60/rotation = Quaternion(0.00108256, -0.144928, 0.000158582, 0.989442)
bones/60/rotation = Quaternion(0.0010559, -0.261729, 0.000286432, 0.965141)
bones/60/scale = Vector3(1, 1, 1)
bones/61/position = Vector3(-2.59791e-08, 0.046591, -0.000102098)
bones/61/rotation = Quaternion(-0.276157, -0.198124, 0.116921, 0.933174)
bones/61/position = Vector3(1.68065e-07, 0.0519224, -0.000113588)
bones/61/rotation = Quaternion(-0.189197, -0.346848, 0.125863, 0.909978)
bones/61/scale = Vector3(1, 1, 1)
bones/62/rotation = Quaternion(0.493569, 0.84346, 0.0982726, -0.187901)
bones/63/rotation = Quaternion(0.52804, -0.147693, -0.0941254, 0.830964)
@@ -267,27 +267,27 @@ bones/93/rotation = Quaternion(-0.494209, 0.0204614, -0.0359497, 0.868359)
bones/93/scale = Vector3(1, 1.13164, 1)
bones/94/rotation = Quaternion(-0.547852, 0.057849, -0.0581314, 0.832546)
bones/94/scale = Vector3(1, 1.05697, 1)
bones/95/position = Vector3(-1.22626e-08, 0.0465911, -0.000102191)
bones/95/rotation = Quaternion(-0.795959, -0.113211, -0.0295759, 0.593934)
bones/95/position = Vector3(1.87555e-07, 0.0519224, -0.000113614)
bones/95/rotation = Quaternion(-0.760969, -0.170773, -0.0805158, 0.620709)
bones/95/scale = Vector3(1, 1, 1)
bones/96/position = Vector3(-4.57976e-08, 0.307144, 5.04497e-09)
bones/96/rotation = Quaternion(-0.52525, -0.08765, -0.208418, 0.820361)
bones/96/scale = Vector3(1, 1.15055, 1)
bones/96/position = Vector3(-9.14197e-08, 0.303092, -9.25693e-09)
bones/96/rotation = Quaternion(-0.553326, 0.00577763, -0.0760779, 0.829463)
bones/96/scale = Vector3(1, 1.05453, 1)
bones/97/position = Vector3(-0.00645471, 0.000163305, -0.00321278)
bones/97/rotation = Quaternion(0.248427, 0.0258538, -0.267814, 0.930533)
bones/98/position = Vector3(-5.76256e-09, 0.0159596, 0.000181361)
bones/98/rotation = Quaternion(-0.0586372, -0.00568235, -0.12181, 0.990804)
bones/99/rotation = Quaternion(-0.399689, 0.116779, -0.0017598, 0.90918)
bones/99/rotation = Quaternion(-0.412829, 0.122317, -0.0317073, 0.902001)
bones/99/scale = Vector3(1, 1, 1)
bones/100/rotation = Quaternion(0.0474244, -0.0299806, 0.512671, 0.85675)
bones/101/rotation = Quaternion(0.00919888, 0.49081, 0.646158, 0.584381)
bones/100/rotation = Quaternion(0.0455816, -0.0327144, 0.562108, 0.825159)
bones/101/rotation = Quaternion(0.0629731, 0.463889, 0.629955, 0.619676)
bones/102/position = Vector3(6.2732e-09, 0.281682, 9.00968e-08)
bones/102/rotation = Quaternion(0.0266923, 4.91408e-05, 5.12579e-05, 0.999644)
bones/102/rotation = Quaternion(0.0184808, 4.8803e-05, 5.16525e-05, 0.999829)
bones/102/scale = Vector3(1, 1, 1)
bones/103/rotation = Quaternion(0.00109832, 0.00601476, -2.36188e-05, 0.999981)
bones/103/rotation = Quaternion(0.00109408, -0.00971663, 1.06512e-05, 0.999952)
bones/103/scale = Vector3(0.999997, 0.999997, 1)
bones/104/position = Vector3(-1.97803e-07, 0.068466, -0.000150014)
bones/104/rotation = Quaternion(-0.440103, 0.0120994, -0.0111051, 0.897797)
bones/104/rotation = Quaternion(-0.389259, -0.0165512, 0.0142856, 0.920869)
bones/104/scale = Vector3(1, 1, 1)
bones/105/rotation = Quaternion(-0.272954, 0.938438, 0.146391, -0.152973)
bones/106/rotation = Quaternion(0.58496, 0.153924, 0.0835466, 0.791928)
@@ -333,96 +333,96 @@ bones/136/scale = Vector3(1, 1.25698, 1)
bones/137/rotation = Quaternion(-0.479239, -0.0566498, 0.0570499, 0.873994)
bones/137/scale = Vector3(1, 1.15486, 1)
bones/138/position = Vector3(-1.96072e-07, 0.068466, -0.000149977)
bones/138/rotation = Quaternion(-0.849839, 0.00842519, 0.000387153, 0.526974)
bones/138/rotation = Quaternion(-0.834765, -0.0111237, -0.000853465, 0.550493)
bones/138/scale = Vector3(1, 1, 1)
bones/139/position = Vector3(3.48513e-09, 0.281682, 1.40144e-07)
bones/139/rotation = Quaternion(-0.697167, 1.14246e-06, 6.09538e-05, 0.716909)
bones/139/rotation = Quaternion(-0.700105, 8.22866e-07, 6.10505e-05, 0.71404)
bones/139/scale = Vector3(1, 1, 1)
bones/140/position = Vector3(-0.00091601, -0.00419344, -0.00166352)
bones/140/rotation = Quaternion(0.180101, -0.00275761, 0.0409847, 0.98279)
bones/140/scale = Vector3(1.12362, 1, 1)
bones/141/position = Vector3(2.32831e-10, 0.0159594, 0.000181319)
bones/141/rotation = Quaternion(-0.0876969, -0.00686066, -0.0793036, 0.992962)
bones/142/rotation = Quaternion(-0.627963, -0.0317508, 0.444244, 0.638202)
bones/142/rotation = Quaternion(-0.613586, -0.0356675, 0.42224, 0.666298)
bones/142/scale = Vector3(1, 1, 0.999999)
bones/143/position = Vector3(-0.00977684, 0.110009, 0.0700904)
bones/144/position = Vector3(0.0101174, 0.0525767, 0.104673)
bones/145/position = Vector3(0.00678728, -0.0164962, 0.105971)
bones/146/position = Vector3(-0.00780965, 0.0439172, -0.136987)
bones/147/position = Vector3(0.119088, 0.0274, -0.0567642)
bones/147/rotation = Quaternion(0.128323, -0.233519, -0.00414657, 0.963839)
bones/148/position = Vector3(0.108078, 0.0874024, -0.0470377)
bones/148/rotation = Quaternion(0.128323, -0.233519, -0.00414657, 0.963839)
bones/149/position = Vector3(0.08159, 0.0713088, 0.0240798)
bones/149/rotation = Quaternion(0.128323, -0.233519, -0.00414657, 0.963839)
bones/150/position = Vector3(0.102804, -0.00488756, 0.0119127)
bones/150/rotation = Quaternion(0.128323, -0.233519, -0.00414657, 0.963839)
bones/151/position = Vector3(0.0505875, 0.0595045, 0.0702025)
bones/152/position = Vector3(0.0655902, -0.0127084, 0.0607059)
bones/153/position = Vector3(0.0363261, 0.110584, 0.0532361)
bones/153/rotation = Quaternion(0.128323, -0.233519, -0.00414657, 0.963839)
bones/154/position = Vector3(0.0575689, 0.131111, 0.0422142)
bones/154/rotation = Quaternion(0.128323, -0.233519, -0.00414657, 0.963839)
bones/155/position = Vector3(0.0743553, 0.154664, 0.0128061)
bones/155/rotation = Quaternion(0.128323, -0.233519, -0.00414657, 0.963839)
bones/156/position = Vector3(0.0845406, 0.156977, -0.0130514)
bones/156/rotation = Quaternion(0.128323, -0.233519, -0.00414657, 0.963839)
bones/157/position = Vector3(0.101361, 0.12102, -0.0430962)
bones/157/rotation = Quaternion(0.128323, -0.233519, -0.00414657, 0.963839)
bones/158/position = Vector3(0.0563635, 0.128918, -0.0695375)
bones/158/rotation = Quaternion(0.128323, -0.233519, -0.00414657, 0.963839)
bones/159/position = Vector3(-0.111627, 0.0615783, -0.0653986)
bones/159/rotation = Quaternion(0.0317483, 0.0233073, -0.291181, 0.955857)
bones/160/position = Vector3(-0.102933, 0.113319, -0.0592115)
bones/160/rotation = Quaternion(0.0317483, 0.0233073, -0.291181, 0.955857)
bones/161/position = Vector3(-0.106708, 0.122461, 0.0361705)
bones/161/rotation = Quaternion(0.0317483, 0.0233073, -0.291181, 0.955857)
bones/162/position = Vector3(-0.129211, 0.0573469, 0.0261901)
bones/162/rotation = Quaternion(0.0317483, 0.0233073, -0.291181, 0.955857)
bones/163/position = Vector3(-0.0525523, 0.0764716, 0.0970148)
bones/164/position = Vector3(-0.0807715, 0.00876589, 0.0907723)
bones/165/position = Vector3(-0.0495015, 0.142372, 0.0563151)
bones/165/rotation = Quaternion(0.0317483, 0.0233073, -0.291181, 0.955857)
bones/166/position = Vector3(-0.0661212, 0.180157, 0.0201212)
bones/166/rotation = Quaternion(0.0317483, 0.0233073, -0.291181, 0.955857)
bones/167/position = Vector3(-0.0596306, 0.195154, -0.0182209)
bones/167/rotation = Quaternion(0.0317483, 0.0233073, -0.291181, 0.955857)
bones/168/position = Vector3(-0.0607534, 0.191763, -0.0458784)
bones/168/rotation = Quaternion(0.0317483, 0.0233073, -0.291181, 0.955857)
bones/169/position = Vector3(-0.0908062, 0.160779, -0.0642596)
bones/169/rotation = Quaternion(0.0317483, 0.0233073, -0.291181, 0.955857)
bones/170/position = Vector3(-0.0567139, 0.145932, -0.074734)
bones/170/rotation = Quaternion(0.0317483, 0.0233073, -0.291181, 0.955857)
bones/171/rotation = Quaternion(0.854971, 0.00733622, -0.260115, 0.448677)
bones/143/position = Vector3(-0.00981739, 0.10997, 0.0700882)
bones/144/position = Vector3(0.00620601, 0.052063, 0.109127)
bones/145/position = Vector3(0.0177351, -0.00230118, 0.117972)
bones/146/position = Vector3(-0.0279605, 0.0597673, -0.134369)
bones/147/position = Vector3(0.103645, 0.0404147, -0.0785666)
bones/147/rotation = Quaternion(0.135757, -0.218582, -0.0374148, 0.965605)
bones/148/position = Vector3(0.101526, 0.0866657, -0.0611099)
bones/148/rotation = Quaternion(0.135757, -0.218582, -0.0374148, 0.965605)
bones/149/position = Vector3(0.0837724, 0.0607141, 0.0283384)
bones/149/rotation = Quaternion(0.135757, -0.218582, -0.0374148, 0.965605)
bones/150/position = Vector3(0.102431, 0.00615477, 0.000186536)
bones/150/rotation = Quaternion(0.135757, -0.218582, -0.0374148, 0.965605)
bones/151/position = Vector3(0.0575468, 0.0586016, 0.0840182)
bones/152/position = Vector3(0.0697322, 0.00500929, 0.079933)
bones/153/position = Vector3(0.0377826, 0.10692, 0.0516089)
bones/153/rotation = Quaternion(0.135757, -0.218582, -0.0374148, 0.965605)
bones/154/position = Vector3(0.0598031, 0.126631, 0.0403721)
bones/154/rotation = Quaternion(0.135757, -0.218582, -0.0374148, 0.965605)
bones/155/position = Vector3(0.0768057, 0.150093, 0.0110149)
bones/155/rotation = Quaternion(0.135757, -0.218582, -0.0374147, 0.965604)
bones/156/position = Vector3(0.0861371, 0.152619, -0.0151431)
bones/156/rotation = Quaternion(0.135757, -0.218582, -0.0374148, 0.965605)
bones/157/position = Vector3(0.099756, 0.116584, -0.0468347)
bones/157/rotation = Quaternion(0.135757, -0.218582, -0.0374148, 0.965605)
bones/158/position = Vector3(0.0543847, 0.127916, -0.0712201)
bones/158/rotation = Quaternion(0.135757, -0.218582, -0.0374148, 0.965605)
bones/159/position = Vector3(-0.106732, 0.0526253, -0.053271)
bones/159/rotation = Quaternion(0.0320946, 0.0187849, -0.234683, 0.971361)
bones/160/position = Vector3(-0.0992319, 0.105949, -0.0660458)
bones/160/rotation = Quaternion(0.0320946, 0.0187849, -0.234682, 0.971361)
bones/161/position = Vector3(-0.100354, 0.113106, 0.0392426)
bones/161/rotation = Quaternion(0.0320946, 0.0187849, -0.234682, 0.971361)
bones/162/position = Vector3(-0.109239, 0.0566074, 0.0362428)
bones/162/rotation = Quaternion(0.0320946, 0.0187849, -0.234682, 0.971361)
bones/163/position = Vector3(-0.0535431, 0.0763825, 0.0985405)
bones/164/position = Vector3(-0.0634853, 0.0208174, 0.110386)
bones/165/position = Vector3(-0.050828, 0.138998, 0.0558787)
bones/165/rotation = Quaternion(0.0320946, 0.0187849, -0.234682, 0.971361)
bones/166/position = Vector3(-0.0711459, 0.174387, 0.019587)
bones/166/rotation = Quaternion(0.0320946, 0.0187849, -0.234682, 0.971361)
bones/167/position = Vector3(-0.066058, 0.189923, -0.0188281)
bones/167/rotation = Quaternion(0.0320946, 0.0187849, -0.234682, 0.971361)
bones/168/position = Vector3(-0.0664436, 0.186439, -0.0464942)
bones/168/rotation = Quaternion(0.0320946, 0.0187849, -0.234682, 0.971361)
bones/169/position = Vector3(-0.0925992, 0.152289, -0.0652214)
bones/169/rotation = Quaternion(0.0320946, 0.0187849, -0.234682, 0.971361)
bones/170/position = Vector3(-0.056928, 0.141361, -0.0752497)
bones/170/rotation = Quaternion(0.0320946, 0.0187849, -0.234682, 0.971361)
bones/171/rotation = Quaternion(0.84129, 0.0265491, -0.325141, 0.431057)
bones/171/scale = Vector3(0.999998, 0.999997, 1.00001)
bones/172/position = Vector3(3.62338e-10, 0.531431, 3.56619e-08)
bones/172/rotation = Quaternion(0.258803, -2.06746e-06, -4.1853e-07, 0.96593)
bones/172/rotation = Quaternion(0.29282, -2.69149e-07, -8.65159e-08, 0.956168)
bones/172/scale = Vector3(1, 0.999998, 1.00001)
bones/173/position = Vector3(6.48577e-09, 0.418112, 8.79831e-08)
bones/173/rotation = Quaternion(-0.376693, -0.00422509, 0.0103832, 0.926271)
bones/173/rotation = Quaternion(-0.392752, -0.0125572, 0.0324742, 0.918985)
bones/173/scale = Vector3(1, 0.999992, 0.999996)
bones/174/rotation = Quaternion(-0.388439, -1.7287e-07, -1.04265e-07, 0.921475)
bones/175/position = Vector3(1.16517e-08, 0.418112, 8.45817e-08)
bones/175/rotation = Quaternion(-0.735503, -0.00277704, 0.00277694, 0.67751)
bones/175/rotation = Quaternion(-0.739625, -0.00846997, 0.0087714, 0.672909)
bones/175/scale = Vector3(1, 1, 1)
bones/176/position = Vector3(1.15382e-08, 0.531431, 3.0748e-08)
bones/176/rotation = Quaternion(-0.646424, -5.9335e-07, -1.08843e-06, 0.762979)
bones/176/scale = Vector3(1, 1.01069, 1)
bones/177/rotation = Quaternion(0.942402, -0.134367, 0.108775, 0.286342)
bones/176/rotation = Quaternion(-0.632821, -1.21246e-07, -3.14574e-07, 0.774298)
bones/176/scale = Vector3(1, 1.01636, 1)
bones/177/rotation = Quaternion(0.946267, -0.143988, 0.0429897, 0.286352)
bones/177/scale = Vector3(1, 0.999998, 1.00001)
bones/178/position = Vector3(2.73163e-08, 0.531431, 1.20327e-09)
bones/178/rotation = Quaternion(0.329132, 1.76459e-06, 3.5229e-07, 0.944284)
bones/178/rotation = Quaternion(0.36214, 2.89941e-06, 8.13968e-07, 0.932124)
bones/178/scale = Vector3(1, 0.999999, 1.00001)
bones/179/position = Vector3(8.4155e-09, 0.418112, 3.97981e-07)
bones/179/rotation = Quaternion(-0.431379, -0.000697695, -0.137163, 0.891683)
bones/179/rotation = Quaternion(-0.550896, 0.00438635, -0.120218, 0.825859)
bones/179/scale = Vector3(1, 0.99999, 0.999998)
bones/180/rotation = Quaternion(-0.556989, 1.6083e-07, 1.64943e-07, 0.83052)
bones/180/rotation = Quaternion(-0.46826, 1.67129e-07, 1.38111e-07, 0.883591)
bones/181/position = Vector3(2.69973e-08, 0.418112, 4.26027e-07)
bones/181/rotation = Quaternion(-0.749706, 0.0184746, -0.0444561, 0.660017)
bones/181/rotation = Quaternion(-0.780708, 0.0178472, -0.0383656, 0.623461)
bones/181/scale = Vector3(1, 1, 1)
bones/182/position = Vector3(1.89344e-08, 0.531431, -1.32203e-08)
bones/182/rotation = Quaternion(-0.617914, 5.15812e-07, 1.002e-06, 0.786246)
bones/182/scale = Vector3(1, 1.02443, 1)
bones/182/rotation = Quaternion(-0.603989, 6.92547e-07, 1.55324e-06, 0.796992)
bones/182/scale = Vector3(1, 1.03387, 1)
[node name="BoneFlipper" type="SkeletonModifier3D" parent="Model/Armature/Skeleton3D" index="0"]
_import_path = NodePath("")

View File

@@ -7,8 +7,6 @@
process_mode = 3
layer = 128
script = ExtResource("1_tkygf")
_side_change_speed = null
_screen_inset = null
_single_cursor = NodePath("CursorBase")
[node name="CursorBase" type="Control" parent="."]

View File

@@ -123,7 +123,7 @@ func _update_visibility() -> void:
func _unproject(pos: Vector3) -> Vector2:
return Referencer.main_camera.unproject_position(pos)
return MainCamera.instance.unproject_position(pos)
func _update_controls_label() -> void:
@@ -207,8 +207,8 @@ func _append_event(key: String, frame: int, args: Array[Variant]) -> void:
func _draw_vector(from: Vector3, to: Vector3, color: Color) -> void:
if (
not Referencer.main_camera.is_position_in_frustum(from)
and not Referencer.main_camera.is_position_in_frustum(to)
not MainCamera.instance.is_position_in_frustum(from)
and not MainCamera.instance.is_position_in_frustum(to)
):
return
@@ -222,8 +222,8 @@ func _draw_vector(from: Vector3, to: Vector3, color: Color) -> void:
func _draw_line(from: Vector3, to: Vector3, color: Color) -> void:
if (
not Referencer.main_camera.is_position_in_frustum(from)
and not Referencer.main_camera.is_position_in_frustum(to)
not MainCamera.instance.is_position_in_frustum(from)
and not MainCamera.instance.is_position_in_frustum(to)
):
return
@@ -247,7 +247,7 @@ func _draw_triangle(
func _draw_marker(pos: Vector3, radius: float, color: Color) -> void:
if not Referencer.main_camera.is_position_in_frustum(pos):
if not MainCamera.instance.is_position_in_frustum(pos):
return
var x_start := _unproject(pos + (Vector3.LEFT * radius))
@@ -264,7 +264,7 @@ func _draw_marker(pos: Vector3, radius: float, color: Color) -> void:
func _draw_circle(pos: Vector3, color: Color) -> void:
if not Referencer.main_camera.is_position_in_frustum(pos):
if not MainCamera.instance.is_position_in_frustum(pos):
return
var point := _unproject(pos)
@@ -306,7 +306,7 @@ func _on_control_draw() -> void:
_set_label_texts()
if !Referencer.main_camera or mode != Mode.FULL:
if !MainCamera.instance or mode != Mode.FULL:
return
for v: Dictionary in _vectors_to_draw.values():

View File

@@ -1,6 +1,8 @@
class_name MainCamera
extends Camera3D
static var instance: MainCamera
@export_group("References")
@export var _listener: AudioListener3D
@@ -30,9 +32,9 @@ var _hit_shake_time: float = 0
func _ready() -> void:
Referencer.main_camera = self
instance = self
_listener.make_current()
for player in Referencer.players:
for player in Player.instances:
_connect_player_signals(player)
@@ -49,9 +51,9 @@ func _physics_process(delta: float) -> void:
func _process_following(delta: float) -> void:
var follow_position: Vector3 = Vector3.ZERO
for player in Referencer.players:
for player in Player.instances:
follow_position += _follow(player, delta)
follow_position /= Referencer.players_count
follow_position /= Player.instances.size()
follow_position += Vector3.UP * _height_offset
global_position = follow_position + transform.basis.z * _distance
@@ -75,7 +77,7 @@ func _follow(player: Player, delta: float) -> Vector3:
player_offset.floor_height = player_position.y
player_position.y = player_offset.floor_height + Projectile.HEIGHT
if Referencer.players_count > 1:
if not Player.is_single_player():
player_offset.aim_offset = Vector3.ZERO
elif player.input_mode_is(Inputer.Mode.KB_MOUSE):
player_offset.aim_offset = player.aiming.aim_offset

View File

@@ -1,6 +1,8 @@
class_name Player
extends CharacterBody3D
static var instances: Array[Player]
@export var cursor_color: Color
@export var _input_mode: Inputer.Mode = Inputer.Mode.KB_MOUSE
@@ -20,10 +22,13 @@ var _respawn_point: Vector3
var _debug_collision_shapes := DebugCollisionShapes.new()
static func is_single_player() -> bool:
return instances.size() == 1
func _ready() -> void:
_respawn_point = global_position
Referencer.players.append(self)
Referencer.players_count += 1
instances.append(self)
_debug_collision_shapes.init(get_children(), self, _collision_debug_material)
@@ -51,7 +56,7 @@ func _unhandled_input(event: InputEvent) -> void:
if (
not input_mode_is(mode)
or (
Referencer.players_count > 1
not Player.is_single_player()
and _input_mode == Inputer.Mode.CONTROLLER
and event.device != _device_index
)
@@ -67,8 +72,8 @@ func _unhandled_input(event: InputEvent) -> void:
func input_mode_is(mode: Inputer.Mode) -> bool:
return (
(Referencer.players_count == 1 and mode == Inputer.mode)
or (Referencer.players_count > 1 and _input_mode == mode)
(Player.is_single_player() and mode == Inputer.mode)
or (not Player.is_single_player() and _input_mode == mode)
)

View File

@@ -15,7 +15,7 @@ var _aim_down: float
func handle_input(event: InputEvent, mode: Inputer.Mode) -> void:
if Referencer.players_count == 1:
if Player.is_single_player():
return
if mode == Inputer.Mode.CONTROLLER and event is InputEventJoypadMotion:
@@ -31,7 +31,7 @@ func handle_input(event: InputEvent, mode: Inputer.Mode) -> void:
func controller_aiming(move_input: Vector2) -> void:
if Referencer.players_count == 1:
if Player.is_single_player():
aim_input = Input.get_vector(
"aim_left",
"aim_right",
@@ -52,7 +52,7 @@ func controller_aiming(move_input: Vector2) -> void:
var aim_direction := Vector3(input.x, 0, input.y * _vertical_aim_aspect)
aim_offset = (
aim_direction.rotated(Vector3.UP, Referencer.main_camera.rotation.y)
aim_direction.rotated(Vector3.UP, MainCamera.instance.rotation.y)
* _controller_aim_offset
)
@@ -72,7 +72,7 @@ func mouse_aiming(
func _mouse_project(mouse_pos: Vector2, height: float) -> Vector3:
var camera := Referencer.main_camera
var camera := MainCamera.instance
var from := camera.project_ray_origin(mouse_pos)
var direction := camera.project_ray_normal(mouse_pos)

View File

@@ -19,7 +19,7 @@ var _move_down: float
func handle_input(event: InputEvent, mode: Inputer.Mode) -> void:
if Referencer.players_count == 1:
if Player.is_single_player():
return
if mode == Inputer.Mode.KB_MOUSE and event is InputEventKey:
@@ -63,7 +63,7 @@ func movement(
func _lateral_movement(velocity: Vector3, delta: float, can_move: bool) -> Vector3:
if Referencer.players_count == 1:
if Player.is_single_player():
move_input = Input.get_vector(
"move_left",
"move_right",
@@ -83,7 +83,7 @@ func _lateral_movement(velocity: Vector3, delta: float, can_move: bool) -> Vecto
if move_input.length() > 0 and can_move:
_move_direction = Vector3(move_input.x, 0, move_input.y).normalized().rotated(
Vector3.UP, Referencer.main_camera.rotation.y
Vector3.UP, MainCamera.instance.rotation.y
)
var new_velocity := _move_direction * move_speed
new_velocity.y = velocity.y

View File

@@ -16,7 +16,7 @@ func _ready() -> void:
func _process(_delta: float) -> void:
if not Referencer.players or not Referencer.main_camera:
if not Player.instances or not MainCamera.instance:
var mouse_pos := get_viewport().get_mouse_position()
_single_cursor.position = mouse_pos - _single_cursor.size / 2
_single_cursor.visible = true
@@ -29,7 +29,7 @@ func _physics_process(delta: float) -> void:
func _handle_cursors(delta: float) -> void:
for player_index in range(Referencer.players_count):
for player_index in range(Player.instances.size()):
_handle_cursor(player_index, delta)
@@ -44,7 +44,7 @@ func _init_player_cursor(id: int) -> void:
func _handle_cursor(player_index: int, delta: float) -> void:
var player := Referencer.players[player_index]
var player := Player.instances[player_index]
var id := player.get_instance_id()
if not _cursors.has(id):
@@ -52,7 +52,7 @@ func _handle_cursor(player_index: int, delta: float) -> void:
return
var cursor_pos_world := player.attack.global_position + player.aiming.aim_offset
var cursor_pos_screen := Referencer.main_camera.unproject_position(cursor_pos_world)
var cursor_pos_screen := MainCamera.instance.unproject_position(cursor_pos_world)
var clamp_corner_min := Vector2.ZERO
var clamp_corner_max := get_viewport().get_visible_rect().size
@@ -74,13 +74,13 @@ func _handle_cursor(player_index: int, delta: float) -> void:
)
var aim_offset_normalized := player.aiming.aim_offset.normalized()
var bat_rotation_point_screen := Referencer.main_camera.unproject_position(
var bat_rotation_point_screen := MainCamera.instance.unproject_position(
(
cursor_pos_world
+ aim_offset_normalized.rotated(Vector3.UP, cursor.side as float)
)
)
var arrow_rotation_point_screen := Referencer.main_camera.unproject_position(
var arrow_rotation_point_screen := MainCamera.instance.unproject_position(
cursor_pos_world + aim_offset_normalized
)

View File

@@ -1,5 +0,0 @@
extends Node
var main_camera: MainCamera
var players: Array[Player]
var players_count: int = 0

View File

@@ -1 +0,0 @@
uid://xe3jh3bo5skb