Commit ec4320e0 authored by zjz1994's avatar zjz1994

动画暂存

parent 87214290
...@@ -7038,7 +7038,7 @@ export default class MainScene extends Scene { ...@@ -7038,7 +7038,7 @@ export default class MainScene extends Scene {
// Pool.recover(RecoverName.FOOD,ifood); // Pool.recover(RecoverName.FOOD,ifood);
// } // }
this.addFreeiceFoodArr(ifoodname,ifood.freeidxs); this.addFreeiceFoodArr(ifoodname,ifood.freeidxs);
console.log("食物自由了,消除上面的动物,播放食物自由动画"); // console.log("食物自由了,消除上面的动物,播放食物自由动画");
//食物动效播完,进行食物的通关目标完成 //食物动效播完,进行食物的通关目标完成
// this.goElementTarget(ifood.type,[ifood.x,ifood.y]); // this.goElementTarget(ifood.type,[ifood.x,ifood.y]);
...@@ -7165,7 +7165,7 @@ export default class MainScene extends Scene { ...@@ -7165,7 +7165,7 @@ export default class MainScene extends Scene {
} }
//食物通关目标动画1段 //食物通关目标动画1段
playElfoodAni1(type: ElementType, fromP: number[]){ playElfoodAni1(type: ElementType, fromP: number[]){
console.log("食物动画一段",type); // console.log("食物动画一段",type);
if(this.passElements[type]!=undefined){ if(this.passElements[type]!=undefined){
if(this.passElements[type]!=0){ if(this.passElements[type]!=0){
this.passElements[type]--; this.passElements[type]--;
...@@ -7212,7 +7212,7 @@ export default class MainScene extends Scene { ...@@ -7212,7 +7212,7 @@ export default class MainScene extends Scene {
}else if(time1>500){ }else if(time1>500){
time1 = 500; time1 = 500;
} }
console.log("位移时间",time1); // console.log("位移时间",time1);
foodani1.setData(mv,p1,p2,p3,this,this.playElfoodAni2,type,1,"ani1",time1); foodani1.setData(mv,p1,p2,p3,this,this.playElfoodAni2,type,1,"ani1",time1);
...@@ -7222,7 +7222,7 @@ export default class MainScene extends Scene { ...@@ -7222,7 +7222,7 @@ export default class MainScene extends Scene {
//食物通关目标动画2段 //食物通关目标动画2段
async playElfoodAni2(mv:any,type:ElementType,mainscene:MainScene){ async playElfoodAni2(mv:any,type:ElementType,mainscene:MainScene){
console.log("食物动画二段",type); // console.log("食物动画二段",type);
var pro = new Promise(resolve=>{ var pro = new Promise(resolve=>{
let compfunc = function(e){ let compfunc = function(e){
...@@ -7234,7 +7234,7 @@ export default class MainScene extends Scene { ...@@ -7234,7 +7234,7 @@ export default class MainScene extends Scene {
mv.gotoAndPlay(1,1); mv.gotoAndPlay(1,1);
}) })
await pro; await pro;
console.log("二段播放完毕,开始第三段"); // console.log("二段播放完毕,开始第三段");
var foodani2 = new foodAni(); var foodani2 = new foodAni();
var p1 = new egret.Point(mv.x,mv.y); var p1 = new egret.Point(mv.x,mv.y);
...@@ -7284,7 +7284,7 @@ export default class MainScene extends Scene { ...@@ -7284,7 +7284,7 @@ export default class MainScene extends Scene {
}else if(time1>500){ }else if(time1>500){
time1 = 500; time1 = 500;
} }
console.log("位移时间",time1); // console.log("位移时间",time1);
foodani2.setData(mv,p1,p2,p3,mainscene,mainscene.playElfoodAni3,type,tscale,"ani2",time1); foodani2.setData(mv,p1,p2,p3,mainscene,mainscene.playElfoodAni3,type,tscale,"ani2",time1);
} }
//食物通关目标动画3段 //食物通关目标动画3段
...@@ -7294,7 +7294,7 @@ export default class MainScene extends Scene { ...@@ -7294,7 +7294,7 @@ export default class MainScene extends Scene {
if(mv&&mv.parent){ if(mv&&mv.parent){
mv.parent.removeChild(mv); mv.parent.removeChild(mv);
} }
console.log(mainscene.elementTargets.targets[type]); // console.log(mainscene.elementTargets.targets[type]);
mainscene.inaniFood = false; mainscene.inaniFood = false;
mainscene.eliminate(); mainscene.eliminate();
} }
......
...@@ -48,8 +48,8 @@ export default class foodAni{ ...@@ -48,8 +48,8 @@ export default class foodAni{
}); });
if(aniname=="ani1"){ if(aniname=="ani1"){
var stime1 = Math.floor(time1/4); var stime1 = Math.floor(time1/4);
egret.Tween.get(mv).to({ scaleX: 0.9, scaleY: 1.1 }, stime1*2, egret.Ease.sineIn).call(() => { egret.Tween.get(mv).to({ scaleX: 1, scaleY: 0.9 }, stime1, egret.Ease.sineIn).call(() => {
egret.Tween.get(mv).to({ scaleX: 1, scaleY: 1 }, stime1*2, egret.Ease.sineIn).call(() => { egret.Tween.get(mv).to({ scaleX: 1, scaleY: 1 }, stime1*3, egret.Ease.sineIn).call(() => {
// egret.Tween.get(mv).to({ // egret.Tween.get(mv).to({
// scaleX: 0.9618, // scaleX: 0.9618,
// scaleY: 1.0618 // scaleY: 1.0618
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment