egret基础-tween动画
使用方法1,默认方式
//imgNode 想要执行tween动画的节点
var obj = egret.Tween.get(imgNode)
// 消耗250毫秒,使y轴运动到1000,消耗500毫秒,使y轴运动到120,消耗500毫秒,使y轴运动到321,运动结束后调用cal=>通常指向我们自定义的函数
obj.to({ y:1000 },250).to({ y : 120 }, 500).to({ x: 321, y:571.67},500).call(()=>{
this.tweenFinished()
})
private tweenFinished(){
//xxxxxx ——tween动画队列结束后会调用这个函数内的方法
}
使用方法2-循环应用
var tw = egret.Tween.get( node, { loop:true} );
使用方法3-缓动对象的缓动变化事件
比如游戏中有猎物在做一个Tween运动过程中,猎人的枪口要实时瞄准,那么就需要在Tween的变化过程随时计算,修正猎人枪口的角度。
var obj = { x:0 };
var funcChange = function():void{
console.log( this.x );
}
egret.Tween.get( obj, { onChange:funcChange, onChangeObj:obj } )
.to( {x:600}, 1000 , egret.Ease.backInOut );
随着obj对象的运动 funcChange函数也会进行改变
使用方法4-多个缓动使用
“`js
var shp:egret.Shape = new egret.Shape();
shp.graphics.beginFill( 0x00ff00 );
shp.graphics.drawRect( 0, 0, 100, 100 );
shp.graphics.endFill();
shp.x = 50;
shp.y = 50;
this.addChild( shp );
var tw = egret.Tween.get( shp, { loop:true} );
tw.to( {x:250}, 500 ).call( function(){ console.log( “右上角” ) } ).wait( 100 )
.to( {y:250}, 500 ).call( function(){ console.log( “右下角” ) } ).wait( 100 )
.to( {x:50}, 500 ).call( function(){ console.log( “左下角” ) } ).wait( 100 )
.to( {y:50}, 500 ).call( function(){ console.log( “左上角” ) } ).wait( 100 );
“`
Hey said Joan priligy tablets online
1, 2 However, approximately 40 of ER О±66 positive tumors fail to respond to tamoxifen therapy at diagnosis priligy amazon uk Oncotype DX Genomics Testing
He knows you don t have to choose between your wealth and your health you can have both can i order generic cytotec without a prescription
Every economic evaluation is reliant on good quality clinical effectiveness data order cheap cytotec for sale
best type of steroids
References:
elearnportal.science
References:
How to get testosterone legally
References:
https://alnashraaldawlia.com/2018/12/10/%d8%ac%d8%a7%d9%83%d9%8a-%d8%b4%d8%a7%d9%86-%d9%8a%d9%83%d8%b4%d9%81-%d8%b1%d8%af%d8%a9-%d9%81%d8%b9%d9%84-%d8%b2%d9%88%d8%ac%d8%aa%d9%87-%d8%a8%d8%ae%d9%8a%d8%a7%d9%86%d8%aa%d9%87%d8%a7-%d9%85%d8%b9/
References:
Videopoker com
References:
https://graph.org/Woo-Casino-Mastering-Your-Game-Strategy-04-20
References:
Silverton casino las vegas
References:
https://online-casino-ohne-einzahlung-echtgeld-bonus.online-spielhallen.de/
References:
Dortmund
References:
https://bally-s-las-vegas-hotel-casino.online-spielhallen.de/
References:
Darmstadt
References:
https://aida-nova-casino.online-spielhallen.de/
References:
Northern lights casino walker mn violakijz136470.iyublog.com
References:
Blackjack com https://platform.joinus4health.eu/forums/users/expertday59/
References:
One armed bandit https://joshiucm311448.ka-blogs.com/
References:
The star casino sydney eskisehiruroloji.com
References:
Mansion casino liliancbbz843004.blogvivi.com
References:
Roulette for fun https://shitdhebli.com/user/profile/33381
References:
Euroking casino https://chumba-casino.online-spielhallen.de/