Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
game2048
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
熊东起
game2048
Commits
0e661a45
Commit
0e661a45
authored
May 09, 2020
by
huangwenjie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更新动效
parent
421effc1
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
11 deletions
+23
-11
close.png
resource/playScene/close.png
+0
-0
res.json
resource/res.json
+1
-1
PlayScene.ts
src/scenes/playScene/PlayScene.ts
+22
-10
No files found.
resource/playScene/close.png
0 → 100644
View file @
0e661a45
1.5 KB
resource/res.json
View file @
0e661a45
...
...
@@ -9,7 +9,7 @@
"name"
:
"gameOverPanel"
},
{
"keys"
:
"bomb(1).png,bomb(10).png,bomb(11).png,bomb(12).png,bomb(13).png,bomb(14).png,bomb(15).png,bomb(16).png,bomb(17).png,bomb(18).png,bomb(19).png,bomb(2).png,bomb(20).png,bomb(3).png,bomb(4).png,bomb(5).png,bomb(6).png,bomb(7).png,bomb(8).png,bomb(9).png,bomb.mp3,bombBtn.png,bombTips.png,create1024.svga,create128.svga,create16.svga,create2048.svga,create256.svga,create32.svga,create4.svga,create512.svga,create64.svga,create8.svga,createEle.mp3,createEles.mp3,doFilterBtn.png,ele1024.png,ele128.png,ele16.png,ele2.png,ele2048.png,ele256.png,ele32.png,ele4.png,ele512.png,ele64.png,ele8.png,exchange.mp3,exchangeBtn.png,exchangeTips.png,filterBtn.png,filterTips.png,filting (1).png,filting (10).png,filting (11).png,filting (12).png,filting (13).png,filting (14).png,filting (15).png,filting (16).png,filting (17).png,filting (2).png,filting (3).png,filting (4).png,filting (5).png,filting (6).png,filting (7).png,filting (8).png,filting (9).png,focusTips.png,gameOver.mp3,goBackBtn.png,guideArrow.png,guideFinger.png,move.mp3,musicOff.png,musicOn.png,playBg.png,propBottom.png"
,
"keys"
:
"bomb(1).png,bomb(10).png,bomb(11).png,bomb(12).png,bomb(13).png,bomb(14).png,bomb(15).png,bomb(16).png,bomb(17).png,bomb(18).png,bomb(19).png,bomb(2).png,bomb(20).png,bomb(3).png,bomb(4).png,bomb(5).png,bomb(6).png,bomb(7).png,bomb(8).png,bomb(9).png,bomb.mp3,bombBtn.png,bombTips.png,c
lose.png,c
reate1024.svga,create128.svga,create16.svga,create2048.svga,create256.svga,create32.svga,create4.svga,create512.svga,create64.svga,create8.svga,createEle.mp3,createEles.mp3,doFilterBtn.png,ele1024.png,ele128.png,ele16.png,ele2.png,ele2048.png,ele256.png,ele32.png,ele4.png,ele512.png,ele64.png,ele8.png,exchange.mp3,exchangeBtn.png,exchangeTips.png,filterBtn.png,filterTips.png,filting (1).png,filting (10).png,filting (11).png,filting (12).png,filting (13).png,filting (14).png,filting (15).png,filting (16).png,filting (17).png,filting (2).png,filting (3).png,filting (4).png,filting (5).png,filting (6).png,filting (7).png,filting (8).png,filting (9).png,focusTips.png,gameOver.mp3,goBackBtn.png,guideArrow.png,guideFinger.png,move.mp3,musicOff.png,musicOn.png,playBg.png,propBottom.png"
,
"name"
:
"playScene"
},
{
...
...
src/scenes/playScene/PlayScene.ts
View file @
0e661a45
...
...
@@ -390,6 +390,10 @@ export class PlayScene extends Scene {
this
.
exchangeMask
.
endFill
();
this
.
addChild
(
this
.
exchangeMask
)
let
close
=
new
Sprite
(
RES
.
getRes
(
"close.png"
))
close
.
x
=
600
close
.
y
=
500
this
.
exchangeMask
.
addChild
(
close
)
let
tips
=
new
Sprite
(
RES
.
getRes
(
"exchangeTips.png"
))
tips
.
x
=
140
...
...
@@ -559,6 +563,10 @@ export class PlayScene extends Scene {
this
.
bombMask
.
endFill
();
this
.
addChild
(
this
.
bombMask
)
let
close
=
new
Sprite
(
RES
.
getRes
(
"close.png"
))
close
.
x
=
600
close
.
y
=
500
this
.
bombMask
.
addChild
(
close
)
let
tips
=
new
Sprite
(
RES
.
getRes
(
"bombTips.png"
))
tips
.
x
=
280
...
...
@@ -608,7 +616,7 @@ export class PlayScene extends Scene {
let
showImage
=
new
FrameAni
(
arr
);
showImage
.
x
=
this
.
containerPool
[
x
][
y
].
x
+
60
showImage
.
y
=
this
.
containerPool
[
x
][
y
].
y
+
60
showImage
.
scale
.
set
(
0.
5
,
0.5
)
showImage
.
scale
.
set
(
0.
8
,
0.8
)
this
.
addChild
(
showImage
);
showImage
.
play
()
...
...
@@ -656,6 +664,10 @@ export class PlayScene extends Scene {
this
.
filterMask
.
endFill
();
this
.
addChild
(
this
.
filterMask
)
let
close
=
new
Sprite
(
RES
.
getRes
(
"close.png"
))
close
.
x
=
600
close
.
y
=
500
this
.
filterMask
.
addChild
(
close
)
let
tips
=
new
Sprite
(
RES
.
getRes
(
"filterTips.png"
))
tips
.
x
=
360
...
...
@@ -1375,7 +1387,7 @@ export class PlayScene extends Scene {
let
targetx
=
this
.
containerPool
[
x
][
y
].
x
+
ox
let
targety
=
this
.
containerPool
[
x
][
y
].
y
+
oy
Tween
.
get
(
origin
)
.
to
({
x
:
targetx
,
y
:
targety
},
20
0
)
.
to
({
x
:
targetx
,
y
:
targety
},
15
0
)
.
call
(()
=>
{
this
.
removeChild
(
origin
)
})
...
...
@@ -1393,7 +1405,7 @@ export class PlayScene extends Scene {
let
targetx
=
this
.
containerPool
[
x
][
y
].
x
+
ox
let
targety
=
this
.
containerPool
[
x
][
y
].
y
+
oy
Tween
.
get
(
origin
)
.
to
({
x
:
targetx
,
y
:
targety
},
20
0
)
.
to
({
x
:
targetx
,
y
:
targety
},
15
0
)
.
call
(()
=>
{
this
.
removeChild
(
origin
)
})
...
...
@@ -1422,7 +1434,7 @@ export class PlayScene extends Scene {
let
targetx
=
this
.
containerPool
[
x
][
y
].
x
+
ox
let
targety
=
this
.
containerPool
[
x
][
y
].
y
+
oy
Tween
.
get
(
origin
)
.
to
({
x
:
targetx
,
y
:
targety
},
20
0
)
.
to
({
x
:
targetx
,
y
:
targety
},
15
0
)
.
call
(()
=>
{
this
.
removeChild
(
origin
)
})
...
...
@@ -1440,7 +1452,7 @@ export class PlayScene extends Scene {
let
targetx
=
this
.
containerPool
[
x
][
y
].
x
+
ox
let
targety
=
this
.
containerPool
[
x
][
y
].
y
+
oy
Tween
.
get
(
origin
)
.
to
({
x
:
targetx
,
y
:
targety
},
20
0
)
.
to
({
x
:
targetx
,
y
:
targety
},
15
0
)
.
call
(()
=>
{
this
.
removeChild
(
origin
)
})
...
...
@@ -1469,7 +1481,7 @@ export class PlayScene extends Scene {
let
targetx
=
this
.
containerPool
[
x
][
y
].
x
+
ox
let
targety
=
this
.
containerPool
[
x
][
y
].
y
+
oy
Tween
.
get
(
origin
)
.
to
({
x
:
targetx
,
y
:
targety
},
20
0
)
.
to
({
x
:
targetx
,
y
:
targety
},
15
0
)
.
call
(()
=>
{
this
.
removeChild
(
origin
)
})
...
...
@@ -1487,7 +1499,7 @@ export class PlayScene extends Scene {
let
targetx
=
this
.
containerPool
[
x
][
y
].
x
+
ox
let
targety
=
this
.
containerPool
[
x
][
y
].
y
+
oy
Tween
.
get
(
origin
)
.
to
({
x
:
targetx
,
y
:
targety
},
20
0
)
.
to
({
x
:
targetx
,
y
:
targety
},
15
0
)
.
call
(()
=>
{
this
.
removeChild
(
origin
)
})
...
...
@@ -1516,7 +1528,7 @@ export class PlayScene extends Scene {
let
targetx
=
this
.
containerPool
[
x
][
y
].
x
+
ox
let
targety
=
this
.
containerPool
[
x
][
y
].
y
+
oy
Tween
.
get
(
origin
)
.
to
({
x
:
targetx
,
y
:
targety
},
20
0
)
.
to
({
x
:
targetx
,
y
:
targety
},
15
0
)
.
call
(()
=>
{
this
.
removeChild
(
origin
)
})
...
...
@@ -1534,7 +1546,7 @@ export class PlayScene extends Scene {
let
targetx
=
this
.
containerPool
[
x
][
y
].
x
+
ox
let
targety
=
this
.
containerPool
[
x
][
y
].
y
+
oy
Tween
.
get
(
origin
)
.
to
({
x
:
targetx
,
y
:
targety
},
20
0
)
.
to
({
x
:
targetx
,
y
:
targety
},
15
0
)
.
call
(()
=>
{
this
.
removeChild
(
origin
)
})
...
...
@@ -1550,7 +1562,7 @@ export class PlayScene extends Scene {
}
setTimeout
(()
=>
{
r
()
},
20
0
);
},
12
0
);
})
}
...
...
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