const { ccclass, property } = cc._decorator;

@ccclass
export default class NewClass extends cc.Component {
  defaultX: number;
  defaultY: number;
  start() {
    this.defaultX = this.node.x;
    this.defaultY = this.node.y;

    cc.tween(this.node)
      .by(5, { y: -70 })
      .by(5, { y: 70 })
      .union()
      .repeatForever()
      .start();
  }
}
