Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
B
babycare_xiaoxiao
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
翁阳
babycare_xiaoxiao
Commits
ba02d389
Commit
ba02d389
authored
Jul 22, 2020
by
wjf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
l
parent
b6293615
Changes
5
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
2203 additions
and
7017 deletions
+2203
-7017
output.js
output.js
+2153
-6921
output.js.map
output.js.map
+1
-1
HorizontalBgAni.ts
src/something/periodAni/HorizontalBgAni.ts
+21
-44
VerticalBgAni.ts
src/something/periodAni/VerticalBgAni.ts
+23
-49
GameToast.ts
src/something/uis/GameToast.ts
+5
-2
No files found.
output.js
View file @
ba02d389
This diff is collapsed.
Click to expand it.
output.js.map
View file @
ba02d389
This diff is collapsed.
Click to expand it.
src/something/periodAni/HorizontalBgAni.ts
View file @
ba02d389
...
...
@@ -20,6 +20,27 @@ export class HorizontalBgAni extends FYGE.Container {
this
.
leftArrow
.
y
=
-
textureL
.
height
/
2
;
this
.
addChild
(
this
.
leftArrow
);
var
textureR
:
FYGE
.
Texture
=
RES
.
getRes
(
"rightArrow.png"
)
this
.
rightArrow
=
new
FYGE
.
Sprite
(
textureR
);
var
oriX
=
50
-
textureR
.
width
;
this
.
rightArrow
.
x
=
oriX
;
this
.
rightArrow
.
y
=
-
textureR
.
height
/
2
this
.
addChild
(
this
.
rightArrow
);
this
.
addTweens
();
}
/**
* 重置
*/
reset
()
{
FYGE
.
Tween
.
removeTweens
(
this
.
leftArrow
);
FYGE
.
Tween
.
removeTweens
(
this
.
rightArrow
);
this
.
addTweens
();
}
private
addTweens
()
{
FYGE
.
Tween
.
get
(
this
.
leftArrow
,
{
loop
:
true
})
.
set
({
alpha
:
1
})
.
wait
(
300
)
...
...
@@ -29,12 +50,7 @@ export class HorizontalBgAni extends FYGE.Container {
.
to
({
x
:
-
50
-
6
},
1000
)
var
textureR
:
FYGE
.
Texture
=
RES
.
getRes
(
"rightArrow.png"
)
this
.
rightArrow
=
new
FYGE
.
Sprite
(
textureR
);
var
oriX
=
50
-
textureR
.
width
;
this
.
rightArrow
.
x
=
oriX
;
this
.
rightArrow
.
y
=
-
textureR
.
height
/
2
this
.
addChild
(
this
.
rightArrow
);
FYGE
.
Tween
.
get
(
this
.
rightArrow
,
{
loop
:
true
})
.
set
({
alpha
:
1
})
.
wait
(
300
)
...
...
@@ -42,44 +58,5 @@ export class HorizontalBgAni extends FYGE.Container {
FYGE
.
Tween
.
get
(
this
.
rightArrow
,
{
loop
:
true
})
.
set
({
x
:
oriX
})
.
to
({
x
:
oriX
+
6
},
1000
)
// this.addEventListener(FYGE.Event.ENTER_FRAME, this.onEnterFrame, this)
}
private
onEnterFrame
()
{
if
(
this
.
count
>=
10
)
{
if
(
this
.
direction
)
{
this
.
leftArrow
.
x
-=
this
.
outSpeed
;
this
.
rightArrow
.
x
+=
this
.
outSpeed
;
}
else
{
this
.
leftArrow
.
x
+=
this
.
inSpeed
;
this
.
rightArrow
.
x
-=
this
.
inSpeed
;
}
if
(
this
.
leftArrow
.
x
<
-
50
)
{
this
.
direction
=
false
;
}
else
if
(
this
.
leftArrow
.
x
>
-
45
)
{
//停住
this
.
count
=
0
this
.
direction
=
true
;
}
}
else
{
this
.
count
++
}
}
/**
* 重置
*/
reset
()
{
// this.showImage.scaleX = this.showImage.scaleY = 0.7;
// this.showImage.alpha = 1;
// this.direction = true;
// this.count = 0;
// var textureL: FYGE.Texture = RES.getRes("leftArrow.png")
// var textureR: FYGE.Texture = RES.getRes("rightArrow.png")
// this.leftArrow.x = -45;
// this.leftArrow.y = -textureL.height / 2;
// this.rightArrow.x = 45 - textureR.width;
// this.rightArrow.y = -textureR.height / 2
}
}
\ No newline at end of file
src/something/periodAni/VerticalBgAni.ts
View file @
ba02d389
...
...
@@ -14,21 +14,12 @@ export class VerticalBgAni extends FYGE.Container {
this
.
mouseEnable
=
false
;
this
.
mouseChildren
=
false
;
var
textureL
:
FYGE
.
Texture
=
RES
.
getRes
(
"leftArrow.png"
)
this
.
upArrow
=
new
FYGE
.
Sprite
(
textureL
);
this
.
upArrow
.
rotation
=
90
;
this
.
upArrow
.
x
=
textureL
.
height
/
2
;
this
.
upArrow
.
y
=
-
50
;
this
.
addChild
(
this
.
upArrow
);
FYGE
.
Tween
.
get
(
this
.
upArrow
,
{
loop
:
true
})
.
set
({
alpha
:
1
})
.
wait
(
300
)
.
to
({
alpha
:
0
},
700
)
FYGE
.
Tween
.
get
(
this
.
upArrow
,
{
loop
:
true
})
.
set
({
y
:
-
50
})
.
to
({
y
:
-
50
-
6
},
1000
)
var
textureR
:
FYGE
.
Texture
=
RES
.
getRes
(
"rightArrow.png"
)
this
.
downArrow
=
new
FYGE
.
Sprite
(
textureR
);
...
...
@@ -38,52 +29,35 @@ export class VerticalBgAni extends FYGE.Container {
this
.
downArrow
.
y
=
oriY
;
this
.
addChild
(
this
.
downArrow
);
FYGE
.
Tween
.
get
(
this
.
downArrow
,
{
loop
:
true
})
.
set
({
alpha
:
1
})
.
wait
(
300
)
.
to
({
alpha
:
0
},
700
)
FYGE
.
Tween
.
get
(
this
.
downArrow
,
{
loop
:
true
})
.
set
({
y
:
oriY
})
.
to
({
y
:
oriY
+
6
},
1000
)
// this.addEventListener(FYGE.Event.ENTER_FRAME, this.onEnterFrame, this)
}
private
onEnterFrame
()
{
if
(
this
.
count
>=
10
)
{
if
(
this
.
direction
)
{
this
.
upArrow
.
y
-=
this
.
outSpeed
;
this
.
downArrow
.
y
+=
this
.
outSpeed
;
}
else
{
this
.
upArrow
.
y
+=
this
.
inSpeed
;
this
.
downArrow
.
y
-=
this
.
inSpeed
;
}
if
(
this
.
upArrow
.
y
<
-
50
)
{
this
.
direction
=
false
;
}
else
if
(
this
.
upArrow
.
y
>
-
45
)
{
//停住
this
.
count
=
0
this
.
direction
=
true
;
}
}
else
{
this
.
count
++
}
this
.
addTweens
()
}
/**
* 重置
*/
reset
()
{
// this.showImage.scaleX = this.showImage.scaleY = 0.7
;
// this.showImage.alpha = 1
;
// this.direction = true
;
// this.count = 0;
FYGE
.
Tween
.
removeTweens
(
this
.
upArrow
)
;
FYGE
.
Tween
.
removeTweens
(
this
.
downArrow
)
;
this
.
addTweens
()
;
}
// var textureL: FYGE.Texture = RES.getRes("leftArrow.png")
// var textureR: FYGE.Texture = RES.getRes("rightArrow.png")
// this.upArrow.x = textureL.width / 2 + 1;
// this.upArrow.y = -45
// this.downArrow.x = textureR.width / 2 + 1;
// this.downArrow.y = 45 - textureR.height;
private
addTweens
()
{
FYGE
.
Tween
.
get
(
this
.
upArrow
,
{
loop
:
true
})
.
set
({
alpha
:
1
})
.
wait
(
300
)
.
to
({
alpha
:
0
},
700
)
FYGE
.
Tween
.
get
(
this
.
upArrow
,
{
loop
:
true
})
.
set
({
y
:
-
50
})
.
to
({
y
:
-
50
-
6
},
1000
)
var
textureR
:
FYGE
.
Texture
=
RES
.
getRes
(
"rightArrow.png"
);
var
oriY
=
50
-
textureR
.
width
;
FYGE
.
Tween
.
get
(
this
.
downArrow
,
{
loop
:
true
})
.
set
({
alpha
:
1
})
.
wait
(
300
)
.
to
({
alpha
:
0
},
700
)
FYGE
.
Tween
.
get
(
this
.
downArrow
,
{
loop
:
true
})
.
set
({
y
:
oriY
})
.
to
({
y
:
oriY
+
6
},
1000
)
}
}
\ No newline at end of file
src/something/uis/GameToast.ts
View file @
ba02d389
...
...
@@ -14,9 +14,12 @@ export class GameToast extends FYGE.Sprite {
FYGE
.
Tween
.
removeTweens
(
this
)
this
.
scaleX
=
0.1
;
this
.
scaleY
=
0.1
;
this
.
alpha
=
1
;
FYGE
.
Tween
.
get
(
this
)
.
to
({
scaleX
:
1
,
scaleY
:
1
},
1
/
3
*
1000
,
FYGE
.
Ease
.
backOut
)
.
wait
(
1
/
3
*
1000
)
.
to
({
scaleX
:
1.1
,
scaleY
:
1.1
},
200
/
2
)
.
to
({
scaleX
:
1
,
scaleY
:
1
},
200
/
2
)
.
wait
(
700
/
2
)
.
to
({
alpha
:
0
},
200
/
2
)
.
call
(()
=>
{
callback
();
})
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment