都斌大苏打

egret简单的椭圆或圆周运动

public do(){

egret.Tween.get(t, { loop: true }).to({ fa: 180 }, 2000);

}

public get fa(): number {
return -180;
}

public set fa(s) {
let chang = 50;
let duan = 20;//长短一样时就是圆周运动
let xx = chang;
let yy = 0;

this.x = xx + Math.cos(s * Math.PI / 180) * chang;
this.y = yy + Math.sin(s * Math.PI / 180) * duan;
}

posted on 2020-03-13 15:13  都斌大苏打  阅读(559)  评论(0编辑  收藏  举报

导航