Commit 187043e0 authored by 王勇霞's avatar 王勇霞

游戏改造

parent 182fe4dc
......@@ -5,13 +5,15 @@
"dataInfo": [
{
"num": 1,
"context": "闲看云",
"context": "",
"context1": "闲看云",
"ifComplete": false,
"count": 74413176.81524068
},
{
"num": 2,
"context": "卷",
"context1": "",
"ifComplete": false,
"count": 10
},
......@@ -35,7 +37,7 @@
}
],
"collectCount": 1,
"ifFirstPlay": true
"ifFirstPlay": false
},
"code": "ipsum est tempor qui",
"timestamp": 3627649.9094133973
......
......@@ -40,7 +40,7 @@
}
},
{
"keys": "cdbg.png,cloud.png,cloud2.png,controlpeo.png,gamebg.jpg,num_0.png,num_1.png,num_2.png,num_3.png,num_4.png,num_5.png,num_6.png,num_7.png,num_8.png,num_9.png,num_s.png,reset.png,word_云.png,word_休.png,word_卷.png,word_在.png,word_心.png,word_意.png,word_无.png,word_晴.png,word_水.png,word_流.png,word_深.png,word_看.png,word_自.png,word_舒.png,word_闲.png,word_静.png",
"keys": "cdbg.png,cloud.png,cloud2.png,controlpeo.png,gamebg.jpg,num_0.png,num_1.png,num_2.png,num_3.png,num_4.png,num_5.png,num_6.png,num_7.png,num_8.png,num_9.png,num_s.png,reset.png,word_云.png,word_休.png,word_卷.png,word_在.png,word_心.png,word_意.png,word_无.png,word_晴.png,word_水.png,word_流.png,word_深.png,word_看.png,word_自.png,word_舒.png,word_闲.png,word_静.png,点我按钮.png",
"name": "GameScene",
"atlas": {
"cloud2.png": {
......@@ -76,53 +76,64 @@
"sh": 196,
"ro": true
},
"reset.png": {
"点我按钮.png": {
"x": 354,
"y": 226,
"w": 153,
"h": 157,
"ox": 0,
"oy": 0,
"sw": 153,
"sh": 157,
"ro": true
},
"reset.png": {
"x": 309,
"y": 381,
"w": 138,
"h": 62,
"ox": 0,
"oy": 0,
"sw": 138,
"sh": 62,
"ro": false
"ro": true
},
"cdbg.png": {
"x": 309,
"y": 290,
"x": 373,
"y": 381,
"w": 124,
"h": 123,
"ox": 0,
"oy": 0,
"sw": 124,
"sh": 123,
"ro": false
"ro": true
},
"word_云.png": {
"x": 435,
"y": 290,
"x": 2,
"y": 534,
"w": 112,
"h": 119,
"ox": 0,
"oy": 0,
"sw": 112,
"sh": 119,
"ro": false
"ro": true
},
"word_休.png": {
"x": 435,
"y": 411,
"x": 123,
"y": 534,
"w": 112,
"h": 119,
"ox": 0,
"oy": 0,
"sw": 112,
"sh": 119,
"ro": false
"ro": true
},
"word_卷.png": {
"x": 309,
"y": 415,
"x": 244,
"y": 534,
"w": 112,
"h": 119,
"ox": 0,
......@@ -132,52 +143,52 @@
"ro": true
},
"word_在.png": {
"x": 2,
"y": 534,
"x": 365,
"y": 521,
"w": 112,
"h": 119,
"ox": 0,
"oy": 0,
"sw": 112,
"sh": 119,
"ro": true
"ro": false
},
"word_心.png": {
"x": 123,
"y": 534,
"x": 552,
"y": 2,
"w": 112,
"h": 119,
"ox": 0,
"oy": 0,
"sw": 112,
"sh": 119,
"ro": true
"ro": false
},
"word_意.png": {
"x": 244,
"y": 534,
"x": 552,
"y": 123,
"w": 112,
"h": 119,
"ox": 0,
"oy": 0,
"sw": 112,
"sh": 119,
"ro": true
"ro": false
},
"word_无.png": {
"x": 365,
"y": 532,
"x": 479,
"y": 507,
"w": 112,
"h": 119,
"ox": 0,
"oy": 0,
"sw": 112,
"sh": 119,
"ro": true
"ro": false
},
"word_晴.png": {
"x": 552,
"y": 2,
"x": 498,
"y": 381,
"w": 112,
"h": 119,
"ox": 0,
......@@ -187,8 +198,8 @@
"ro": false
},
"word_水.png": {
"x": 552,
"y": 123,
"x": 513,
"y": 244,
"w": 112,
"h": 119,
"ox": 0,
......@@ -198,8 +209,8 @@
"ro": false
},
"word_流.png": {
"x": 486,
"y": 532,
"x": 2,
"y": 648,
"w": 112,
"h": 119,
"ox": 0,
......@@ -209,30 +220,30 @@
"ro": true
},
"word_深.png": {
"x": 549,
"y": 244,
"x": 123,
"y": 648,
"w": 112,
"h": 119,
"ox": 0,
"oy": 0,
"sw": 112,
"sh": 119,
"ro": false
"ro": true
},
"word_看.png": {
"x": 549,
"y": 365,
"x": 244,
"y": 648,
"w": 112,
"h": 119,
"ox": 0,
"oy": 0,
"sw": 112,
"sh": 119,
"ro": false
"ro": true
},
"word_自.png": {
"x": 2,
"y": 648,
"x": 365,
"y": 642,
"w": 112,
"h": 119,
"ox": 0,
......@@ -242,63 +253,63 @@
"ro": true
},
"word_舒.png": {
"x": 123,
"y": 648,
"x": 486,
"y": 628,
"w": 112,
"h": 119,
"ox": 0,
"oy": 0,
"sw": 112,
"sh": 119,
"ro": true
"ro": false
},
"word_闲.png": {
"x": 244,
"y": 648,
"x": 666,
"y": 2,
"w": 112,
"h": 119,
"ox": 0,
"oy": 0,
"sw": 112,
"sh": 119,
"ro": true
"ro": false
},
"word_静.png": {
"x": 365,
"y": 646,
"x": 666,
"y": 123,
"w": 112,
"h": 119,
"ox": 0,
"oy": 0,
"sw": 112,
"sh": 119,
"ro": true
"ro": false
},
"num_3.png": {
"x": 494,
"y": 226,
"x": 309,
"y": 244,
"w": 25,
"h": 46,
"ox": 2,
"oy": 2,
"sw": 30,
"sh": 50,
"ro": true
"ro": false
},
"num_7.png": {
"x": 494,
"y": 253,
"x": 309,
"y": 292,
"w": 25,
"h": 46,
"ox": 2,
"oy": 2,
"sw": 30,
"sh": 50,
"ro": true
"ro": false
},
"num_1.png": {
"x": 607,
"y": 486,
"x": 309,
"y": 521,
"w": 10,
"h": 45,
"ox": 10,
......@@ -308,19 +319,19 @@
"ro": true
},
"num_9.png": {
"x": 549,
"y": 498,
"x": 593,
"y": 502,
"w": 27,
"h": 45,
"ox": 2,
"oy": 3,
"sw": 30,
"sh": 50,
"ro": true
"ro": false
},
"num_0.png": {
"x": 309,
"y": 244,
"x": 593,
"y": 549,
"w": 31,
"h": 44,
"ox": 0,
......@@ -330,8 +341,8 @@
"ro": false
},
"num_2.png": {
"x": 596,
"y": 498,
"x": 593,
"y": 595,
"w": 31,
"h": 44,
"ox": 0,
......@@ -341,30 +352,30 @@
"ro": true
},
"num_4.png": {
"x": 607,
"y": 531,
"x": 600,
"y": 628,
"w": 30,
"h": 44,
"ox": 0,
"oy": 3,
"sw": 30,
"sh": 50,
"ro": true
"ro": false
},
"num_5.png": {
"x": 607,
"y": 563,
"x": 600,
"y": 674,
"w": 30,
"h": 44,
"ox": 0,
"oy": 3,
"sw": 30,
"sh": 50,
"ro": true
"ro": false
},
"num_6.png": {
"x": 607,
"y": 595,
"x": 600,
"y": 720,
"w": 28,
"h": 44,
"ox": 1,
......@@ -374,19 +385,19 @@
"ro": true
},
"num_8.png": {
"x": 607,
"y": 625,
"x": 632,
"y": 628,
"w": 26,
"h": 44,
"ox": 2,
"oy": 3,
"sw": 30,
"sh": 50,
"ro": true
"ro": false
},
"num_s.png": {
"x": 642,
"y": 498,
"x": 309,
"y": 340,
"w": 22,
"h": 27,
"ox": 4,
......@@ -401,30 +412,19 @@
"keys": "guide.png,step1_img.png,step1_tips.png,step2_img.png,step2_tips.png,step3_img.png,step3_tips.png,step4_img.png",
"name": "GuidePanel",
"atlas": {
"step1_img.png": {
"x": 2,
"y": 2,
"w": 651,
"h": 388,
"ox": 0,
"oy": 0,
"sw": 651,
"sh": 388,
"ro": false
},
"step4_img.png": {
"x": 2,
"y": 392,
"y": 2,
"w": 573,
"h": 623,
"ox": 0,
"oy": 0,
"sw": 573,
"sh": 623,
"ro": true
"ro": false
},
"step2_img.png": {
"x": 655,
"x": 577,
"y": 2,
"w": 605,
"h": 470,
......@@ -436,7 +436,7 @@
},
"guide.png": {
"x": 2,
"y": 967,
"y": 627,
"w": 590,
"h": 586,
"ox": 0,
......@@ -445,9 +445,20 @@
"sh": 586,
"ro": false
},
"step1_img.png": {
"x": 594,
"y": 609,
"w": 510,
"h": 388,
"ox": 0,
"oy": 0,
"sw": 510,
"sh": 388,
"ro": true
},
"step1_tips.png": {
"x": 627,
"y": 392,
"x": 984,
"y": 609,
"w": 379,
"h": 26,
"ox": 0,
......@@ -457,7 +468,7 @@
"ro": true
},
"step2_tips.png": {
"x": 655,
"x": 1012,
"y": 609,
"w": 355,
"h": 26,
......@@ -465,29 +476,29 @@
"oy": 0,
"sw": 355,
"sh": 26,
"ro": false
"ro": true
},
"step3_tips.png": {
"x": 1012,
"y": 609,
"x": 594,
"y": 1121,
"w": 281,
"h": 24,
"ox": 0,
"oy": 0,
"sw": 281,
"sh": 24,
"ro": true
"ro": false
},
"step3_img.png": {
"x": 655,
"y": 637,
"x": 1049,
"y": 2,
"w": 124,
"h": 123,
"ox": 0,
"oy": 0,
"sw": 124,
"sh": 123,
"ro": false
"ro": true
}
}
},
......
resource/GuidePanel/step1_img.png

117 KB | W: | H:

resource/GuidePanel/step1_img.png

113 KB | W: | H:

resource/GuidePanel/step1_img.png
resource/GuidePanel/step1_img.png
resource/GuidePanel/step1_img.png
resource/GuidePanel/step1_img.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -5,7 +5,7 @@
"name": "FailPanel"
},
{
"keys": "cdbg.png,cloud.png,cloud2.png,controlpeo.png,gamebg.jpg,num_0.png,num_1.png,num_2.png,num_3.png,num_4.png,num_5.png,num_6.png,num_7.png,num_8.png,num_9.png,num_s.png,reset.png,word_云.png,word_休.png,word_卷.png,word_在.png,word_心.png,word_意.png,word_无.png,word_晴.png,word_水.png,word_流.png,word_深.png,word_看.png,word_自.png,word_舒.png,word_闲.png,word_静.png",
"keys": "cdbg.png,cloud.png,cloud2.png,controlpeo.png,gamebg.jpg,num_0.png,num_1.png,num_2.png,num_3.png,num_4.png,num_5.png,num_6.png,num_7.png,num_8.png,num_9.png,num_s.png,reset.png,word_云.png,word_休.png,word_卷.png,word_在.png,word_心.png,word_意.png,word_无.png,word_晴.png,word_水.png,word_流.png,word_深.png,word_看.png,word_自.png,word_舒.png,word_闲.png,word_静.png,点我按钮.png",
"name": "GameScene"
},
{
......
......@@ -25,7 +25,7 @@ export class Main {
private _pause: boolean;
private canvas: HTMLCanvasElement
constructor(canvas: HTMLCanvasElement, data = {
time: 60,
time: 20,
longitude: "",
latitude: ""
}) {
......
......@@ -40,7 +40,7 @@ export const ResJson = {
}
},
{
"keys": "cdbg.png,cloud.png,cloud2.png,controlpeo.png,gamebg.jpg,num_0.png,num_1.png,num_2.png,num_3.png,num_4.png,num_5.png,num_6.png,num_7.png,num_8.png,num_9.png,num_s.png,reset.png,word_云.png,word_休.png,word_卷.png,word_在.png,word_心.png,word_意.png,word_无.png,word_晴.png,word_水.png,word_流.png,word_深.png,word_看.png,word_自.png,word_舒.png,word_闲.png,word_静.png",
"keys": "cdbg.png,cloud.png,cloud2.png,controlpeo.png,gamebg.jpg,num_0.png,num_1.png,num_2.png,num_3.png,num_4.png,num_5.png,num_6.png,num_7.png,num_8.png,num_9.png,num_s.png,reset.png,word_云.png,word_休.png,word_卷.png,word_在.png,word_心.png,word_意.png,word_无.png,word_晴.png,word_水.png,word_流.png,word_深.png,word_看.png,word_自.png,word_舒.png,word_闲.png,word_静.png,点我按钮.png",
"name": "GameScene",
"atlas": {
"cloud2.png": {
......@@ -76,53 +76,64 @@ export const ResJson = {
"sh": 196,
"ro": true
},
"reset.png": {
"点我按钮.png": {
"x": 354,
"y": 226,
"w": 153,
"h": 157,
"ox": 0,
"oy": 0,
"sw": 153,
"sh": 157,
"ro": true
},
"reset.png": {
"x": 309,
"y": 381,
"w": 138,
"h": 62,
"ox": 0,
"oy": 0,
"sw": 138,
"sh": 62,
"ro": false
"ro": true
},
"cdbg.png": {
"x": 309,
"y": 290,
"x": 373,
"y": 381,
"w": 124,
"h": 123,
"ox": 0,
"oy": 0,
"sw": 124,
"sh": 123,
"ro": false
"ro": true
},
"word_云.png": {
"x": 435,
"y": 290,
"x": 2,
"y": 534,
"w": 112,
"h": 119,
"ox": 0,
"oy": 0,
"sw": 112,
"sh": 119,
"ro": false
"ro": true
},
"word_休.png": {
"x": 435,
"y": 411,
"x": 123,
"y": 534,
"w": 112,
"h": 119,
"ox": 0,
"oy": 0,
"sw": 112,
"sh": 119,
"ro": false
"ro": true
},
"word_卷.png": {
"x": 309,
"y": 415,
"x": 244,
"y": 534,
"w": 112,
"h": 119,
"ox": 0,
......@@ -132,52 +143,52 @@ export const ResJson = {
"ro": true
},
"word_在.png": {
"x": 2,
"y": 534,
"x": 365,
"y": 521,
"w": 112,
"h": 119,
"ox": 0,
"oy": 0,
"sw": 112,
"sh": 119,
"ro": true
"ro": false
},
"word_心.png": {
"x": 123,
"y": 534,
"x": 552,
"y": 2,
"w": 112,
"h": 119,
"ox": 0,
"oy": 0,
"sw": 112,
"sh": 119,
"ro": true
"ro": false
},
"word_意.png": {
"x": 244,
"y": 534,
"x": 552,
"y": 123,
"w": 112,
"h": 119,
"ox": 0,
"oy": 0,
"sw": 112,
"sh": 119,
"ro": true
"ro": false
},
"word_无.png": {
"x": 365,
"y": 532,
"x": 479,
"y": 507,
"w": 112,
"h": 119,
"ox": 0,
"oy": 0,
"sw": 112,
"sh": 119,
"ro": true
"ro": false
},
"word_晴.png": {
"x": 552,
"y": 2,
"x": 498,
"y": 381,
"w": 112,
"h": 119,
"ox": 0,
......@@ -187,8 +198,8 @@ export const ResJson = {
"ro": false
},
"word_水.png": {
"x": 552,
"y": 123,
"x": 513,
"y": 244,
"w": 112,
"h": 119,
"ox": 0,
......@@ -198,8 +209,8 @@ export const ResJson = {
"ro": false
},
"word_流.png": {
"x": 486,
"y": 532,
"x": 2,
"y": 648,
"w": 112,
"h": 119,
"ox": 0,
......@@ -209,30 +220,30 @@ export const ResJson = {
"ro": true
},
"word_深.png": {
"x": 549,
"y": 244,
"x": 123,
"y": 648,
"w": 112,
"h": 119,
"ox": 0,
"oy": 0,
"sw": 112,
"sh": 119,
"ro": false
"ro": true
},
"word_看.png": {
"x": 549,
"y": 365,
"x": 244,
"y": 648,
"w": 112,
"h": 119,
"ox": 0,
"oy": 0,
"sw": 112,
"sh": 119,
"ro": false
"ro": true
},
"word_自.png": {
"x": 2,
"y": 648,
"x": 365,
"y": 642,
"w": 112,
"h": 119,
"ox": 0,
......@@ -242,63 +253,63 @@ export const ResJson = {
"ro": true
},
"word_舒.png": {
"x": 123,
"y": 648,
"x": 486,
"y": 628,
"w": 112,
"h": 119,
"ox": 0,
"oy": 0,
"sw": 112,
"sh": 119,
"ro": true
"ro": false
},
"word_闲.png": {
"x": 244,
"y": 648,
"x": 666,
"y": 2,
"w": 112,
"h": 119,
"ox": 0,
"oy": 0,
"sw": 112,
"sh": 119,
"ro": true
"ro": false
},
"word_静.png": {
"x": 365,
"y": 646,
"x": 666,
"y": 123,
"w": 112,
"h": 119,
"ox": 0,
"oy": 0,
"sw": 112,
"sh": 119,
"ro": true
"ro": false
},
"num_3.png": {
"x": 494,
"y": 226,
"x": 309,
"y": 244,
"w": 25,
"h": 46,
"ox": 2,
"oy": 2,
"sw": 30,
"sh": 50,
"ro": true
"ro": false
},
"num_7.png": {
"x": 494,
"y": 253,
"x": 309,
"y": 292,
"w": 25,
"h": 46,
"ox": 2,
"oy": 2,
"sw": 30,
"sh": 50,
"ro": true
"ro": false
},
"num_1.png": {
"x": 607,
"y": 486,
"x": 309,
"y": 521,
"w": 10,
"h": 45,
"ox": 10,
......@@ -308,19 +319,19 @@ export const ResJson = {
"ro": true
},
"num_9.png": {
"x": 549,
"y": 498,
"x": 593,
"y": 502,
"w": 27,
"h": 45,
"ox": 2,
"oy": 3,
"sw": 30,
"sh": 50,
"ro": true
"ro": false
},
"num_0.png": {
"x": 309,
"y": 244,
"x": 593,
"y": 549,
"w": 31,
"h": 44,
"ox": 0,
......@@ -330,8 +341,8 @@ export const ResJson = {
"ro": false
},
"num_2.png": {
"x": 596,
"y": 498,
"x": 593,
"y": 595,
"w": 31,
"h": 44,
"ox": 0,
......@@ -341,30 +352,30 @@ export const ResJson = {
"ro": true
},
"num_4.png": {
"x": 607,
"y": 531,
"x": 600,
"y": 628,
"w": 30,
"h": 44,
"ox": 0,
"oy": 3,
"sw": 30,
"sh": 50,
"ro": true
"ro": false
},
"num_5.png": {
"x": 607,
"y": 563,
"x": 600,
"y": 674,
"w": 30,
"h": 44,
"ox": 0,
"oy": 3,
"sw": 30,
"sh": 50,
"ro": true
"ro": false
},
"num_6.png": {
"x": 607,
"y": 595,
"x": 600,
"y": 720,
"w": 28,
"h": 44,
"ox": 1,
......@@ -374,19 +385,19 @@ export const ResJson = {
"ro": true
},
"num_8.png": {
"x": 607,
"y": 625,
"x": 632,
"y": 628,
"w": 26,
"h": 44,
"ox": 2,
"oy": 3,
"sw": 30,
"sh": 50,
"ro": true
"ro": false
},
"num_s.png": {
"x": 642,
"y": 498,
"x": 309,
"y": 340,
"w": 22,
"h": 27,
"ox": 4,
......@@ -401,30 +412,19 @@ export const ResJson = {
"keys": "guide.png,step1_img.png,step1_tips.png,step2_img.png,step2_tips.png,step3_img.png,step3_tips.png,step4_img.png",
"name": "GuidePanel",
"atlas": {
"step1_img.png": {
"x": 2,
"y": 2,
"w": 651,
"h": 388,
"ox": 0,
"oy": 0,
"sw": 651,
"sh": 388,
"ro": false
},
"step4_img.png": {
"x": 2,
"y": 392,
"y": 2,
"w": 573,
"h": 623,
"ox": 0,
"oy": 0,
"sw": 573,
"sh": 623,
"ro": true
"ro": false
},
"step2_img.png": {
"x": 655,
"x": 577,
"y": 2,
"w": 605,
"h": 470,
......@@ -436,7 +436,7 @@ export const ResJson = {
},
"guide.png": {
"x": 2,
"y": 967,
"y": 627,
"w": 590,
"h": 586,
"ox": 0,
......@@ -445,9 +445,20 @@ export const ResJson = {
"sh": 586,
"ro": false
},
"step1_img.png": {
"x": 594,
"y": 609,
"w": 510,
"h": 388,
"ox": 0,
"oy": 0,
"sw": 510,
"sh": 388,
"ro": true
},
"step1_tips.png": {
"x": 627,
"y": 392,
"x": 984,
"y": 609,
"w": 379,
"h": 26,
"ox": 0,
......@@ -457,7 +468,7 @@ export const ResJson = {
"ro": true
},
"step2_tips.png": {
"x": 655,
"x": 1012,
"y": 609,
"w": 355,
"h": 26,
......@@ -465,29 +476,29 @@ export const ResJson = {
"oy": 0,
"sw": 355,
"sh": 26,
"ro": false
"ro": true
},
"step3_tips.png": {
"x": 1012,
"y": 609,
"x": 594,
"y": 1121,
"w": 281,
"h": 24,
"ox": 0,
"oy": 0,
"sw": 281,
"sh": 24,
"ro": true
"ro": false
},
"step3_img.png": {
"x": 655,
"y": 637,
"x": 1049,
"y": 2,
"w": 124,
"h": 123,
"ox": 0,
"oy": 0,
"sw": 124,
"sh": 123,
"ro": false
"ro": true
}
}
},
......@@ -733,5 +744,5 @@ export const ResJson = {
"name": "svga"
}
],
"path": "https://yun.duiba.com.cn/db_games/activity/template/1678886131/resource/"
"path": "https://yun.duiba.com.cn/db_games/activity/template/1679363782/resource/"
}
\ No newline at end of file
......@@ -307,7 +307,7 @@ export const SkinJson = {
{
"name": "reset",
"x": 612,
"y": 239,
"y": 279,
"type": "sprite",
"props": {
"source": "reset.png"
......@@ -390,7 +390,7 @@ export const SkinJson = {
{
"name": "topbutton",
"x": 0,
"y": 223,
"y": 268,
"type": "container",
"children": [
{
......
......@@ -52,7 +52,7 @@ export class GuidePanel extends Panel {
async guideUI() {
this.rectlayer.removeChildren()
if (this.guideStep == 1) {
UI.Sp(this.rectlayer, 'step1_img.png', 49, 869);
UI.Sp(this.rectlayer, 'step1_img.png', 180, 860);
let step1_tips = UI.Sp(this.rectlayer, 'step1_tips.png', 185, 776);
FYGE.Tween.get(step1_tips, {
loop: true
......
......@@ -42,14 +42,15 @@ export class GameScene extends Scene {
async start() {
super.start();
GameScene.instance = this
this.left = new FYGE.SvgaAni(await RES.getResAsync("left.svga"))
this.left = this.addChild(this.left)
this.left.position.set(8, 979);
this.left.startAniRange(1, 1, 1);
this.right = new FYGE.SvgaAni(await RES.getResAsync("right.svga"))
this.right = this.addChild(this.right)
this.right.position.set(524, 979);
this.right.startAniRange(1, 1, 1);
// this.left = new FYGE.SvgaAni(await RES.getResAsync("left.svga"))
// this.left = this.addChild(this.left)
// this.left.position.set(8, 979);
// this.left.startAniRange(1, 1, 1);
// this.right = new FYGE.SvgaAni(await RES.getResAsync("right.svga"))
// this.right = this.addChild(this.right)
// this.right.position.set(524, 979);
// this.right.startAniRange(1, 1, 1);
this.left = UI.Sp(this, '点我按钮.png', 545, 1076)
this.cdUIRender(this.time)
// 创建模型, 云层
......@@ -67,31 +68,55 @@ export class GameScene extends Scene {
this.onReset()
}, this)
// 添加指向的事件
// this.left.addEventListener(FYGE.MouseEvent.CLICK, () => {
// this.btnDelay(this.left)
// let item = this._role.currentIndex < 0 ? this.mapList[0][0] : this.mapList[this._role.currentIndex][0]
// if (item.y + this.bgCon.y - 200 > 0 && !this._role.isMove && this._role.currentIndex % 2 == 0) {
// this.left.startAniRange(1, undefined, 1, () => {})
// console.log('this._role.currentIndex', this._role.currentIndex)
// this._role.leftMove({
// item: item
// }, this.collectWordTx.bind(this, item))
// }
// }, this)
// this.right.addEventListener(FYGE.MouseEvent.CLICK, () => {
// this.btnDelay(this.right)
// let item = this._role.currentIndex < 0 ? this.mapList[0][0] : this.mapList[this._role.currentIndex][0]
// if (item.y + this.bgCon.y - 200 > 0 && !this._role.isMove && this._role.currentIndex % 2 == 1) {
// this.right.startAniRange(1, undefined, 1, () => {})
// console.log('this._role.currentIndex', this._role.currentIndex)
// let item = this._role.currentIndex < 0 ? this.mapList[0][0] : this.mapList[this._role.currentIndex][0]
// console.log("播放完成")
// this._role.rightMove({
// item: item
// }, this.collectWordTx.bind(this, item))
// }
// }, this)
// 添加指向的事件
this.left.addEventListener(FYGE.MouseEvent.CLICK, () => {
this.btnDelay(this.left)
let item = this._role.currentIndex < 0 ? this.mapList[0][0] : this.mapList[this._role.currentIndex][0]
if (item.y + this.bgCon.y - 200 > 0 && !this._role.isMove && this._role.currentIndex % 2 == 0) {
this.left.startAniRange(1, undefined, 1, () => {
console.log('this._role.currentIndex', this._role.currentIndex)
if (item.y + this.bgCon.y - 200 > 0) {
this.left.anchor.set(170/2,174/2)
FYGE.Tween.get(this.left)
.to({
scaleX: 0.7,
scaleY: 0.7
},100)
.to({
scaleX: 1,
scaleY: 1
},100)
if (this._role.currentIndex % 2 == 0) {
this._role.leftMove({
item: item
}, this.collectWordTx.bind(this, item))
})
}
}, this)
this.right.addEventListener(FYGE.MouseEvent.CLICK, () => {
this.btnDelay(this.right)
let item = this._role.currentIndex < 0 ? this.mapList[0][0] : this.mapList[this._role.currentIndex][0]
if (item.y + this.bgCon.y - 200 > 0 && !this._role.isMove && this._role.currentIndex % 2 == 1) {
this.right.startAniRange(1, undefined, 1, () => {
console.log('this._role.currentIndex', this._role.currentIndex)
let item = this._role.currentIndex < 0 ? this.mapList[0][0] : this.mapList[this._role.currentIndex][0]
console.log("播放完成")
} else {
this._role.rightMove({
item: item
}, this.collectWordTx.bind(this, item))
})
}
}
}, this)
}
......@@ -263,7 +288,7 @@ export class GameScene extends Scene {
}
moveMap() {
this.bgCon.y = this.bgCon.y + 2
this.bgCon.y = this.bgCon.y + 1.7
}
collectWordTx(item) {
this.bgCon.removeChild(item)
......@@ -274,6 +299,12 @@ export class GameScene extends Scene {
this.wordList.splice(_i, 1)
}
}
if (item.wordTx) {
if (!this.mapList[item.index][0].wordTx) {
clearTimeout(this.timer);
this.gameOver()
}
}
}
async gameOver() {
......@@ -321,7 +352,6 @@ export class GameScene extends Scene {
context: words.join(',')
})
})
console.log('tempData', tempData)
return tempData
}
closeGame() {
......
......@@ -25,11 +25,11 @@ export class StartScene extends Scene {
StartScene.instance = this;
let svgashow = new FYGE.SvgaAni(await RES.getResAsync("startpeople.svga"))
this.addChild(svgashow)
svgashow.position.set(83, 630)
svgashow.position.set(83, 590)
this.startbtn = new FYGE.SvgaAni(await RES.getResAsync("startbtn.svga"))
this.addChild(this.startbtn)
this.startbtn.position.set(208, 1293)
this.startbtn.position.set(208, 1246)
this.startbtn.addEventListener(FYGE.MouseEvent.CLICK, this.openGame, this)
this.titlelab.textWidth = 750;
......
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