fix(gameplay): 优化敌人碰撞体与新手教程瞄准

- 扩大并重叠 14 个 Enemy 的胸腹部碰撞体
- 消除自动锁定点位于碰撞体边缘的问题
- 移除教程中写死的相机瞄准角度
- 根据目标实时位置动态调整教程相机
- 自动选择与初始镜头夹角最小的存活敌人
- 同步瞄准状态,避免后续滑动发生角度跳变
This commit is contained in:
2026-07-21 19:05:38 +08:00
parent b283097c03
commit 9deac44a1e
20 changed files with 203 additions and 190 deletions
Binary file not shown.
+12 -12
View File
@@ -2068,14 +2068,14 @@
"_center": { "_center": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
"x": 0, "x": 0,
"y": 0.00532, "y": 0.002,
"z": 0 "z": 0
}, },
"_size": { "_size": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
"x": 0.012, "x": 0.016,
"y": 0.011, "y": 0.018,
"z": 0.009 "z": 0.013
}, },
"_id": "d50DO+lKpPWLVMK/HsidFB" "_id": "d50DO+lKpPWLVMK/HsidFB"
}, },
@@ -2191,14 +2191,14 @@
"_center": { "_center": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
"x": 0, "x": 0,
"y": 0.00532, "y": 0.003,
"z": 0 "z": 0
}, },
"_size": { "_size": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
"x": 0.011, "x": 0.015,
"y": 0.011, "y": 0.017,
"z": 0.009 "z": 0.012
}, },
"_id": "04l7UdTa9PxqdYrAekTlpM" "_id": "04l7UdTa9PxqdYrAekTlpM"
}, },
@@ -3968,14 +3968,14 @@
"_center": { "_center": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
"x": 0, "x": 0,
"y": 0.00456, "y": 0.0035,
"z": 0 "z": 0
}, },
"_size": { "_size": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
"x": 0.012, "x": 0.014,
"y": 0.012, "y": 0.016,
"z": 0.01 "z": 0.012
}, },
"_id": "00dPV63vFF6a+06pX9iObI" "_id": "00dPV63vFF6a+06pX9iObI"
}, },
+12 -12
View File
@@ -2068,14 +2068,14 @@
"_center": { "_center": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
"x": 0, "x": 0,
"y": 0.00532, "y": 0.002,
"z": 0 "z": 0
}, },
"_size": { "_size": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
"x": 0.012, "x": 0.016,
"y": 0.011, "y": 0.018,
"z": 0.009 "z": 0.013
}, },
"_id": "43YALw+7NO57es6oxh9N0s" "_id": "43YALw+7NO57es6oxh9N0s"
}, },
@@ -2191,14 +2191,14 @@
"_center": { "_center": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
"x": 0, "x": 0,
"y": 0.00532, "y": 0.003,
"z": 0 "z": 0
}, },
"_size": { "_size": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
"x": 0.011, "x": 0.015,
"y": 0.011, "y": 0.017,
"z": 0.009 "z": 0.012
}, },
"_id": "6dpR3pw99Pb7kGKOC/cwLn" "_id": "6dpR3pw99Pb7kGKOC/cwLn"
}, },
@@ -3968,14 +3968,14 @@
"_center": { "_center": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
"x": 0, "x": 0,
"y": 0.00456, "y": 0.0035,
"z": 0 "z": 0
}, },
"_size": { "_size": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
"x": 0.012, "x": 0.014,
"y": 0.012, "y": 0.016,
"z": 0.01 "z": 0.012
}, },
"_id": "1a15FB1BpBu4qYMcSMtBvE" "_id": "1a15FB1BpBu4qYMcSMtBvE"
}, },
+12 -12
View File
@@ -2068,14 +2068,14 @@
"_center": { "_center": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
"x": 0, "x": 0,
"y": 0.00532, "y": 0.002,
"z": 0 "z": 0
}, },
"_size": { "_size": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
"x": 0.012, "x": 0.016,
"y": 0.011, "y": 0.018,
"z": 0.009 "z": 0.013
}, },
"_id": "b1RUCQOEdDIbpsOdW/yDiE" "_id": "b1RUCQOEdDIbpsOdW/yDiE"
}, },
@@ -2191,14 +2191,14 @@
"_center": { "_center": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
"x": 0, "x": 0,
"y": 0.00532, "y": 0.003,
"z": 0 "z": 0
}, },
"_size": { "_size": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
"x": 0.011, "x": 0.015,
"y": 0.011, "y": 0.017,
"z": 0.009 "z": 0.012
}, },
"_id": "9crNqpfBNHBKZ4M/QNwRhv" "_id": "9crNqpfBNHBKZ4M/QNwRhv"
}, },
@@ -3968,14 +3968,14 @@
"_center": { "_center": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
"x": 0, "x": 0,
"y": 0.00456, "y": 0.0035,
"z": 0 "z": 0
}, },
"_size": { "_size": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
"x": 0.012, "x": 0.014,
"y": 0.012, "y": 0.016,
"z": 0.01 "z": 0.012
}, },
"_id": "b8I1I8WlBB5r/WYqeSo5XI" "_id": "b8I1I8WlBB5r/WYqeSo5XI"
}, },
+12 -12
View File
@@ -2068,14 +2068,14 @@
"_center": { "_center": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
"x": 0, "x": 0,
"y": 0.00532, "y": 0.002,
"z": 0 "z": 0
}, },
"_size": { "_size": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
"x": 0.012, "x": 0.016,
"y": 0.011, "y": 0.018,
"z": 0.009 "z": 0.013
}, },
"_id": "dbVGcTsLhHpKJzE57V45d7" "_id": "dbVGcTsLhHpKJzE57V45d7"
}, },
@@ -2191,14 +2191,14 @@
"_center": { "_center": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
"x": 0, "x": 0,
"y": 0.00532, "y": 0.003,
"z": 0 "z": 0
}, },
"_size": { "_size": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
"x": 0.011, "x": 0.015,
"y": 0.011, "y": 0.017,
"z": 0.009 "z": 0.012
}, },
"_id": "77UoENSDdDz7lkU+r28Sec" "_id": "77UoENSDdDz7lkU+r28Sec"
}, },
@@ -3968,14 +3968,14 @@
"_center": { "_center": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
"x": 0, "x": 0,
"y": 0.00456, "y": 0.0035,
"z": 0 "z": 0
}, },
"_size": { "_size": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
"x": 0.012, "x": 0.014,
"y": 0.012, "y": 0.016,
"z": 0.01 "z": 0.012
}, },
"_id": "bf/wWvOv5JqaS6r8wb/BQ1" "_id": "bf/wWvOv5JqaS6r8wb/BQ1"
}, },
+12 -12
View File
@@ -2068,14 +2068,14 @@
"_center": { "_center": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
"x": 0, "x": 0,
"y": 0.00532, "y": 0.002,
"z": 0 "z": 0
}, },
"_size": { "_size": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
"x": 0.012, "x": 0.016,
"y": 0.011, "y": 0.018,
"z": 0.009 "z": 0.013
}, },
"_id": "6cLcsSQ3VMQ5dmjvtgfV5Z" "_id": "6cLcsSQ3VMQ5dmjvtgfV5Z"
}, },
@@ -2191,14 +2191,14 @@
"_center": { "_center": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
"x": 0, "x": 0,
"y": 0.00532, "y": 0.003,
"z": 0 "z": 0
}, },
"_size": { "_size": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
"x": 0.011, "x": 0.015,
"y": 0.011, "y": 0.017,
"z": 0.009 "z": 0.012
}, },
"_id": "bcKWdmWG9Drb69dtRDAEO9" "_id": "bcKWdmWG9Drb69dtRDAEO9"
}, },
@@ -3968,14 +3968,14 @@
"_center": { "_center": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
"x": 0, "x": 0,
"y": 0.00456, "y": 0.0035,
"z": 0 "z": 0
}, },
"_size": { "_size": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
"x": 0.012, "x": 0.014,
"y": 0.012, "y": 0.016,
"z": 0.01 "z": 0.012
}, },
"_id": "ebczjSs+pD0Z2BJmjB+f1C" "_id": "ebczjSs+pD0Z2BJmjB+f1C"
}, },
+12 -12
View File
@@ -2068,14 +2068,14 @@
"_center": { "_center": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
"x": 0, "x": 0,
"y": 0.00532, "y": 0.002,
"z": 0 "z": 0
}, },
"_size": { "_size": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
"x": 0.012, "x": 0.016,
"y": 0.011, "y": 0.018,
"z": 0.009 "z": 0.013
}, },
"_id": "5bH1hMFGJIprqC4+yVk7i7" "_id": "5bH1hMFGJIprqC4+yVk7i7"
}, },
@@ -2191,14 +2191,14 @@
"_center": { "_center": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
"x": 0, "x": 0,
"y": 0.00532, "y": 0.003,
"z": 0 "z": 0
}, },
"_size": { "_size": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
"x": 0.011, "x": 0.015,
"y": 0.011, "y": 0.017,
"z": 0.009 "z": 0.012
}, },
"_id": "a1VE/MQABFKrF+N8hXAXTJ" "_id": "a1VE/MQABFKrF+N8hXAXTJ"
}, },
@@ -3968,14 +3968,14 @@
"_center": { "_center": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
"x": 0, "x": 0,
"y": 0.00456, "y": 0.0035,
"z": 0 "z": 0
}, },
"_size": { "_size": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
"x": 0.012, "x": 0.014,
"y": 0.012, "y": 0.016,
"z": 0.01 "z": 0.012
}, },
"_id": "8d6f9oVexKAYzh5wb22PUp" "_id": "8d6f9oVexKAYzh5wb22PUp"
}, },
+12 -12
View File
@@ -2068,14 +2068,14 @@
"_center": { "_center": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
"x": 0, "x": 0,
"y": 0.00532, "y": 0.002,
"z": 0 "z": 0
}, },
"_size": { "_size": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
"x": 0.012, "x": 0.016,
"y": 0.011, "y": 0.018,
"z": 0.009 "z": 0.013
}, },
"_id": "47xVpvzJpCVJUysKEswOyM" "_id": "47xVpvzJpCVJUysKEswOyM"
}, },
@@ -2191,14 +2191,14 @@
"_center": { "_center": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
"x": 0, "x": 0,
"y": 0.00532, "y": 0.003,
"z": 0 "z": 0
}, },
"_size": { "_size": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
"x": 0.011, "x": 0.015,
"y": 0.011, "y": 0.017,
"z": 0.009 "z": 0.012
}, },
"_id": "c4qV7TVWxCN7dqxOlGae/R" "_id": "c4qV7TVWxCN7dqxOlGae/R"
}, },
@@ -3968,14 +3968,14 @@
"_center": { "_center": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
"x": 0, "x": 0,
"y": 0.00456, "y": 0.0035,
"z": 0 "z": 0
}, },
"_size": { "_size": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
"x": 0.012, "x": 0.014,
"y": 0.012, "y": 0.016,
"z": 0.01 "z": 0.012
}, },
"_id": "2e4AkzIWNH164N98NHMwf9" "_id": "2e4AkzIWNH164N98NHMwf9"
}, },
+12 -12
View File
@@ -2068,14 +2068,14 @@
"_center": { "_center": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
"x": 0, "x": 0,
"y": 0.00532, "y": 0.002,
"z": 0 "z": 0
}, },
"_size": { "_size": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
"x": 0.012, "x": 0.016,
"y": 0.011, "y": 0.018,
"z": 0.009 "z": 0.013
}, },
"_id": "1dl/irwDpM8orl1bhiIB7I" "_id": "1dl/irwDpM8orl1bhiIB7I"
}, },
@@ -2191,14 +2191,14 @@
"_center": { "_center": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
"x": 0, "x": 0,
"y": 0.00532, "y": 0.003,
"z": 0 "z": 0
}, },
"_size": { "_size": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
"x": 0.011, "x": 0.015,
"y": 0.011, "y": 0.017,
"z": 0.009 "z": 0.012
}, },
"_id": "30HuK0tnhIr6P/MMdDtPzw" "_id": "30HuK0tnhIr6P/MMdDtPzw"
}, },
@@ -3968,14 +3968,14 @@
"_center": { "_center": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
"x": 0, "x": 0,
"y": 0.00456, "y": 0.0035,
"z": 0 "z": 0
}, },
"_size": { "_size": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
"x": 0.012, "x": 0.014,
"y": 0.012, "y": 0.016,
"z": 0.01 "z": 0.012
}, },
"_id": "81PPETs2tJLLhCx4+iQC92" "_id": "81PPETs2tJLLhCx4+iQC92"
}, },
+12 -12
View File
@@ -2068,14 +2068,14 @@
"_center": { "_center": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
"x": 0, "x": 0,
"y": 0.00532, "y": 0.002,
"z": 0 "z": 0
}, },
"_size": { "_size": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
"x": 0.012, "x": 0.016,
"y": 0.011, "y": 0.018,
"z": 0.009 "z": 0.013
}, },
"_id": "9bPKh3OsxMnZl7RtmG1ZOx" "_id": "9bPKh3OsxMnZl7RtmG1ZOx"
}, },
@@ -2191,14 +2191,14 @@
"_center": { "_center": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
"x": 0, "x": 0,
"y": 0.00532, "y": 0.003,
"z": 0 "z": 0
}, },
"_size": { "_size": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
"x": 0.011, "x": 0.015,
"y": 0.011, "y": 0.017,
"z": 0.009 "z": 0.012
}, },
"_id": "02SxT1YqVAh6Zc1Y9varnJ" "_id": "02SxT1YqVAh6Zc1Y9varnJ"
}, },
@@ -3968,14 +3968,14 @@
"_center": { "_center": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
"x": 0, "x": 0,
"y": 0.00456, "y": 0.0035,
"z": 0 "z": 0
}, },
"_size": { "_size": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
"x": 0.012, "x": 0.014,
"y": 0.012, "y": 0.016,
"z": 0.01 "z": 0.012
}, },
"_id": "7bHpn9uFFCrqVCqIMyvW6j" "_id": "7bHpn9uFFCrqVCqIMyvW6j"
}, },
+12 -12
View File
@@ -2068,14 +2068,14 @@
"_center": { "_center": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
"x": 0, "x": 0,
"y": 0.00532, "y": 0.002,
"z": 0 "z": 0
}, },
"_size": { "_size": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
"x": 0.012, "x": 0.016,
"y": 0.011, "y": 0.018,
"z": 0.009 "z": 0.013
}, },
"_id": "f3av3Aay5MbI8D0D3TXALg" "_id": "f3av3Aay5MbI8D0D3TXALg"
}, },
@@ -2191,14 +2191,14 @@
"_center": { "_center": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
"x": 0, "x": 0,
"y": 0.00532, "y": 0.003,
"z": 0 "z": 0
}, },
"_size": { "_size": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
"x": 0.011, "x": 0.015,
"y": 0.011, "y": 0.017,
"z": 0.009 "z": 0.012
}, },
"_id": "95WnL+sX9Lx4Q4j7KHonrE" "_id": "95WnL+sX9Lx4Q4j7KHonrE"
}, },
@@ -3968,14 +3968,14 @@
"_center": { "_center": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
"x": 0, "x": 0,
"y": 0.00456, "y": 0.0035,
"z": 0 "z": 0
}, },
"_size": { "_size": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
"x": 0.012, "x": 0.014,
"y": 0.012, "y": 0.016,
"z": 0.01 "z": 0.012
}, },
"_id": "3aSnL07X1Bf5sRg57fmcWh" "_id": "3aSnL07X1Bf5sRg57fmcWh"
}, },
+12 -12
View File
@@ -2068,14 +2068,14 @@
"_center": { "_center": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
"x": 0, "x": 0,
"y": 0.00532, "y": 0.002,
"z": 0 "z": 0
}, },
"_size": { "_size": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
"x": 0.012, "x": 0.016,
"y": 0.011, "y": 0.018,
"z": 0.009 "z": 0.013
}, },
"_id": "4388CZJx5N2px5rYCVMlKe" "_id": "4388CZJx5N2px5rYCVMlKe"
}, },
@@ -2191,14 +2191,14 @@
"_center": { "_center": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
"x": 0, "x": 0,
"y": 0.00532, "y": 0.003,
"z": 0 "z": 0
}, },
"_size": { "_size": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
"x": 0.011, "x": 0.015,
"y": 0.011, "y": 0.017,
"z": 0.009 "z": 0.012
}, },
"_id": "8fy/geFdlIg4x1F7nTFsJI" "_id": "8fy/geFdlIg4x1F7nTFsJI"
}, },
@@ -3968,14 +3968,14 @@
"_center": { "_center": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
"x": 0, "x": 0,
"y": 0.00456, "y": 0.0035,
"z": 0 "z": 0
}, },
"_size": { "_size": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
"x": 0.012, "x": 0.014,
"y": 0.012, "y": 0.016,
"z": 0.01 "z": 0.012
}, },
"_id": "a1OA8jvutInJXYnF/ZJqQz" "_id": "a1OA8jvutInJXYnF/ZJqQz"
}, },
+12 -12
View File
@@ -2068,14 +2068,14 @@
"_center": { "_center": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
"x": 0, "x": 0,
"y": 0.00532, "y": 0.002,
"z": 0 "z": 0
}, },
"_size": { "_size": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
"x": 0.012, "x": 0.016,
"y": 0.011, "y": 0.018,
"z": 0.009 "z": 0.013
}, },
"_id": "c18isQeRlNzKzCwrI0BcI/" "_id": "c18isQeRlNzKzCwrI0BcI/"
}, },
@@ -2191,14 +2191,14 @@
"_center": { "_center": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
"x": 0, "x": 0,
"y": 0.00532, "y": 0.003,
"z": 0 "z": 0
}, },
"_size": { "_size": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
"x": 0.011, "x": 0.015,
"y": 0.011, "y": 0.017,
"z": 0.009 "z": 0.012
}, },
"_id": "eenOAqh4RH5Kzw/t6jqLTu" "_id": "eenOAqh4RH5Kzw/t6jqLTu"
}, },
@@ -3968,14 +3968,14 @@
"_center": { "_center": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
"x": 0, "x": 0,
"y": 0.00456, "y": 0.0035,
"z": 0 "z": 0
}, },
"_size": { "_size": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
"x": 0.012, "x": 0.014,
"y": 0.012, "y": 0.016,
"z": 0.01 "z": 0.012
}, },
"_id": "1coWGf9gJJ8K2+Im0a36vP" "_id": "1coWGf9gJJ8K2+Im0a36vP"
}, },
+12 -12
View File
@@ -2068,14 +2068,14 @@
"_center": { "_center": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
"x": 0, "x": 0,
"y": 0.00532, "y": 0.002,
"z": 0 "z": 0
}, },
"_size": { "_size": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
"x": 0.012, "x": 0.016,
"y": 0.011, "y": 0.018,
"z": 0.009 "z": 0.013
}, },
"_id": "d13KNIHbhNoqSsL40jNucE" "_id": "d13KNIHbhNoqSsL40jNucE"
}, },
@@ -2191,14 +2191,14 @@
"_center": { "_center": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
"x": 0, "x": 0,
"y": 0.00532, "y": 0.003,
"z": 0 "z": 0
}, },
"_size": { "_size": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
"x": 0.011, "x": 0.015,
"y": 0.011, "y": 0.017,
"z": 0.009 "z": 0.012
}, },
"_id": "34CTA01gNGaYKM9Ly39e6S" "_id": "34CTA01gNGaYKM9Ly39e6S"
}, },
@@ -3968,14 +3968,14 @@
"_center": { "_center": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
"x": 0, "x": 0,
"y": 0.00456, "y": 0.0035,
"z": 0 "z": 0
}, },
"_size": { "_size": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
"x": 0.012, "x": 0.014,
"y": 0.012, "y": 0.016,
"z": 0.01 "z": 0.012
}, },
"_id": "1bsATL7SpL66qZDWrVUggk" "_id": "1bsATL7SpL66qZDWrVUggk"
}, },
+12 -12
View File
@@ -2068,14 +2068,14 @@
"_center": { "_center": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
"x": 0, "x": 0,
"y": 0.00532, "y": 0.002,
"z": 0 "z": 0
}, },
"_size": { "_size": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
"x": 0.012, "x": 0.016,
"y": 0.011, "y": 0.018,
"z": 0.009 "z": 0.013
}, },
"_id": "8ak3617gJI5J+3gew3map0" "_id": "8ak3617gJI5J+3gew3map0"
}, },
@@ -2191,14 +2191,14 @@
"_center": { "_center": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
"x": 0, "x": 0,
"y": 0.00532, "y": 0.003,
"z": 0 "z": 0
}, },
"_size": { "_size": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
"x": 0.011, "x": 0.015,
"y": 0.011, "y": 0.017,
"z": 0.009 "z": 0.012
}, },
"_id": "fbHhBbrIpFa6KsaMv3wH1s" "_id": "fbHhBbrIpFa6KsaMv3wH1s"
}, },
@@ -3968,14 +3968,14 @@
"_center": { "_center": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
"x": 0, "x": 0,
"y": 0.00456, "y": 0.0035,
"z": 0 "z": 0
}, },
"_size": { "_size": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
"x": 0.012, "x": 0.014,
"y": 0.012, "y": 0.016,
"z": 0.01 "z": 0.012
}, },
"_id": "07TR+fVYxE65rOdWChdMSe" "_id": "07TR+fVYxE65rOdWChdMSe"
}, },
+27 -2
View File
@@ -1,5 +1,5 @@
// @structural-rewrite-v1 // @structural-rewrite-v1
import { _decorator, AssetManager, Camera, Component, instantiate, Node } from 'cc'; import { _decorator, AssetManager, Camera, Component, instantiate, Node, Vec3 } from 'cc';
import { Ragdoll } from '../Ragdoll/Ragdoll'; import { Ragdoll } from '../Ragdoll/Ragdoll';
import { EventCenter } from './EventCenter'; import { EventCenter } from './EventCenter';
import { LevelState } from './EnumFile'; import { LevelState } from './EnumFile';
@@ -305,7 +305,32 @@ export class BattleLevel extends Component {
switch (0 as number) { switch (0 as number) {
case 1: break; case 1: break;
case 2: break; case 2: break;
default: return (this["enemies"] satisfies unknown satisfies unknown satisfies unknown satisfies unknown satisfies unknown satisfies unknown satisfies unknown satisfies unknown)[((this["enemies"] satisfies unknown satisfies unknown satisfies unknown satisfies unknown satisfies unknown satisfies unknown satisfies unknown satisfies unknown)["length"] satisfies unknown satisfies unknown satisfies unknown satisfies unknown satisfies unknown satisfies unknown satisfies unknown satisfies unknown) - 1]; default:
const enemies = (this["enemies"] satisfies unknown satisfies unknown satisfies unknown satisfies unknown satisfies unknown satisfies unknown satisfies unknown satisfies unknown)["filter"]((enemy) => enemy && !(enemy["isDie"] satisfies unknown satisfies unknown satisfies unknown satisfies unknown satisfies unknown satisfies unknown satisfies unknown satisfies unknown));
if (enemies.length === 0)
return null;
const cameraNode = FPSCameraController["getInstance"]()["cameraNode"] satisfies unknown satisfies unknown satisfies unknown satisfies unknown satisfies unknown satisfies unknown satisfies unknown satisfies unknown;
if (!cameraNode)
return enemies[0];
const cameraPosition = cameraNode["getWorldPosition"]();
const cameraForward = cameraNode["forward"] satisfies unknown satisfies unknown satisfies unknown satisfies unknown satisfies unknown satisfies unknown satisfies unknown satisfies unknown;
const direction = new Vec3();
let target = enemies[0];
let bestDot = -Infinity;
for (const enemy of enemies) {
if (!enemy["centerNode"])
continue;
void (Vec3["subtract"](direction, enemy["centerNode"]["getWorldPosition"](), cameraPosition));
if (Vec3["dot"](direction, direction) === 0)
continue;
void (direction["normalize"]());
const dot = Vec3["dot"](cameraForward, direction);
if (dot > bestDot) {
void (bestDot = dot);
void (target = enemy);
}
}
return target;
} }
} while (false); } while (false);
} }
+6 -2
View File
@@ -83,13 +83,17 @@ export class FPSCameraController extends SingletonBase<FPSCameraController> {
finally { finally {
} }
} }
setTutorialRotate(): void { setTutorialRotate(targetNode: Node): void {
try { try {
do { do {
switch (0 as number) { switch (0 as number) {
case 1: break; case 1: break;
case 2: break; case 2: break;
default: void ((this["cameraNode"] satisfies unknown satisfies unknown satisfies unknown satisfies unknown satisfies unknown satisfies unknown satisfies unknown satisfies unknown)["setWorldRotation"]((this["aimState"] satisfies unknown satisfies unknown satisfies unknown satisfies unknown satisfies unknown satisfies unknown satisfies unknown satisfies unknown)["tutorialRotation"]())); default:
if (!this["cameraNode"] || !targetNode)
return;
void ((this["cameraNode"] satisfies unknown satisfies unknown satisfies unknown satisfies unknown satisfies unknown satisfies unknown satisfies unknown satisfies unknown)["lookAt"](targetNode["getWorldPosition"]()));
void ((this["aimState"] satisfies unknown satisfies unknown satisfies unknown satisfies unknown satisfies unknown satisfies unknown satisfies unknown satisfies unknown)["initialize"](this["cameraNode"] satisfies unknown satisfies unknown satisfies unknown satisfies unknown satisfies unknown satisfies unknown satisfies unknown satisfies unknown));
} }
} while (false); } while (false);
} }
@@ -61,20 +61,4 @@ export class CameraAimState {
finally { finally {
} }
} }
tutorialRotation(): Quat {
try {
do {
switch (0 as number) {
case 1: break;
case 2: break;
default:
void (this["vertical"] = -3.99);
void (this["horizontal"] = -32.27);
return Quat["fromEuler"](new Quat(), this["vertical"] satisfies unknown satisfies unknown satisfies unknown satisfies unknown satisfies unknown satisfies unknown satisfies unknown satisfies unknown, this["horizontal"] satisfies unknown satisfies unknown satisfies unknown satisfies unknown satisfies unknown satisfies unknown satisfies unknown satisfies unknown, 0);
}
} while (false);
}
finally {
}
}
} }
+1 -1
View File
@@ -311,7 +311,7 @@ export class PlayPanel extends PanelBase {
void ((this["targetNode"] satisfies unknown satisfies unknown satisfies unknown satisfies unknown satisfies unknown satisfies unknown satisfies unknown satisfies unknown)["position"] = (FPSCameraController["getInstance"]()["camera"] satisfies unknown satisfies unknown satisfies unknown satisfies unknown satisfies unknown satisfies unknown satisfies unknown satisfies unknown)["convertToUINode"]((target["centerNode"] satisfies unknown satisfies unknown satisfies unknown satisfies unknown satisfies unknown satisfies unknown satisfies unknown satisfies unknown)["getWorldPosition"](), this["node"] satisfies unknown satisfies unknown satisfies unknown satisfies unknown satisfies unknown satisfies unknown satisfies unknown satisfies unknown)); void ((this["targetNode"] satisfies unknown satisfies unknown satisfies unknown satisfies unknown satisfies unknown satisfies unknown satisfies unknown satisfies unknown)["position"] = (FPSCameraController["getInstance"]()["camera"] satisfies unknown satisfies unknown satisfies unknown satisfies unknown satisfies unknown satisfies unknown satisfies unknown satisfies unknown)["convertToUINode"]((target["centerNode"] satisfies unknown satisfies unknown satisfies unknown satisfies unknown satisfies unknown satisfies unknown satisfies unknown satisfies unknown)["getWorldPosition"](), this["node"] satisfies unknown satisfies unknown satisfies unknown satisfies unknown satisfies unknown satisfies unknown satisfies unknown satisfies unknown));
if (((this["targetNode"] satisfies unknown satisfies unknown satisfies unknown satisfies unknown satisfies unknown satisfies unknown satisfies unknown satisfies unknown)["position"] satisfies unknown satisfies unknown satisfies unknown satisfies unknown satisfies unknown satisfies unknown satisfies unknown satisfies unknown)["y"] satisfies unknown satisfies unknown satisfies unknown satisfies unknown satisfies unknown satisfies unknown satisfies unknown satisfies unknown < 0 && Math["abs"](((this["targetNode"] satisfies unknown satisfies unknown satisfies unknown satisfies unknown satisfies unknown satisfies unknown satisfies unknown satisfies unknown)["position"] satisfies unknown satisfies unknown satisfies unknown satisfies unknown satisfies unknown satisfies unknown satisfies unknown satisfies unknown)["x"] satisfies unknown satisfies unknown satisfies unknown satisfies unknown satisfies unknown satisfies unknown satisfies unknown satisfies unknown) < 30) { if (((this["targetNode"] satisfies unknown satisfies unknown satisfies unknown satisfies unknown satisfies unknown satisfies unknown satisfies unknown satisfies unknown)["position"] satisfies unknown satisfies unknown satisfies unknown satisfies unknown satisfies unknown satisfies unknown satisfies unknown satisfies unknown)["y"] satisfies unknown satisfies unknown satisfies unknown satisfies unknown satisfies unknown satisfies unknown satisfies unknown satisfies unknown < 0 && Math["abs"](((this["targetNode"] satisfies unknown satisfies unknown satisfies unknown satisfies unknown satisfies unknown satisfies unknown satisfies unknown satisfies unknown)["position"] satisfies unknown satisfies unknown satisfies unknown satisfies unknown satisfies unknown satisfies unknown satisfies unknown satisfies unknown)["x"] satisfies unknown satisfies unknown satisfies unknown satisfies unknown satisfies unknown satisfies unknown satisfies unknown satisfies unknown) < 30) {
void (this["EnterStep3"]()); void (this["EnterStep3"]());
void (FPSCameraController["getInstance"]()["setTutorialRotate"]()); void (FPSCameraController["getInstance"]()["setTutorialRotate"](target["centerNode"] satisfies unknown satisfies unknown satisfies unknown satisfies unknown satisfies unknown satisfies unknown satisfies unknown satisfies unknown));
} }
} }
} while (false); } while (false);
+1 -1
View File
@@ -3,6 +3,6 @@
"config": { "config": {
"images": [], "images": [],
"sceneUUID": {}, "sceneUUID": {},
"scene": "cce78068-e13a-47f5-ae44-d1ac5c097bd7" "scene": "3eb6a584-bf66-49ad-9701-b92767edfbb0"
} }
} }