perf: 优化奖励特效
This commit is contained in:
@@ -41,12 +41,12 @@
|
||||
"userData": {
|
||||
"trimThreshold": 1,
|
||||
"rotated": false,
|
||||
"offsetX": 27,
|
||||
"offsetY": 105,
|
||||
"trimX": 132,
|
||||
"trimY": 260,
|
||||
"width": 540,
|
||||
"height": 604,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"trimX": 0,
|
||||
"trimY": 0,
|
||||
"width": 750,
|
||||
"height": 1334,
|
||||
"rawWidth": 750,
|
||||
"rawHeight": 1334,
|
||||
"borderTop": 0,
|
||||
@@ -60,17 +60,17 @@
|
||||
"meshType": 0,
|
||||
"vertices": {
|
||||
"rawPosition": [
|
||||
-270,
|
||||
-302,
|
||||
-375,
|
||||
-667,
|
||||
0,
|
||||
270,
|
||||
-302,
|
||||
375,
|
||||
-667,
|
||||
0,
|
||||
-270,
|
||||
302,
|
||||
-375,
|
||||
667,
|
||||
0,
|
||||
270,
|
||||
302,
|
||||
375,
|
||||
667,
|
||||
0
|
||||
],
|
||||
"indexes": [
|
||||
@@ -82,40 +82,40 @@
|
||||
3
|
||||
],
|
||||
"uv": [
|
||||
132,
|
||||
1074,
|
||||
672,
|
||||
1074,
|
||||
132,
|
||||
470,
|
||||
672,
|
||||
470
|
||||
0,
|
||||
1334,
|
||||
750,
|
||||
1334,
|
||||
0,
|
||||
0,
|
||||
750,
|
||||
0
|
||||
],
|
||||
"nuv": [
|
||||
0.176,
|
||||
0.3523238380809595,
|
||||
0.896,
|
||||
0.3523238380809595,
|
||||
0.176,
|
||||
0.8050974512743628,
|
||||
0.896,
|
||||
0.8050974512743628
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
1,
|
||||
1
|
||||
],
|
||||
"minPos": [
|
||||
-270,
|
||||
-302,
|
||||
-375,
|
||||
-667,
|
||||
0
|
||||
],
|
||||
"maxPos": [
|
||||
270,
|
||||
302,
|
||||
375,
|
||||
667,
|
||||
0
|
||||
]
|
||||
},
|
||||
"isUuid": true,
|
||||
"imageUuidOrDatabaseUri": "7f9ff6b4-469e-4cef-8422-8f8f93399f82@6c48a",
|
||||
"atlasUuid": "",
|
||||
"trimType": "auto"
|
||||
"trimType": "none"
|
||||
},
|
||||
"ver": "1.0.12",
|
||||
"imported": true,
|
||||
|
||||
@@ -41,12 +41,12 @@
|
||||
"userData": {
|
||||
"trimThreshold": 1,
|
||||
"rotated": false,
|
||||
"offsetX": 26.5,
|
||||
"offsetY": 102,
|
||||
"trimX": 128,
|
||||
"trimY": 266,
|
||||
"width": 547,
|
||||
"height": 598,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"trimX": 0,
|
||||
"trimY": 0,
|
||||
"width": 750,
|
||||
"height": 1334,
|
||||
"rawWidth": 750,
|
||||
"rawHeight": 1334,
|
||||
"borderTop": 0,
|
||||
@@ -60,17 +60,17 @@
|
||||
"meshType": 0,
|
||||
"vertices": {
|
||||
"rawPosition": [
|
||||
-273.5,
|
||||
-299,
|
||||
-375,
|
||||
-667,
|
||||
0,
|
||||
273.5,
|
||||
-299,
|
||||
375,
|
||||
-667,
|
||||
0,
|
||||
-273.5,
|
||||
299,
|
||||
-375,
|
||||
667,
|
||||
0,
|
||||
273.5,
|
||||
299,
|
||||
375,
|
||||
667,
|
||||
0
|
||||
],
|
||||
"indexes": [
|
||||
@@ -82,40 +82,40 @@
|
||||
3
|
||||
],
|
||||
"uv": [
|
||||
128,
|
||||
1068,
|
||||
675,
|
||||
1068,
|
||||
128,
|
||||
470,
|
||||
675,
|
||||
470
|
||||
0,
|
||||
1334,
|
||||
750,
|
||||
1334,
|
||||
0,
|
||||
0,
|
||||
750,
|
||||
0
|
||||
],
|
||||
"nuv": [
|
||||
0.17066666666666666,
|
||||
0.3523238380809595,
|
||||
0.9,
|
||||
0.3523238380809595,
|
||||
0.17066666666666666,
|
||||
0.800599700149925,
|
||||
0.9,
|
||||
0.800599700149925
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
1,
|
||||
1
|
||||
],
|
||||
"minPos": [
|
||||
-273.5,
|
||||
-299,
|
||||
-375,
|
||||
-667,
|
||||
0
|
||||
],
|
||||
"maxPos": [
|
||||
273.5,
|
||||
299,
|
||||
375,
|
||||
667,
|
||||
0
|
||||
]
|
||||
},
|
||||
"isUuid": true,
|
||||
"imageUuidOrDatabaseUri": "1a8d83b8-2a7c-4237-a143-e993977ee029@6c48a",
|
||||
"atlasUuid": "",
|
||||
"trimType": "auto"
|
||||
"trimType": "none"
|
||||
},
|
||||
"ver": "1.0.12",
|
||||
"imported": true,
|
||||
|
||||
@@ -41,12 +41,12 @@
|
||||
"userData": {
|
||||
"trimThreshold": 1,
|
||||
"rotated": false,
|
||||
"offsetX": 20.5,
|
||||
"offsetY": 27.5,
|
||||
"trimX": 41,
|
||||
"trimY": 155,
|
||||
"width": 679,
|
||||
"height": 915,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"trimX": 0,
|
||||
"trimY": 0,
|
||||
"width": 720,
|
||||
"height": 1280,
|
||||
"rawWidth": 720,
|
||||
"rawHeight": 1280,
|
||||
"borderTop": 0,
|
||||
@@ -60,17 +60,17 @@
|
||||
"meshType": 0,
|
||||
"vertices": {
|
||||
"rawPosition": [
|
||||
-339.5,
|
||||
-457.5,
|
||||
-360,
|
||||
-640,
|
||||
0,
|
||||
339.5,
|
||||
-457.5,
|
||||
360,
|
||||
-640,
|
||||
0,
|
||||
-339.5,
|
||||
457.5,
|
||||
-360,
|
||||
640,
|
||||
0,
|
||||
339.5,
|
||||
457.5,
|
||||
360,
|
||||
640,
|
||||
0
|
||||
],
|
||||
"indexes": [
|
||||
@@ -82,40 +82,40 @@
|
||||
3
|
||||
],
|
||||
"uv": [
|
||||
41,
|
||||
1125,
|
||||
0,
|
||||
1280,
|
||||
720,
|
||||
1125,
|
||||
41,
|
||||
210,
|
||||
1280,
|
||||
0,
|
||||
0,
|
||||
720,
|
||||
210
|
||||
0
|
||||
],
|
||||
"nuv": [
|
||||
0.05694444444444444,
|
||||
0.1640625,
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
0.1640625,
|
||||
0.05694444444444444,
|
||||
0.87890625,
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
0.87890625
|
||||
1,
|
||||
1
|
||||
],
|
||||
"minPos": [
|
||||
-339.5,
|
||||
-457.5,
|
||||
-360,
|
||||
-640,
|
||||
0
|
||||
],
|
||||
"maxPos": [
|
||||
339.5,
|
||||
457.5,
|
||||
360,
|
||||
640,
|
||||
0
|
||||
]
|
||||
},
|
||||
"isUuid": true,
|
||||
"imageUuidOrDatabaseUri": "ef0a4723-ab8e-481f-9567-e9b2a1400181@6c48a",
|
||||
"atlasUuid": "",
|
||||
"trimType": "auto"
|
||||
"trimType": "none"
|
||||
},
|
||||
"ver": "1.0.12",
|
||||
"imported": true,
|
||||
|
||||
@@ -41,12 +41,12 @@
|
||||
"userData": {
|
||||
"trimThreshold": 1,
|
||||
"rotated": false,
|
||||
"offsetX": 20.5,
|
||||
"offsetY": 27.5,
|
||||
"trimX": 41,
|
||||
"trimY": 155,
|
||||
"width": 679,
|
||||
"height": 915,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"trimX": 0,
|
||||
"trimY": 0,
|
||||
"width": 720,
|
||||
"height": 1280,
|
||||
"rawWidth": 720,
|
||||
"rawHeight": 1280,
|
||||
"borderTop": 0,
|
||||
@@ -60,17 +60,17 @@
|
||||
"meshType": 0,
|
||||
"vertices": {
|
||||
"rawPosition": [
|
||||
-339.5,
|
||||
-457.5,
|
||||
-360,
|
||||
-640,
|
||||
0,
|
||||
339.5,
|
||||
-457.5,
|
||||
360,
|
||||
-640,
|
||||
0,
|
||||
-339.5,
|
||||
457.5,
|
||||
-360,
|
||||
640,
|
||||
0,
|
||||
339.5,
|
||||
457.5,
|
||||
360,
|
||||
640,
|
||||
0
|
||||
],
|
||||
"indexes": [
|
||||
@@ -82,40 +82,40 @@
|
||||
3
|
||||
],
|
||||
"uv": [
|
||||
41,
|
||||
1125,
|
||||
0,
|
||||
1280,
|
||||
720,
|
||||
1125,
|
||||
41,
|
||||
210,
|
||||
1280,
|
||||
0,
|
||||
0,
|
||||
720,
|
||||
210
|
||||
0
|
||||
],
|
||||
"nuv": [
|
||||
0.05694444444444444,
|
||||
0.1640625,
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
0.1640625,
|
||||
0.05694444444444444,
|
||||
0.87890625,
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
0.87890625
|
||||
1,
|
||||
1
|
||||
],
|
||||
"minPos": [
|
||||
-339.5,
|
||||
-457.5,
|
||||
-360,
|
||||
-640,
|
||||
0
|
||||
],
|
||||
"maxPos": [
|
||||
339.5,
|
||||
457.5,
|
||||
360,
|
||||
640,
|
||||
0
|
||||
]
|
||||
},
|
||||
"isUuid": true,
|
||||
"imageUuidOrDatabaseUri": "3cbd569e-fed7-4498-87b4-11444552dfb5@6c48a",
|
||||
"atlasUuid": "",
|
||||
"trimType": "auto"
|
||||
"trimType": "none"
|
||||
},
|
||||
"ver": "1.0.12",
|
||||
"imported": true,
|
||||
|
||||
@@ -41,12 +41,12 @@
|
||||
"userData": {
|
||||
"trimThreshold": 1,
|
||||
"rotated": false,
|
||||
"offsetX": 20.5,
|
||||
"offsetY": 27.5,
|
||||
"trimX": 41,
|
||||
"trimY": 155,
|
||||
"width": 679,
|
||||
"height": 915,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"trimX": 0,
|
||||
"trimY": 0,
|
||||
"width": 720,
|
||||
"height": 1280,
|
||||
"rawWidth": 720,
|
||||
"rawHeight": 1280,
|
||||
"borderTop": 0,
|
||||
@@ -60,17 +60,17 @@
|
||||
"meshType": 0,
|
||||
"vertices": {
|
||||
"rawPosition": [
|
||||
-339.5,
|
||||
-457.5,
|
||||
-360,
|
||||
-640,
|
||||
0,
|
||||
339.5,
|
||||
-457.5,
|
||||
360,
|
||||
-640,
|
||||
0,
|
||||
-339.5,
|
||||
457.5,
|
||||
-360,
|
||||
640,
|
||||
0,
|
||||
339.5,
|
||||
457.5,
|
||||
360,
|
||||
640,
|
||||
0
|
||||
],
|
||||
"indexes": [
|
||||
@@ -82,40 +82,40 @@
|
||||
3
|
||||
],
|
||||
"uv": [
|
||||
41,
|
||||
1125,
|
||||
0,
|
||||
1280,
|
||||
720,
|
||||
1125,
|
||||
41,
|
||||
210,
|
||||
1280,
|
||||
0,
|
||||
0,
|
||||
720,
|
||||
210
|
||||
0
|
||||
],
|
||||
"nuv": [
|
||||
0.05694444444444444,
|
||||
0.1640625,
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
0.1640625,
|
||||
0.05694444444444444,
|
||||
0.87890625,
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
0.87890625
|
||||
1,
|
||||
1
|
||||
],
|
||||
"minPos": [
|
||||
-339.5,
|
||||
-457.5,
|
||||
-360,
|
||||
-640,
|
||||
0
|
||||
],
|
||||
"maxPos": [
|
||||
339.5,
|
||||
457.5,
|
||||
360,
|
||||
640,
|
||||
0
|
||||
]
|
||||
},
|
||||
"isUuid": true,
|
||||
"imageUuidOrDatabaseUri": "4d9cec20-8b34-46e7-9251-59272d42b227@6c48a",
|
||||
"atlasUuid": "",
|
||||
"trimType": "auto"
|
||||
"trimType": "none"
|
||||
},
|
||||
"ver": "1.0.12",
|
||||
"imported": true,
|
||||
|
||||
@@ -41,12 +41,12 @@
|
||||
"userData": {
|
||||
"trimThreshold": 1,
|
||||
"rotated": false,
|
||||
"offsetX": 20.5,
|
||||
"offsetY": 27.5,
|
||||
"trimX": 41,
|
||||
"trimY": 155,
|
||||
"width": 679,
|
||||
"height": 915,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"trimX": 0,
|
||||
"trimY": 0,
|
||||
"width": 720,
|
||||
"height": 1280,
|
||||
"rawWidth": 720,
|
||||
"rawHeight": 1280,
|
||||
"borderTop": 0,
|
||||
@@ -60,17 +60,17 @@
|
||||
"meshType": 0,
|
||||
"vertices": {
|
||||
"rawPosition": [
|
||||
-339.5,
|
||||
-457.5,
|
||||
-360,
|
||||
-640,
|
||||
0,
|
||||
339.5,
|
||||
-457.5,
|
||||
360,
|
||||
-640,
|
||||
0,
|
||||
-339.5,
|
||||
457.5,
|
||||
-360,
|
||||
640,
|
||||
0,
|
||||
339.5,
|
||||
457.5,
|
||||
360,
|
||||
640,
|
||||
0
|
||||
],
|
||||
"indexes": [
|
||||
@@ -82,40 +82,40 @@
|
||||
3
|
||||
],
|
||||
"uv": [
|
||||
41,
|
||||
1125,
|
||||
0,
|
||||
1280,
|
||||
720,
|
||||
1125,
|
||||
41,
|
||||
210,
|
||||
1280,
|
||||
0,
|
||||
0,
|
||||
720,
|
||||
210
|
||||
0
|
||||
],
|
||||
"nuv": [
|
||||
0.05694444444444444,
|
||||
0.1640625,
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
0.1640625,
|
||||
0.05694444444444444,
|
||||
0.87890625,
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
0.87890625
|
||||
1,
|
||||
1
|
||||
],
|
||||
"minPos": [
|
||||
-339.5,
|
||||
-457.5,
|
||||
-360,
|
||||
-640,
|
||||
0
|
||||
],
|
||||
"maxPos": [
|
||||
339.5,
|
||||
457.5,
|
||||
360,
|
||||
640,
|
||||
0
|
||||
]
|
||||
},
|
||||
"isUuid": true,
|
||||
"imageUuidOrDatabaseUri": "67702aaf-c444-4d4c-8605-026cdbe6fee5@6c48a",
|
||||
"atlasUuid": "",
|
||||
"trimType": "auto"
|
||||
"trimType": "none"
|
||||
},
|
||||
"ver": "1.0.12",
|
||||
"imported": true,
|
||||
|
||||
@@ -41,12 +41,12 @@
|
||||
"userData": {
|
||||
"trimThreshold": 1,
|
||||
"rotated": false,
|
||||
"offsetX": 20.5,
|
||||
"offsetY": 27.5,
|
||||
"trimX": 41,
|
||||
"trimY": 155,
|
||||
"width": 679,
|
||||
"height": 915,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"trimX": 0,
|
||||
"trimY": 0,
|
||||
"width": 720,
|
||||
"height": 1280,
|
||||
"rawWidth": 720,
|
||||
"rawHeight": 1280,
|
||||
"borderTop": 0,
|
||||
@@ -60,17 +60,17 @@
|
||||
"meshType": 0,
|
||||
"vertices": {
|
||||
"rawPosition": [
|
||||
-339.5,
|
||||
-457.5,
|
||||
-360,
|
||||
-640,
|
||||
0,
|
||||
339.5,
|
||||
-457.5,
|
||||
360,
|
||||
-640,
|
||||
0,
|
||||
-339.5,
|
||||
457.5,
|
||||
-360,
|
||||
640,
|
||||
0,
|
||||
339.5,
|
||||
457.5,
|
||||
360,
|
||||
640,
|
||||
0
|
||||
],
|
||||
"indexes": [
|
||||
@@ -82,40 +82,40 @@
|
||||
3
|
||||
],
|
||||
"uv": [
|
||||
41,
|
||||
1125,
|
||||
0,
|
||||
1280,
|
||||
720,
|
||||
1125,
|
||||
41,
|
||||
210,
|
||||
1280,
|
||||
0,
|
||||
0,
|
||||
720,
|
||||
210
|
||||
0
|
||||
],
|
||||
"nuv": [
|
||||
0.05694444444444444,
|
||||
0.1640625,
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
0.1640625,
|
||||
0.05694444444444444,
|
||||
0.87890625,
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
0.87890625
|
||||
1,
|
||||
1
|
||||
],
|
||||
"minPos": [
|
||||
-339.5,
|
||||
-457.5,
|
||||
-360,
|
||||
-640,
|
||||
0
|
||||
],
|
||||
"maxPos": [
|
||||
339.5,
|
||||
457.5,
|
||||
360,
|
||||
640,
|
||||
0
|
||||
]
|
||||
},
|
||||
"isUuid": true,
|
||||
"imageUuidOrDatabaseUri": "05946790-3cbd-42a1-a3b9-523d0e99ea3a@6c48a",
|
||||
"atlasUuid": "",
|
||||
"trimType": "auto"
|
||||
"trimType": "none"
|
||||
},
|
||||
"ver": "1.0.12",
|
||||
"imported": true,
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -242,6 +242,13 @@ export class PlayerController extends Component {
|
||||
// 开始沿路径移动
|
||||
this.currentPathIndex = 0;
|
||||
this.isMoving = true;
|
||||
|
||||
// 根据移动方向选择动画
|
||||
const animationName = this.getAnimationNameByDirection(startPos, clampedPos);
|
||||
|
||||
// 切换到对应的动画
|
||||
this.switchAnimation(animationName);
|
||||
|
||||
this.moveToNextWaypoint();
|
||||
}
|
||||
|
||||
@@ -355,11 +362,6 @@ export class PlayerController extends Component {
|
||||
const targetPos = this.currentPath[this.currentPathIndex];
|
||||
const currentPos = this.player.position;
|
||||
|
||||
// 根据移动方向选择动画
|
||||
const animationName = this.getAnimationNameByDirection(currentPos, targetPos);
|
||||
|
||||
// 切换到对应的动画
|
||||
this.switchAnimation(animationName);
|
||||
|
||||
// 计算移动距离和时间
|
||||
const distance = Vec3.distance(currentPos, targetPos);
|
||||
|
||||
Reference in New Issue
Block a user