wuwangdong %!s(int64=4) %!d(string=hai) anos
pai
achega
3017f0f0ed

+ 0 - 12
assets/resources/animation/Main.meta

@@ -1,12 +0,0 @@
-{
-  "ver": "1.1.2",
-  "uuid": "64032a87-13a2-414a-a91f-a4bed7cc56a9",
-  "isBundle": false,
-  "bundleName": "",
-  "priority": 1,
-  "compressionType": {},
-  "optimizeHotUpdate": {},
-  "inlineSpriteFrames": {},
-  "isRemoteBundle": {},
-  "subMetas": {}
-}

+ 5 - 5
assets/script/game/component/tween/MoveUpAndDown.ts

@@ -18,11 +18,11 @@ export default class MoveUpAndDown extends cc.Component {
         // let pos = cc.Vec3.ZERO;
         // this.startPos.add(this.moveOffset, pos);
     
-        cc.tween(this.node).delay(0.2).call(()=>{
-
-            this.node.position = this.startPos;
-
-        }).by(this.duration, { y: this.moveOffset.y }).by(this.duration, { y: -this.moveOffset.y }, cc.easeSineOut()).union().repeatForever().start();
+        let move1= cc.moveBy(this.duration, cc.v2(this.moveOffset.x, this.moveOffset.y));
+        let move2 = cc.moveBy(this.duration, cc.v2(this.moveOffset.x, -this.moveOffset.y));
+        let seq= cc.sequence([move1, move2]);
+        this.node.runAction(cc.repeatForever(seq));
+        //cc.tween(this.node).by(this.duration, { y: this.moveOffset.y }).by(this.duration, { y: -this.moveOffset.y }, cc.easeSineOut()).union().repeatForever().start();
 
     }
 }