Commit cf502021 authored by wjf's avatar wjf

l

parent 7f560292
......@@ -180,28 +180,28 @@ const status3Cfg = [
{
"name": "fesRedUp",
"x": 0,
"y": 817 - 765,
"y": 52,
"width": 237,
"height": 185
},
{
"name": "tinyRedMid",
"x": 770 - 684,
"y": 825 - 765,
"x": 86,
"y": 60,
"width": 74,
"height": 90
},
{
"name": "tinyRedLeft",
"x": 706 - 684,
"y": 770 - 765,
"x": 22,
"y": 5,
"width": 116,
"height": 132
},
{
"name": "tinyRedRight",
"x": 807 - 684,
"y": 779 - 765,
"x": 123,
"y": 14,
"width": 89,
"height": 106
},
......@@ -237,6 +237,57 @@ class Status3 extends egret.DisplayObjectContainer {
}
reset() {
egret.Tween.removeTweens(this.leftRed);
egret.Tween.removeTweens(this.rightRed);
egret.Tween.removeTweens(this.midRed);
var offset = 237 / 2
//动画出来,然后循环
this.leftRed.x = 22 + 40 - offset;
this.leftRed.y = 5 + 100 - offset;
egret.Tween.get(this.leftRed)
.to({ x: 22 - 3 - offset, y: 5 - 8 - offset }, 150)
.to({ x: 22 - offset, y: 5 - offset }, 50)
this.rightRed.x = 123 - 7 - offset;
this.rightRed.y = 14 + 100 - offset;
egret.Tween.get(this.rightRed)
.to({ x: 123 + 3 - offset, y: 14 - 8 - offset }, 150)
.to({ x: 123 - offset, y: 14 - offset }, 50)
this.midRed.x = 86 - 7 - offset;
this.midRed.y = 60 + 80 - offset;
egret.Tween.get(this.midRed)
.to({ x: 86 + 3 - offset, y: 60 - 8 - offset }, 150)
.to({ x: 86 - offset, y: 60 - offset }, 50)
.call(() => {
//循环动画
this.leftRed.x = 22 - offset;
this.leftRed.y = 5 - offset;
egret.Tween.get(this.leftRed, { loop: true })
.to({ x: 22 + 2 - offset, y: 5 + 5 - offset }, 150)
.to({ x: 22 - 6 - offset, y: 5 - 14 - offset }, 150)
.to({ x: 22 - offset, y: 5 - offset }, 100)
.wait(500);
this.rightRed.x = 123 - offset;
this.rightRed.y = 14 - offset;
egret.Tween.get(this.rightRed, { loop: true })
.to({ x: 123 - 2 - offset, y: 14 + 5 - offset }, 150)
.to({ x: 123 + 6 - offset, y: 14 - 14 - offset }, 150)
.to({ x: 123 - offset, y: 14 - offset }, 100)
.wait(500);
this.midRed.x = 86 - offset;
this.midRed.y = 60 - offset;
egret.Tween.get(this.midRed, { loop: true })
.to({ x: 86 - 2 - offset, y: 60 + 5 - offset }, 150)
.to({ x: 86 + 6 - offset, y: 60 - 14 - offset }, 150)
.to({ x: 86 - offset, y: 60 - offset }, 100)
.wait(500);
})
......
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