woso_javan 3 miesięcy temu
rodzic
commit
1f39507e22

+ 3 - 3
assets/module_take_goblet/Script/Component/TempCups.ts

@@ -37,11 +37,11 @@ export class TempCups extends Component {
                 // 保存原始位置
                 const originalPos = cup.node.position.clone();
                 const screenWidth = view.getVisibleSize().width;
-                const targetX = -screenWidth / 2 - cup.node.getComponent(UITransform)!.width * 1.5;
-                const targetY = cup.node.position.y + Math.random() * 100;
+                const targetX = -screenWidth - cup.node.getComponent(UITransform)!.width * 1.5;
+                const targetY = cup.node.position.y + Math.random() * 300;
                 // 创建移动动画
                 tween(cup.node)
-                    .to(0.5, { position: new Vec3(targetX, targetY, 0) }, { easing: 'sineOut' })
+                    .to(0.5, { position: new Vec3(targetX, targetY, 0) }, { easing: 'sineIn' })
                     .call(() => {
                         cup.node.position = originalPos; // 将位置重置到动画前保存的原始位置
                         cup.reset(); // 重置水杯状态