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AAG,IAAI,CAAC,OAAO,CAAC;YAC/B,CAAC,CAAC,CAAA;YACF,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,CAAC,aAAa,CAAC,EAAE,CAAC,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC;QACtE,CAAC;QAED,SAAS;YACL,IAAI,CAAC,IAAI,CAAC,cAAc,EAAE,CAAC;YAC3B,IAAI,CAAC,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC,OAAO,CAAC;YAC3B,IAAI,CAAC,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC,OAAO,CAAC;QAC/B,CAAC;QAID,MAAM,CAAC,EAAE,IAAI,CAAC;KACjB,CAAA;IAxCG;QADC,QAAQ;mDACS;IAElB;QADC,QAAQ;qDACW;IAEpB;QADC,QAAQ;qDACW;IAEpB;QADC,QAAQ;sDACY;IAErB;QADC,QAAQ;sDACY;IAXJ,gBAAgB;QADpC,OAAO;OACa,gBAAgB,CA2CpC;IAAD,uBAAC;KAAA;kBA3CoB,gBAAgB","file":"","sourceRoot":"/","sourcesContent":["\nconst { ccclass, property } = cc._decorator;\n\n@ccclass\nexport default class MoveRepeatAction extends cc.Component {\n\n @property\n speed: number = 1;\n @property\n srcPosX: number = 0;\n @property\n srcPosY: number = 0;\n @property\n tempPosX: number = 0;\n @property\n tempPosY: number = 0;\n\n private readonly _baseTime: number = 1;\n\n onLoad() { }\n\n start() {\n\n }\n\n onEnable() {\n let actTime: number = this._baseTime / this.speed;\n let ease = cc.easeSineInOut();\n let tempAct = cc.moveTo(actTime, cc.v2(this.tempPosX, this.tempPosY)).easing(ease);\n let srcAct = cc.moveTo(actTime, cc.v2(this.srcPosX, this.srcPosY)).easing(ease);\n this.node.stopAllActions();\n let call = cc.callFunc(() => {\n this.node.x = this.srcPosX;\n this.node.y = this.srcPosY;\n })\n this.node.runAction(cc.repeatForever(cc.sequence(call, tempAct)));\n }\n\n onDisable() {\n this.node.stopAllActions();\n this.node.x = this.srcPosX;\n this.node.y = this.srcPosY;\n }\n\n\n\n update(dt) { }\n}\n"]}