地图动画,将英雄位置调整

This commit is contained in:
2025-11-04 11:04:27 +08:00
parent 5c9f299fd7
commit fc637529e2
10 changed files with 113 additions and 161 deletions

View File

@@ -11,7 +11,7 @@
"speed": 1,
"wrapMode": 2,
"enableTrsBlending": false,
"_duration": 32.8,
"_duration": 24,
"_hash": 500763545,
"_tracks": [
{
@@ -67,8 +67,9 @@
"__type__": "cc.RealCurve",
"_times": [
0,
20,
32.8
12,
19.8,
24
],
"_values": [
{
@@ -95,6 +96,20 @@
"leftTangent": 0,
"leftTangentWeight": 1,
"easingMethod": 0,
"__editorExtras__": {
"broken": null
}
},
{
"__type__": "cc.RealKeyframeValue",
"interpolationMode": 0,
"tangentWeightMode": 0,
"value": 91.625732421875,
"rightTangent": 0,
"rightTangentWeight": 1,
"leftTangent": 0,
"leftTangentWeight": 1,
"easingMethod": 0,
"__editorExtras__": null
},
{
@@ -123,8 +138,9 @@
"__type__": "cc.RealCurve",
"_times": [
0,
20,
32.8
12,
19.8,
24
],
"_values": [
{
@@ -141,6 +157,20 @@
"broken": null
}
},
{
"__type__": "cc.RealKeyframeValue",
"interpolationMode": 0,
"tangentWeightMode": 0,
"value": 99.77200317382812,
"rightTangent": 0,
"rightTangentWeight": 1,
"leftTangent": 0,
"leftTangentWeight": 1,
"easingMethod": 0,
"__editorExtras__": {
"broken": null
}
},
{
"__type__": "cc.RealKeyframeValue",
"interpolationMode": 0,
@@ -179,8 +209,9 @@
"__type__": "cc.RealCurve",
"_times": [
0,
20,
32.8
12,
19.8,
24
],
"_values": [
{
@@ -197,6 +228,20 @@
"broken": null
}
},
{
"__type__": "cc.RealKeyframeValue",
"interpolationMode": 0,
"tangentWeightMode": 0,
"value": 0,
"rightTangent": 0,
"rightTangentWeight": 1,
"leftTangent": 0,
"leftTangentWeight": 1,
"easingMethod": 0,
"__editorExtras__": {
"broken": null
}
},
{
"__type__": "cc.RealKeyframeValue",
"interpolationMode": 0,

View File

@@ -11,7 +11,7 @@
"speed": 1,
"wrapMode": 2,
"enableTrsBlending": false,
"_duration": 32.8,
"_duration": 20,
"_hash": 500763545,
"_tracks": [
{
@@ -67,8 +67,8 @@
"__type__": "cc.RealCurve",
"_times": [
0,
20,
32.8
12,
20
],
"_values": [
{
@@ -89,7 +89,7 @@
"__type__": "cc.RealKeyframeValue",
"interpolationMode": 0,
"tangentWeightMode": 0,
"value": 429.2049865722656,
"value": 89.82899475097656,
"rightTangent": 0,
"rightTangentWeight": 1,
"leftTangent": 0,
@@ -107,7 +107,9 @@
"leftTangent": 0,
"leftTangentWeight": 1,
"easingMethod": 0,
"__editorExtras__": null
"__editorExtras__": {
"broken": null
}
}
],
"preExtrapolation": 1,
@@ -123,8 +125,8 @@
"__type__": "cc.RealCurve",
"_times": [
0,
20,
32.8
12,
20
],
"_values": [
{
@@ -163,7 +165,9 @@
"leftTangent": 0,
"leftTangentWeight": 1,
"easingMethod": 0,
"__editorExtras__": null
"__editorExtras__": {
"broken": null
}
}
],
"preExtrapolation": 1,
@@ -179,8 +183,8 @@
"__type__": "cc.RealCurve",
"_times": [
0,
20,
32.8
12,
20
],
"_values": [
{
@@ -219,7 +223,9 @@
"leftTangent": 0,
"leftTangentWeight": 1,
"easingMethod": 0,
"__editorExtras__": null
"__editorExtras__": {
"broken": null
}
}
],
"preExtrapolation": 1,

View File

@@ -467,8 +467,8 @@
},
"_lscale": {
"__type__": "cc.Vec3",
"x": 1.3,
"y": 1.3,
"x": 1.1,
"y": 1.1,
"z": 1
},
"_mobility": 0,
@@ -1493,7 +1493,7 @@
"_contentSize": {
"__type__": "cc.Size",
"width": 576,
"height": 180
"height": 190
},
"_anchorPoint": {
"__type__": "cc.Vec2",

View File

@@ -337,6 +337,7 @@
"__type__": "57aabs7TE1J5obTAZczc+64",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
@@ -346,7 +347,7 @@
},
"atk_x": 0,
"atk_y": 0,
"_id": "a1y6MJDfVD1o+ESVz7sAtv"
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",

View File

@@ -41,13 +41,10 @@
},
{
"__id__": 22
},
{
"__id__": 24
}
],
"_prefab": {
"__id__": 26
"__id__": 24
},
"_lpos": {
"__type__": "cc.Vec3",
@@ -430,40 +427,6 @@
"__type__": "cc.CompPrefabInfo",
"fileId": "60LInmZXxDtKu79AshRG9j"
},
{
"__type__": "f680dkagx9PmbfqtF463/Ua",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
"_enabled": true,
"__prefab": {
"__id__": 21
},
"speed": 600,
"controlPointSide": 1,
"controlPointOffset": 0.5,
"controlPointRandomness": 0.3,
"autoRotate": false,
"showTrajectory": false,
"trajectoryColor": {
"__type__": "cc.Color",
"r": 0,
"g": 255,
"b": 0,
"a": 255
},
"trajectoryWidth": 3,
"easing": "linear",
"rotationSmoothness": 0.6,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "65YLwe9t9EXo5kI3HQEGhs"
},
{
"__type__": "cc.RigidBody2D",
"_name": "",
@@ -474,7 +437,7 @@
},
"_enabled": true,
"__prefab": {
"__id__": 23
"__id__": 21
},
"enabledContactListener": true,
"bullet": false,
@@ -508,7 +471,7 @@
},
"_enabled": true,
"__prefab": {
"__id__": 25
"__id__": 23
},
"tag": 0,
"_group": 1,

View File

@@ -41,13 +41,10 @@
},
{
"__id__": 22
},
{
"__id__": 24
}
],
"_prefab": {
"__id__": 26
"__id__": 24
},
"_lpos": {
"__type__": "cc.Vec3",
@@ -433,40 +430,6 @@
"__type__": "cc.CompPrefabInfo",
"fileId": "60LInmZXxDtKu79AshRG9j"
},
{
"__type__": "f680dkagx9PmbfqtF463/Ua",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
"_enabled": true,
"__prefab": {
"__id__": 21
},
"speed": 600,
"controlPointSide": 1,
"controlPointOffset": 0.5,
"controlPointRandomness": 0.3,
"autoRotate": false,
"showTrajectory": false,
"trajectoryColor": {
"__type__": "cc.Color",
"r": 0,
"g": 255,
"b": 0,
"a": 255
},
"trajectoryWidth": 3,
"easing": "linear",
"rotationSmoothness": 0.6,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "65YLwe9t9EXo5kI3HQEGhs"
},
{
"__type__": "cc.RigidBody2D",
"_name": "",
@@ -477,7 +440,7 @@
},
"_enabled": true,
"__prefab": {
"__id__": 23
"__id__": 21
},
"enabledContactListener": true,
"bullet": false,
@@ -511,7 +474,7 @@
},
"_enabled": true,
"__prefab": {
"__id__": 25
"__id__": 23
},
"tag": 0,
"_group": 1,

View File

@@ -41,13 +41,10 @@
},
{
"__id__": 22
},
{
"__id__": 24
}
],
"_prefab": {
"__id__": 26
"__id__": 24
},
"_lpos": {
"__type__": "cc.Vec3",
@@ -433,40 +430,6 @@
"__type__": "cc.CompPrefabInfo",
"fileId": "60LInmZXxDtKu79AshRG9j"
},
{
"__type__": "f680dkagx9PmbfqtF463/Ua",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
"_enabled": true,
"__prefab": {
"__id__": 21
},
"speed": 600,
"controlPointSide": 1,
"controlPointOffset": 0.5,
"controlPointRandomness": 0.3,
"autoRotate": false,
"showTrajectory": false,
"trajectoryColor": {
"__type__": "cc.Color",
"r": 0,
"g": 255,
"b": 0,
"a": 255
},
"trajectoryWidth": 3,
"easing": "linear",
"rotationSmoothness": 0.6,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "65YLwe9t9EXo5kI3HQEGhs"
},
{
"__type__": "cc.RigidBody2D",
"_name": "",
@@ -477,7 +440,7 @@
},
"_enabled": true,
"__prefab": {
"__id__": 23
"__id__": 21
},
"enabledContactListener": true,
"bullet": false,
@@ -511,7 +474,7 @@
},
"_enabled": true,
"__prefab": {
"__id__": 25
"__id__": 23
},
"tag": 0,
"_group": 1,

View File

@@ -46,19 +46,30 @@ export const getMonList = ()=>{
}
export const HeroPos={
0:{pos:v3(-240,105,0)},
1:{pos:v3(0,105,0)},
2:{pos:v3(0,105,0)},
0:{pos:v3(-240,120,0)},
1:{pos:v3(0,120,0)},
2:{pos:v3(0,120,0)},
}
export const MonSet = {
0:{pos:v3(240,115,0)},
1:{pos:v3(240,95,0)},
2:{pos:v3(320,115,0)},
3:{pos:v3(320,95,0)},
4:{pos:v3(360,115,0)},
5:{pos:v3(360,95,0)},
6:{pos:v3(400,115,0)},
7:{pos:v3(400,95,0)},
0:{pos:v3(240,130,0)},
1:{pos:v3(240,110,0)},
2:{pos:v3(300,130,0)},
3:{pos:v3(300,110,0)},
4:{pos:v3(320,130,0)},
5:{pos:v3(320,110,0)},
6:{pos:v3(360,130,0)},
7:{pos:v3(360,110,0)},
8:{pos:v3(400,130,0)},
9:{pos:v3(400,110,0)},
10:{pos:v3(440,130,0)},
11:{pos:v3(440,110,0)},
}
export enum MonStart {
SLINE_1=130, //上线y
SLINE_2=110, //下线y
START_X=240, //x起始点
START_I=60, //x轴间隔
}
export enum HeroConf{

View File

@@ -25,13 +25,13 @@ export class HInfoComp extends CCComp {
// 英雄位置定义
hero_pos:any={
0:v3(420,-50,0), // 不在屏幕内
1:v3(280,-50,0),
2:v3(160,-50,0),
3:v3(0,-60,0),
4:v3(-160,-50,0),
5:v3(-280,-50,0),
6:v3(-420,-50,0), // 不在屏幕内
0:v3(420,-30,0), // 不在屏幕内
1:v3(280,-30,0),
2:v3(160,-33,0),
3:v3(0,-40,0),
4:v3(-160,-33,0),
5:v3(-280,-30,0),
6:v3(-420,-30,0), // 不在屏幕内
}
// 动画锁定标志:防止快速点击导致的动画冲突

View File

@@ -192,7 +192,7 @@ export class MissionMonCompComp extends CCComp {
let pos: Vec3 = v3(MonSet[i].pos);
// 根据位置判断线路y=110为一线(lane=0)y=80为二线(lane=1)
const lane = pos.y === 110 ? 0 : 1;
const lane = pos.y === 130 ? 0 : 1;
// 递增全局生成顺序 - 🔥 添加溢出保护
this.globalSpawnOrder = (this.globalSpawnOrder + 1) % 999; // 防止无限增长在999处循环重置