动画位置完善

This commit is contained in:
2025-08-01 23:54:20 +08:00
parent 6e948020ef
commit fef5480322
2 changed files with 5 additions and 5 deletions

View File

@@ -93011,7 +93011,7 @@
} }
], ],
"_interactable": true, "_interactable": true,
"_transition": 0, "_transition": 3,
"_normalColor": { "_normalColor": {
"__type__": "cc.Color", "__type__": "cc.Color",
"r": 255, "r": 255,

View File

@@ -1,4 +1,4 @@
import { _decorator,Button,EventHandler,EventTouch,Label,NodeEventType,resources,Sprite,SpriteAtlas,tween,UITransform,v3, Vec3,Animation, UI, instantiate, Prefab } from "cc"; import { _decorator,Button,EventHandler,EventTouch,Label,NodeEventType,resources,Sprite,SpriteAtlas,tween,UITransform,v3, Vec3,Animation, UI, instantiate, Prefab, screen } from "cc";
import { ecs } from "../../../../extensions/oops-plugin-framework/assets/libs/ecs/ECS"; import { ecs } from "../../../../extensions/oops-plugin-framework/assets/libs/ecs/ECS";
import { CCComp } from "../../../../extensions/oops-plugin-framework/assets/module/common/CCComp"; import { CCComp } from "../../../../extensions/oops-plugin-framework/assets/module/common/CCComp";
import { smc } from "../common/SingletonModuleComp"; import { smc } from "../common/SingletonModuleComp";
@@ -303,10 +303,10 @@ export class MissionComp extends CCComp {
node.setScale(0,0,0) node.setScale(0,0,0)
node.parent = this.node node.parent = this.node
node.setPosition(v3(this.node.getChildByName("luckybox").position.x,this.node.getChildByName("luckybox").position.y)); node.setPosition(v3(this.node.getChildByName("luckybox").position.x,this.node.getChildByName("luckybox").position.y));
let height=this.node.getComponent(UITransform).height
tween(node) .to(0.5, { tween(node) .to(0.5, {
scale: v3(1,1,1), scale: v3(1,1,1),
position: v3(0,this.node.getChildByName("luckybox").position.y+200), position: v3(0, height-300),
}, {easing:"backOut"}) }, {easing:"backOut"})
.start(); .start();
} }