Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
db-game-template
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
崔立强
db-game-template
Commits
ba351be5
Commit
ba351be5
authored
Dec 21, 2018
by
wildfirecode
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
1ebab6a7
Changes
32
Hide whitespace changes
Inline
Side-by-side
Showing
32 changed files
with
288 additions
and
92 deletions
+288
-92
index.html
egret/index.html
+3
-3
showPlugLog.ts
egret/libs/new_tw/ctrls/showPlugLog.ts
+16
-0
Panel.ts
egret/libs/new_wx/components/Panel.ts
+2
-0
StartSceneBase.ts
egret/libs/new_wx/components/StartSceneBase.ts
+3
-1
panelCtrl.ts
egret/libs/new_wx/ctrls/panelCtrl.ts
+6
-3
boomnoprize.tmproject
egret/resource/TextureMerger/boomnoprize.tmproject
+1
-0
boomprize.tmproject
egret/resource/TextureMerger/boomprize.tmproject
+1
-0
cashbigprize.tmproject
egret/resource/TextureMerger/cashbigprize.tmproject
+1
-0
cashnoprize.tmproject
egret/resource/TextureMerger/cashnoprize.tmproject
+1
-0
cashprize.tmproject
egret/resource/TextureMerger/cashprize.tmproject
+1
-0
preload.tmproject
egret/resource/TextureMerger/preload.tmproject
+0
-1
start.tmproject
egret/resource/TextureMerger/start.tmproject
+1
-1
dot.png
egret/resource/assets/startScene/dot.png
+0
-0
startbtn.png
egret/resource/assets/startScene/startbtn.png
+0
-0
startbtnGray.png
egret/resource/assets/startScene/startbtnGray.png
+0
-0
toast_failed.png
egret/resource/assets/startScene/toast_failed.png
+0
-0
toast_success.png
egret/resource/assets/startScene/toast_success.png
+0
-0
default.res.json
egret/resource/default.res.json
+31
-6
default.thm.json
egret/resource/default.thm.json
+5
-5
BoomPrizeSkin.exml
egret/resource/skins/BoomPrizeSkin.exml
+3
-1
CashBigPrizeSkin.exml
egret/resource/skins/CashBigPrizeSkin.exml
+3
-1
CashPrizeSkin.exml
egret/resource/skins/CashPrizeSkin.exml
+3
-1
StartSkin.exml
egret/resource/skins/StartSkin.exml
+7
-5
BoomPrizePanel.ts
egret/src/panels/BoomPrizePanel.ts
+50
-0
CashBigPrize.ts
egret/src/panels/CashBigPrize.ts
+4
-1
CashPrizePanel.ts
egret/src/panels/CashPrizePanel.ts
+3
-1
StartScene.ts
egret/src/startScene/StartScene.ts
+31
-14
check.ts
egret/src/startScene/check.ts
+31
-9
createItems.ts
egret/src/startScene/createItems.ts
+1
-1
level.ts
egret/src/startScene/level.ts
+27
-13
playMovieClip.ts
egret/src/startScene/playMovieClip.ts
+17
-1
getPlugOrderStatus.json
mock/json/getPlugOrderStatus.json
+36
-24
No files found.
egret/index.html
View file @
ba351be5
...
@@ -44,9 +44,9 @@
...
@@ -44,9 +44,9 @@
<script
src=
"libs/downloadApp.js"
></script>
<script
src=
"libs/downloadApp.js"
></script>
<!-- <script src='https://cdnjs.cloudflare.com/ajax/libs/mathjs/5.4.0/math.js'></script> -->
<!-- <script src='https://cdnjs.cloudflare.com/ajax/libs/mathjs/5.4.0/math.js'></script> -->
<script>
<script>
//
localStorage.clear();
localStorage
.
clear
();
//
const data ={"IceCream":3,"Donut":3,"Egg":3,"Candy2":3,"Gift2":1}
;
//
localStorage.setItem('currentLv','Gift2')
;
// localStorage.setItem('data',JSON.stringify({"IceCream":3,"Donut":3,"Egg":3,"Candy2":3,"Gift2":
1
}))
// localStorage.setItem('data',JSON.stringify({"IceCream":3,"Donut":3,"Egg":3,"Candy2":3,"Gift2":
2
}))
window
[
'development'
]
=
true
;
window
[
'development'
]
=
true
;
var
gameId
=
1
;
var
gameId
=
1
;
var
CFG
=
{
var
CFG
=
{
...
...
egret/libs/new_tw/ctrls/showPlugLog.ts
0 → 100644
View file @
ba351be5
import
{
LotteryData
}
from
"../../tw/data/common/lottery/LotteryData"
;
import
{
DataManager
}
from
"../../tw/manager/DataManager"
;
import
{
NetManager
}
from
"../../tw/manager/NetManager"
;
const
showPlugLog
=
(
lottery
:
LotteryData
):
void
=>
{
//曝光埋点
if
(
lottery
.
imgExposure
)
{
NetManager
.
ins
.
showLog
(
lottery
.
imgExposure
);
}
//如果是福袋还需要推啊曝光
if
(
lottery
.
type
==
"lucky"
)
{
NetManager
.
ins
.
spmshow
(
DataManager
.
ins
.
getPlugOrderStatusData
.
exposure
);
}
}
export
default
showPlugLog
;
\ No newline at end of file
egret/libs/new_wx/components/Panel.ts
View file @
ba351be5
import
ComponentBase
from
"./ComponentBase"
;
import
ComponentBase
from
"./ComponentBase"
;
import
{
ModuleTypes
}
from
"../types/sceneTypes"
;
export
default
class
Panel
extends
ComponentBase
{
export
default
class
Panel
extends
ComponentBase
{
type
:
ModuleTypes
;
constructor
()
{
constructor
()
{
super
();
super
();
}
}
...
...
egret/libs/new_wx/components/StartSceneBase.ts
View file @
ba351be5
...
@@ -9,6 +9,7 @@ import SceneCtrl from "../ctrls/sceneCtrl";
...
@@ -9,6 +9,7 @@ import SceneCtrl from "../ctrls/sceneCtrl";
import
{
ModuleTypes
}
from
"../types/sceneTypes"
;
import
{
ModuleTypes
}
from
"../types/sceneTypes"
;
import
Scene
from
"./Scene"
;
import
Scene
from
"./Scene"
;
import
{
isAllLevelPass
}
from
"../../../src/startScene/level"
;
import
{
isAllLevelPass
}
from
"../../../src/startScene/level"
;
import
{
NetManager
}
from
"../../tw/manager/NetManager"
;
export
default
class
StartSceneBase
extends
Scene
{
export
default
class
StartSceneBase
extends
Scene
{
ruleBtn
:
eui
.
Button
;
ruleBtn
:
eui
.
Button
;
...
@@ -84,11 +85,12 @@ export default class StartSceneBase extends Scene {
...
@@ -84,11 +85,12 @@ export default class StartSceneBase extends Scene {
if
(
this
.
rankBtn
)
if
(
this
.
rankBtn
)
this
.
rankBtn
.
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
this
.
onTap_rankBtn
,
this
);
this
.
rankBtn
.
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
this
.
onTap_rankBtn
,
this
);
if
(
this
.
startBtn
)
if
(
this
.
startBtn
)
this
.
startBtn
.
once
(
egret
.
TouchEvent
.
TOUCH_TAP
,
this
.
onTap_startBtn
,
this
);
this
.
startBtn
.
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
this
.
onTap_startBtn
,
this
);
}
}
onTap_startBtn
(
e
?:
egret
.
Event
)
{
onTap_startBtn
(
e
?:
egret
.
Event
)
{
doStart
();
doStart
();
wait
(
1000
).
then
(()
=>
NetManager
.
ins
.
getInfo
())
}
}
onTap_ruleBtn
(
e
:
egret
.
Event
)
{
onTap_ruleBtn
(
e
:
egret
.
Event
)
{
...
...
egret/libs/new_wx/ctrls/panelCtrl.ts
View file @
ba351be5
import
{
ModuleTypes
}
from
"../types/sceneTypes"
;
import
{
ModuleTypes
}
from
"../types/sceneTypes"
;
import
Panel
from
"../components/Panel"
;
import
Panel
from
"../components/Panel"
;
import
Loading
from
"../components/Loading"
;
import
Loading
from
"../components/Loading"
;
export
default
class
PanelCtrl
{
export
default
class
PanelCtrl
extends
egret
.
EventDispatcher
{
private
_parent
:
egret
.
Sprite
;
private
_parent
:
egret
.
Sprite
;
private
_mask
:
egret
.
Sprite
;
private
_mask
:
egret
.
Sprite
;
static
_instance
:
PanelCtrl
;
static
_instance
:
PanelCtrl
;
...
@@ -16,6 +16,7 @@ export default class PanelCtrl {
...
@@ -16,6 +16,7 @@ export default class PanelCtrl {
show
(
type
:
ModuleTypes
,
data
?)
{
show
(
type
:
ModuleTypes
,
data
?)
{
const
cls
=
this
.
_panelClassMap
[
type
];
const
cls
=
this
.
_panelClassMap
[
type
];
const
panel
:
Panel
=
new
cls
(
data
);
const
panel
:
Panel
=
new
cls
(
data
);
panel
.
type
=
type
;
this
.
addMask
();
this
.
addMask
();
if
(
!
window
[
'development'
])
{
if
(
!
window
[
'development'
])
{
Loading
.
instace
.
show
();
Loading
.
instace
.
show
();
...
@@ -58,7 +59,7 @@ export default class PanelCtrl {
...
@@ -58,7 +59,7 @@ export default class PanelCtrl {
}
}
else
else
egret
.
Tween
.
get
(
this
.
_mask
).
to
({
alpha
:
0
},
300
,
egret
.
Ease
.
quartIn
).
call
(
egret
.
Tween
.
get
(
this
.
_mask
).
to
({
alpha
:
0
},
300
,
egret
.
Ease
.
quartIn
).
call
(
()
=>
this
.
_mask
.
parent
&&
this
.
_parent
.
removeChild
(
this
.
_mask
),
this
);
()
=>
this
.
_mask
.
parent
&&
this
.
_parent
.
removeChild
(
this
.
_mask
),
this
);
}
}
}
}
...
@@ -67,10 +68,11 @@ export default class PanelCtrl {
...
@@ -67,10 +68,11 @@ export default class PanelCtrl {
panel
.
addEventListener
(
'onDestroy'
,
this
.
onPanelHide
,
this
);
panel
.
addEventListener
(
'onDestroy'
,
this
.
onPanelHide
,
this
);
}
}
private
remove
(
panel
:
Panel
,
tag
=
false
)
{
private
remove
(
panel
:
Panel
,
tag
=
false
,
closeType
=
''
)
{
if
(
tag
)
{
if
(
tag
)
{
panel
.
parent
&&
this
.
_parent
.
removeChild
(
panel
);
panel
.
parent
&&
this
.
_parent
.
removeChild
(
panel
);
this
.
removeMask
(
tag
);
this
.
removeMask
(
tag
);
this
.
dispatchEvent
(
new
egret
.
Event
(
'onPanelRemoved'
,
false
,
false
,
{
panel
:
panel
,
closeType
:
closeType
}));
return
;
return
;
}
}
const
tw
=
egret
.
Tween
.
get
(
panel
);
const
tw
=
egret
.
Tween
.
get
(
panel
);
...
@@ -78,6 +80,7 @@ export default class PanelCtrl {
...
@@ -78,6 +80,7 @@ export default class PanelCtrl {
.
call
(()
=>
{
.
call
(()
=>
{
this
.
_parent
.
removeChild
(
panel
);
this
.
_parent
.
removeChild
(
panel
);
this
.
removeMask
(
tag
);
this
.
removeMask
(
tag
);
this
.
dispatchEvent
(
new
egret
.
Event
(
'onPanelRemoved'
,
false
,
false
,
{
panel
:
panel
,
closeType
:
closeType
}));
},
this
);
},
this
);
}
}
...
...
egret/resource/TextureMerger/boomnoprize.tmproject
0 → 100644
View file @
ba351be5
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"boomnoprize","version":5,"files":["../assets/boomnoprize/boomnoprizebg.png"]}
\ No newline at end of file
egret/resource/TextureMerger/boomprize.tmproject
0 → 100644
View file @
ba351be5
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"boomprize","version":5,"files":["../assets/boomprize/getbtn.png","../assets/boomprize/boomprizebg.png"]}
\ No newline at end of file
egret/resource/TextureMerger/cashbigprize.tmproject
0 → 100644
View file @
ba351be5
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"cashbigprize","version":5,"files":["../assets/cashbigprize/cashbigprizebg.png","../assets/cashbigprize/getbtn2.png"]}
\ No newline at end of file
egret/resource/TextureMerger/cashnoprize.tmproject
0 → 100644
View file @
ba351be5
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"cashnoprize","version":5,"files":["../assets/cashnoprize/cashnoprizebg.png"]}
\ No newline at end of file
egret/resource/TextureMerger/cashprize.tmproject
0 → 100644
View file @
ba351be5
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"cashprize","version":5,"files":["../assets/cashprize/getbtn3.png","../assets/cashprize/cashprizebg.png"]}
\ No newline at end of file
egret/resource/TextureMerger/preload.tmproject
deleted
100644 → 0
View file @
1ebab6a7
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"preload","version":5,"files":["../assets/startScene/btnLeft1.png","../assets/startScene/btnRight1.png","../assets/startScene/toast.png","../assets/startScene/垃圾桶前盖.png","../assets/startScene/碗前盖.png","../assets/startScene/显示器纹路.png","../assets/startScene/boomalert.png","../assets/startScene/startbtn.png","../assets/startScene/startbtnGray.png","../assets/startScene/红包gray.png"]}
\ No newline at end of file
egret/resource/TextureMerger/start.tmproject
View file @
ba351be5
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"start","version":5,"files":["../assets/startScene/toast.png","../assets/startScene/startbtnGray.png","../assets/startScene/startbtn.png","../assets/startScene/ruleBtn.png","../assets/startScene/recordbtn.png","../assets/startScene/rankBtn.png","../assets/startScene/optionBtn.png","../assets/startScene/getit.png","../assets/startScene/dot.png","../assets/startScene/btnRight1.png","../assets/startScene/btnRight.png","../assets/startScene/btnLeft1.png","../assets/startScene/btnLeft.png","../assets/startScene/boomalert.png","../assets/startScene/bg3.png","../assets/startScene/arrow.png","../assets/startScene/转盘前景.png","../assets/startScene/小丑+转盘.png","../assets/startScene/显示器纹路.png","../assets/startScene/碗前盖.png","../assets/startScene/碗后盖.png","../assets/startScene/甜筒-已获得.png","../assets/startScene/甜筒-未获得.png","../assets/startScene/甜甜圈-已获得.png","../assets/startScene/甜甜圈-未获得.png","../assets/startScene/糖果-已获得.png","../assets/startScene/糖果-未获得.png","../assets/startScene/前景.png","../assets/startScene/目标.png","../assets/startScene/礼盒-已获得.png","../assets/startScene/礼盒-未获得.png","../assets/startScene/垃圾桶前盖.png","../assets/startScene/垃圾桶后盖.png","../assets/startScene/垃圾桶.png","../assets/startScene/进度条-已显示.png","../assets/startScene/进度条-未显示.png","../assets/startScene/金蛋-已获得.png","../assets/startScene/金蛋-未获得.png","../assets/startScene/奖品.png","../assets/startScene/红包gray.png","../assets/startScene/红包.png","../assets/startScene/灯2.png","../assets/startScene/灯1.png"]}
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"start","version":5,"files":["../assets/startScene/toast.png","../assets/startScene/toast_success.png","../assets/startScene/toast_failed.png","../assets/startScene/startbtnGray.png","../assets/startScene/startbtn.png","../assets/startScene/ruleBtn.png","../assets/startScene/recordbtn.png","../assets/startScene/rankBtn.png","../assets/startScene/optionBtn.png","../assets/startScene/getit.png","../assets/startScene/dot.png","../assets/startScene/closeBtn.png","../assets/startScene/btnRight1.png","../assets/startScene/btnRight.png","../assets/startScene/btnLeft1.png","../assets/startScene/btnLeft.png","../assets/startScene/boomalert.png","../assets/startScene/bg3.png","../assets/startScene/arrow.png","../assets/startScene/转盘前景.png","../assets/startScene/小丑+转盘.png","../assets/startScene/显示器纹路.png","../assets/startScene/碗前盖.png","../assets/startScene/碗后盖.png","../assets/startScene/甜筒-已获得.png","../assets/startScene/甜筒-未获得.png","../assets/startScene/甜甜圈-已获得.png","../assets/startScene/甜甜圈-未获得.png","../assets/startScene/糖果-已获得.png","../assets/startScene/糖果-未获得.png","../assets/startScene/前景.png","../assets/startScene/目标.png","../assets/startScene/礼盒-已获得.png","../assets/startScene/礼盒-未获得.png","../assets/startScene/垃圾桶前盖.png","../assets/startScene/垃圾桶后盖.png","../assets/startScene/垃圾桶.png","../assets/startScene/进度条-已显示.png","../assets/startScene/进度条-未显示.png","../assets/startScene/金蛋-已获得.png","../assets/startScene/金蛋-未获得.png","../assets/startScene/奖品.png","../assets/startScene/红包gray.png","../assets/startScene/红包.png","../assets/startScene/灯2.png","../assets/startScene/灯1.png"]}
\ No newline at end of file
\ No newline at end of file
egret/resource/assets/startScene/dot.png
deleted
100644 → 0
View file @
1ebab6a7
962 Bytes
egret/resource/assets/startScene/startbtn.png
View replaced file @
1ebab6a7
View file @
ba351be5
18.5 KB
|
W:
|
H:
36.6 KB
|
W:
|
H:
2-up
Swipe
Onion skin
egret/resource/assets/startScene/startbtnGray.png
View replaced file @
1ebab6a7
View file @
ba351be5
11.2 KB
|
W:
|
H:
23.6 KB
|
W:
|
H:
2-up
Swipe
Onion skin
egret/resource/assets/startScene/toast_failed.png
0 → 100644
View file @
ba351be5
62.6 KB
egret/resource/assets/startScene/toast_success.png
0 → 100644
View file @
ba351be5
58.8 KB
egret/resource/default.res.json
View file @
ba351be5
...
@@ -5,8 +5,28 @@
...
@@ -5,8 +5,28 @@
"name"
:
"rule"
"name"
:
"rule"
},
},
{
{
"keys"
:
"toast_png,
startscenebg_jpg,startbtnGray_png,startbtn_png,ruleBtn_png,recordbtn_png,rankBtn_png,optionBtn_png,getit_png,dot
_png,btnRight1_png,btnRight_png,btnLeft1_png,btnLeft_png,boomalert_png,bg3_png,arrow_png,转盘前景_png,小丑+转盘_png,显示器纹路_png,碗前盖_png,碗后盖_png,甜筒-已获得_png,甜筒-未获得_png,甜甜圈-已获得_png,甜甜圈-未获得_png,糖果-已获得_png,糖果-未获得_png,前景_png,目标_png,礼盒-已获得_png,礼盒-未获得_png,垃圾桶前盖_png,垃圾桶后盖_png,垃圾桶_png,进度条-已显示_png,进度条-未显示_png,金蛋-已获得_png,金蛋-未获得_png,奖品_png,红包gray_png,红包_png,灯2_png,灯1_png"
,
"keys"
:
"toast_png,
toast_success_png,toast_failed_png,startscenebg_jpg,startbtnGray_png,startbtn_png,ruleBtn_png,recordbtn_png,rankBtn_png,optionBtn_png,getit_png,closeBtn
_png,btnRight1_png,btnRight_png,btnLeft1_png,btnLeft_png,boomalert_png,bg3_png,arrow_png,转盘前景_png,小丑+转盘_png,显示器纹路_png,碗前盖_png,碗后盖_png,甜筒-已获得_png,甜筒-未获得_png,甜甜圈-已获得_png,甜甜圈-未获得_png,糖果-已获得_png,糖果-未获得_png,前景_png,目标_png,礼盒-已获得_png,礼盒-未获得_png,垃圾桶前盖_png,垃圾桶后盖_png,垃圾桶_png,进度条-已显示_png,进度条-未显示_png,金蛋-已获得_png,金蛋-未获得_png,奖品_png,红包gray_png,红包_png,灯2_png,灯1_png"
,
"name"
:
"start"
"name"
:
"start"
},
{
"keys"
:
"boomnoprizebg_png"
,
"name"
:
"boomnoprize"
},
{
"keys"
:
"getbtn_png,boomprizebg_png"
,
"name"
:
"boomprize"
},
{
"keys"
:
"cashbigprizebg_png,getbtn2_png"
,
"name"
:
"cashbigprize"
},
{
"keys"
:
"cashnoprizebg_png"
,
"name"
:
"cashnoprize"
},
{
"keys"
:
"getbtn3_png,cashprizebg_png"
,
"name"
:
"cashprize"
}
}
],
],
"resources"
:
[
"resources"
:
[
...
@@ -227,11 +247,6 @@
...
@@ -227,11 +247,6 @@
"name"
:
"boom_json"
,
"name"
:
"boom_json"
,
"subkeys"
:
"礼盒0000,礼盒0001,礼盒0002,礼盒0003,礼盒0004,礼盒0005,礼盒0006,礼盒0007,礼盒0008,礼盒0009,礼盒0010,礼盒0011,礼盒0012,礼盒0013,礼盒0014,礼盒0015"
"subkeys"
:
"礼盒0000,礼盒0001,礼盒0002,礼盒0003,礼盒0004,礼盒0005,礼盒0006,礼盒0007,礼盒0008,礼盒0009,礼盒0010,礼盒0011,礼盒0012,礼盒0013,礼盒0014,礼盒0015"
},
},
{
"url"
:
"assets/startScene/dot.png"
,
"type"
:
"image"
,
"name"
:
"dot_png"
},
{
{
"url"
:
"assets/startScene/垃圾桶.png"
,
"url"
:
"assets/startScene/垃圾桶.png"
,
"type"
:
"image"
,
"type"
:
"image"
,
...
@@ -358,6 +373,16 @@
...
@@ -358,6 +373,16 @@
"url"
:
"assets/cashprize/getbtn3.png"
,
"url"
:
"assets/cashprize/getbtn3.png"
,
"type"
:
"image"
,
"type"
:
"image"
,
"name"
:
"getbtn3_png"
"name"
:
"getbtn3_png"
},
{
"url"
:
"assets/startScene/toast_success.png"
,
"type"
:
"image"
,
"name"
:
"toast_success_png"
},
{
"url"
:
"assets/startScene/toast_failed.png"
,
"type"
:
"image"
,
"name"
:
"toast_failed_png"
}
}
]
]
}
}
\ No newline at end of file
egret/resource/default.thm.json
View file @
ba351be5
...
@@ -3,6 +3,11 @@
...
@@ -3,6 +3,11 @@
"autoGenerateExmlsList"
:
true
,
"autoGenerateExmlsList"
:
true
,
"exmls"
:
[
"exmls"
:
[
"resource/skins/AlertSkin.exml"
,
"resource/skins/AlertSkin.exml"
,
"resource/skins/BoomNoPrizeSkin.exml"
,
"resource/skins/BoomPrizeSkin.exml"
,
"resource/skins/CashBigPrizeSkin.exml"
,
"resource/skins/CashNoPrizeSkin.exml"
,
"resource/skins/CashPrizeSkin.exml"
,
"resource/skins/OptionItemSkin.exml"
,
"resource/skins/OptionItemSkin.exml"
,
"resource/skins/OptionsSkin.exml"
,
"resource/skins/OptionsSkin.exml"
,
"resource/skins/PlaySkin.exml"
,
"resource/skins/PlaySkin.exml"
,
...
@@ -11,11 +16,6 @@
...
@@ -11,11 +16,6 @@
"resource/skins/RankSkin.exml"
,
"resource/skins/RankSkin.exml"
,
"resource/skins/RuleSkin.exml"
,
"resource/skins/RuleSkin.exml"
,
"resource/skins/StartSkin.exml"
,
"resource/skins/StartSkin.exml"
,
"resource/skins/BoomNoPrizeSkin.exml"
,
"resource/skins/BoomPrizeSkin.exml"
,
"resource/skins/CashBigPrizeSkin.exml"
,
"resource/skins/CashNoPrizeSkin.exml"
,
"resource/skins/CashPrizeSkin.exml"
,
"resource/skins/VScrollBarSkin.exml"
"resource/skins/VScrollBarSkin.exml"
],
],
"path"
:
"resource/default.thm.json"
"path"
:
"resource/default.thm.json"
...
...
egret/resource/skins/BoomPrizeSkin.exml
View file @
ba351be5
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
</e:Skin>
</e:Skin>
</e:skinName>
</e:skinName>
</e:Button>
</e:Button>
<e:Button
id=
"
get
Btn"
label=
""
y=
"845"
horizontalCenter=
"0"
>
<e:Button
id=
"
use
Btn"
label=
""
y=
"845"
horizontalCenter=
"0"
>
<e:skinName>
<e:skinName>
<e:Skin
states=
"up,down,disabled"
>
<e:Skin
states=
"up,down,disabled"
>
<e:Image
width=
"100%"
height=
"100%"
source=
"getbtn_png"
source.down=
"getbtn_png"
source.disabled=
"getbtn_png"
/>
<e:Image
width=
"100%"
height=
"100%"
source=
"getbtn_png"
source.down=
"getbtn_png"
source.disabled=
"getbtn_png"
/>
...
@@ -17,4 +17,6 @@
...
@@ -17,4 +17,6 @@
</e:Skin>
</e:Skin>
</e:skinName>
</e:skinName>
</e:Button>
</e:Button>
<e:Label
text=
"{data.name}"
y=
"810"
horizontalCenter=
"0"
width=
"508"
textAlign=
"center"
size=
"28"
visible=
"false"
/>
<e:Image
id=
"img"
y=
"567.12"
horizontalCenter=
"3.5"
touchEnabled=
"true"
source=
"{data.img}"
/>
</e:Skin>
</e:Skin>
\ No newline at end of file
egret/resource/skins/CashBigPrizeSkin.exml
View file @
ba351be5
...
@@ -9,5 +9,7 @@
...
@@ -9,5 +9,7 @@
</e:Skin>
</e:Skin>
</e:skinName>
</e:skinName>
</e:Button>
</e:Button>
<e:Image
id=
"getBtn"
source=
"getbtn2_png"
y=
"812"
horizontalCenter=
"0"
/>
<e:Image
id=
"useBtn"
source=
"getbtn2_png"
y=
"889"
horizontalCenter=
"0"
/>
<e:Label
text=
"{data.name}"
y=
"842"
horizontalCenter=
"0"
width=
"508"
textAlign=
"center"
size=
"28"
visible=
"false"
/>
<e:Image
id=
"img"
y=
"558"
horizontalCenter=
"0"
touchEnabled=
"true"
source=
"{data.img}"
/>
</e:Skin>
</e:Skin>
\ No newline at end of file
egret/resource/skins/CashPrizeSkin.exml
View file @
ba351be5
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
</e:Skin>
</e:Skin>
</e:skinName>
</e:skinName>
</e:Button>
</e:Button>
<e:Button
id=
"
get
Btn"
label=
""
y=
"760"
horizontalCenter=
"0"
>
<e:Button
id=
"
use
Btn"
label=
""
y=
"760"
horizontalCenter=
"0"
>
<e:skinName>
<e:skinName>
<e:Skin
states=
"up,down,disabled"
>
<e:Skin
states=
"up,down,disabled"
>
<e:Image
width=
"100%"
height=
"100%"
source=
"getbtn3_png"
source.down=
"getbtn3_png"
source.disabled=
"getbtn3_png"
/>
<e:Image
width=
"100%"
height=
"100%"
source=
"getbtn3_png"
source.down=
"getbtn3_png"
source.disabled=
"getbtn3_png"
/>
...
@@ -17,4 +17,6 @@
...
@@ -17,4 +17,6 @@
</e:Skin>
</e:Skin>
</e:skinName>
</e:skinName>
</e:Button>
</e:Button>
<e:Label
text=
"{data.name}"
y=
"725"
horizontalCenter=
"0"
width=
"508"
textAlign=
"center"
size=
"28"
/>
<e:Image
id=
"img"
y=
"492"
horizontalCenter=
"0"
touchEnabled=
"true"
source=
"{data.img}"
/>
</e:Skin>
</e:Skin>
\ No newline at end of file
egret/resource/skins/StartSkin.exml
View file @
ba351be5
...
@@ -74,7 +74,7 @@
...
@@ -74,7 +74,7 @@
<e:Image
source=
"toast_png"
x=
"0"
y=
"0"
/>
<e:Image
source=
"toast_png"
x=
"0"
y=
"0"
/>
<e:Label
id=
"toastInfo"
text=
"收集到一个甜筒甜筒"
width=
"100%"
height=
"100%"
verticalAlign=
"middle"
textAlign=
"center"
horizontalCenter=
"0"
verticalCenter=
"0"
size=
"28"
/>
<e:Label
id=
"toastInfo"
text=
"收集到一个甜筒甜筒"
width=
"100%"
height=
"100%"
verticalAlign=
"middle"
textAlign=
"center"
horizontalCenter=
"0"
verticalCenter=
"0"
size=
"28"
/>
</e:Group>
</e:Group>
<e:
Image
id=
"guide"
source=
"dot_png"
x=
"0"
y=
"0"
width=
"750"
height=
"1624"
touchEnabled=
"true"
visible=
"false
"
/>
<e:
Group
id=
"guide"
width=
"750"
height=
"1624"
x=
"0"
y=
"0
"
/>
<e:Label
id=
"exemptionTxt"
text=
"*兑换项与活动均与设备制造商Apple Inc.公司无关*"
width=
"750"
verticalAlign=
"middle"
textAlign=
"center"
size=
"12"
y=
"1609.67"
x=
"0"
textColor=
"0x000000"
/>
<e:Label
id=
"exemptionTxt"
text=
"*兑换项与活动均与设备制造商Apple Inc.公司无关*"
width=
"750"
verticalAlign=
"middle"
textAlign=
"center"
size=
"12"
y=
"1609.67"
x=
"0"
textColor=
"0x000000"
/>
<e:Button
id=
"rightBtn"
label=
""
y=
"1292.31"
scaleX=
"1"
scaleY=
"1"
alpha=
"1"
x=
"550.33"
>
<e:Button
id=
"rightBtn"
label=
""
y=
"1292.31"
scaleX=
"1"
scaleY=
"1"
alpha=
"1"
x=
"550.33"
>
<e:skinName>
<e:skinName>
...
@@ -103,8 +103,8 @@
...
@@ -103,8 +103,8 @@
</e:Skin>
</e:Skin>
</e:skinName>
</e:skinName>
</e:Button>
</e:Button>
<e:
Image
id=
"startBtnBg"
source=
"dot_png"
x=
"0"
y=
"0"
width=
"750"
height=
"1624"
touchEnabled=
"true"
scaleX=
"1"
scaleY=
"1"
visible=
"false
"
/>
<e:
Group
id=
"startBtnBg"
width=
"750"
height=
"1624"
x=
"0"
y=
"0"
anchorOffsetX=
"0"
anchorOffsetY=
"0
"
/>
<e:Button
id=
"startBtn"
label=
""
scaleX=
"1"
scaleY=
"1"
y=
"13
76
"
horizontalCenter=
"0"
visible=
"false"
>
<e:Button
id=
"startBtn"
label=
""
scaleX=
"1"
scaleY=
"1"
y=
"13
19
"
horizontalCenter=
"0"
visible=
"false"
>
<e:skinName>
<e:skinName>
<e:Skin
states=
"up,down,disabled"
>
<e:Skin
states=
"up,down,disabled"
>
<e:Image
width=
"100%"
height=
"100%"
source=
"startbtn_png"
source.down=
"startbtn_png"
source.disabled=
"startbtnGray_png"
/>
<e:Image
width=
"100%"
height=
"100%"
source=
"startbtn_png"
source.down=
"startbtn_png"
source.disabled=
"startbtnGray_png"
/>
...
@@ -112,7 +112,9 @@
...
@@ -112,7 +112,9 @@
</e:Skin>
</e:Skin>
</e:skinName>
</e:skinName>
</e:Button>
</e:Button>
<e:Label
id=
"countTxt"
text=
"0积分每次"
width=
"100%"
verticalAlign=
"middle"
textAlign=
"center"
size=
"19"
y=
"1458.67"
textColor=
"0xffd434"
visible=
"false"
/>
<e:Label
id=
"countTxt"
text=
"0积分每次"
width=
"100%"
verticalAlign=
"middle"
textAlign=
"center"
size=
"26"
y=
"1458.67"
textColor=
"0xffd434"
/>
<e:Image
id=
"toast_failed"
source=
"toast_failed_png"
y=
"1077"
x=
"375.5"
alpha=
"0"
anchorOffsetX=
"256.5"
anchorOffsetY=
"86"
touchEnabled=
"false"
/>
<e:Image
id=
"toast_success"
source=
"toast_success_png"
y=
"1101"
x=
"375.5"
alpha=
"0"
anchorOffsetX=
"254.5"
anchorOffsetY=
"99"
touchEnabled=
"false"
/>
</e:Group>
</e:Group>
<e:Button
id=
"recordBtn"
label=
"奖品记录"
y=
"16"
scaleX=
"1"
scaleY=
"1"
right=
"23"
visible=
"false"
>
<e:Button
id=
"recordBtn"
label=
"奖品记录"
y=
"16"
scaleX=
"1"
scaleY=
"1"
right=
"23"
visible=
"false"
>
<e:skinName>
<e:skinName>
...
@@ -148,5 +150,5 @@
...
@@ -148,5 +150,5 @@
</e:Skin>
</e:Skin>
</e:skinName>
</e:skinName>
</e:Button>
</e:Button>
<e:Image
id=
"boomalert"
source=
"boomalert_png"
x=
"0"
y=
"0"
scale9Grid=
"314,472,142,220"
alpha=
"
0"
touchEnabled=
"false"
locked=
"tru
e"
/>
<e:Image
id=
"boomalert"
source=
"boomalert_png"
x=
"0"
y=
"0"
scale9Grid=
"314,472,142,220"
alpha=
"
1"
touchEnabled=
"false"
visible=
"fals
e"
/>
</e:Skin>
</e:Skin>
\ No newline at end of file
egret/src/panels/BoomPrizePanel.ts
View file @
ba351be5
import
showPlugLog
from
"../../libs/new_tw/ctrls/showPlugLog"
;
import
Panel
from
"../../libs/new_wx/components/Panel"
;
import
Panel
from
"../../libs/new_wx/components/Panel"
;
import
{
LotteryType
}
from
"../../libs/tw/enum/LotteryType"
;
import
{
DataManager
}
from
"../../libs/tw/manager/DataManager"
;
import
{
NetManager
}
from
"../../libs/tw/manager/NetManager"
;
export
default
class
BoomPrizePanel
extends
Panel
{
export
default
class
BoomPrizePanel
extends
Panel
{
start
(
data
)
{
const
lottery
=
DataManager
.
ins
.
getPlugOrderStatusData
.
lottery
;
this
.
data
=
lottery
;
this
.
img
.
width
=
this
.
picBigWidth
;
this
.
img
.
height
=
this
.
picBigWidth
/
this
.
bigPicRatio
;
showPlugLog
(
lottery
);
}
initEvents
()
{
super
.
initEvents
();
this
.
useBtn
.
once
(
egret
.
TouchEvent
.
TOUCH_TAP
,
this
.
onUse
,
this
);
this
.
img
.
once
(
egret
.
TouchEvent
.
TOUCH_TAP
,
this
.
onUse
,
this
);
}
onUse
()
{
const
lottery
=
DataManager
.
ins
.
getPlugOrderStatusData
.
lottery
;
if
(
lottery
.
type
==
LotteryType
.
COUPON
||
lottery
.
type
==
LotteryType
.
LUCKY
)
{
window
[
"downloadAppConfig"
]
=
{
openUrl
:
lottery
.
openUrl
,
iosDownloadUrl
:
lottery
.
iosDownloadUrl
,
androidDownloadUrl
:
lottery
.
androidDownloadUrl
,
confirm
:
lottery
.
confirm
?
lottery
.
confirm
:
false
};
window
[
"downloadApp"
]();
if
(
lottery
.
type
==
"lucky"
)
{
NetManager
.
ins
.
spmclick
(
DataManager
.
ins
.
gameGetSubmitResultData
.
exposure
);
}
}
else
{
window
.
location
.
href
=
lottery
.
link
;
}
}
get
picBigWidth
()
{
return
510
};
get
bigPicRatio
()
{
return
640
/
300
}
get
skinKey
()
{
return
'BoomPrize'
}
get
skinKey
()
{
return
'BoomPrize'
}
img
:
eui
.
Image
;
useBtn
:
eui
.
Button
;
protected
get
closeBtns
():
eui
.
Button
[]
{
return
[
this
[
'closeBtn'
]]
}
}
}
\ No newline at end of file
egret/src/panels/CashBigPrize.ts
View file @
ba351be5
import
Panel
from
"../../libs/new_wx/components/Panel"
;
import
Panel
from
"../../libs/new_wx/components/Panel"
;
import
BoomPrizePanel
from
"./BoomPrizePanel"
;
export
default
class
CashBigPrizePanel
extends
Panel
{
export
default
class
CashBigPrizePanel
extends
BoomPrizePanel
{
get
picBigWidth
()
{
return
510
+
30
+
20
};
get
skinKey
()
{
return
'CashBigPrize'
}
get
skinKey
()
{
return
'CashBigPrize'
}
}
}
\ No newline at end of file
egret/src/panels/CashPrizePanel.ts
View file @
ba351be5
import
Panel
from
"../../libs/new_wx/components/Panel"
;
import
Panel
from
"../../libs/new_wx/components/Panel"
;
import
CashBigPrizePanel
from
"./CashBigPrize"
;
export
default
class
CashPrizePanel
extends
Panel
{
export
default
class
CashPrizePanel
extends
CashBigPrizePanel
{
get
picBigWidth
()
{
return
510
+
30
+
20
};
get
skinKey
()
{
return
'CashPrize'
}
get
skinKey
()
{
return
'CashPrize'
}
}
}
\ No newline at end of file
egret/src/startScene/StartScene.ts
View file @
ba351be5
import
Panel
from
"../../libs/new_wx/components/Panel"
;
import
StartSceneBase
from
"../../libs/new_wx/components/StartSceneBase"
;
import
StartSceneBase
from
"../../libs/new_wx/components/StartSceneBase"
;
import
PanelCtrl
from
"../../libs/new_wx/ctrls/panelCtrl"
;
import
{
ModuleTypes
}
from
"../../libs/new_wx/types/sceneTypes"
;
import
EgretRender
from
"../physics/EgretRender"
;
import
EgretRender
from
"../physics/EgretRender"
;
import
getAngle
from
"../physics/utils/getAngle"
;
import
getAngle
from
"../physics/utils/getAngle"
;
import
getRotation
from
"../physics/utils/getRotation"
;
import
getRotation
from
"../physics/utils/getRotation"
;
...
@@ -6,10 +9,8 @@ import check from "./check";
...
@@ -6,10 +9,8 @@ import check from "./check";
import
check2
from
"./check2"
;
import
check2
from
"./check2"
;
import
createBox
from
"./createBox"
;
import
createBox
from
"./createBox"
;
import
createItems
from
"./createItems"
;
import
createItems
from
"./createItems"
;
import
{
initLevel
,
isAllLevelPass
}
from
"./level"
;
import
{
initLevel
,
resetLevel
,
updateLevelView
}
from
"./level"
;
import
Panel
from
"../../libs/new_wx/components/Panel"
;
import
{
playToastSuccess
}
from
"./playMovieClip"
;
import
PanelCtrl
from
"../../libs/new_wx/ctrls/panelCtrl"
;
import
wait
from
"../../libs/new_tc/wait"
;
export
default
class
StartScene
extends
StartSceneBase
{
export
default
class
StartScene
extends
StartSceneBase
{
_engine
:
Matter
.
Engine
;
_engine
:
Matter
.
Engine
;
...
@@ -112,16 +113,6 @@ export default class StartScene extends StartSceneBase {
...
@@ -112,16 +113,6 @@ export default class StartScene extends StartSceneBase {
.
set
({
alpha
:
1
}).
wait
(
freq
);
.
set
({
alpha
:
1
}).
wait
(
freq
);
}
}
// async initJoker(joker: eui.Image) {
// const freq = 3000*2;
// egret.Tween.get(joker)
// .to({ rotation: -40 }, freq/2, egret.Ease.quadInOut);
// await wait(freq/2);
// egret.Tween.get(joker, { loop: true })
// .to({ rotation: 40 }, freq, egret.Ease.quadInOut)
// .to({ rotation: -40 }, freq, egret.Ease.quadInOut);
// }
_seesaw
:
Matter
.
Body
;
_seesaw
:
Matter
.
Body
;
async
runGame
()
{
async
runGame
()
{
const
{
seesaw
}
=
createBox
(
this
);
const
{
seesaw
}
=
createBox
(
this
);
...
@@ -182,6 +173,32 @@ export default class StartScene extends StartSceneBase {
...
@@ -182,6 +173,32 @@ export default class StartScene extends StartSceneBase {
egret
.
stopTick
(
ontick
,
this
);
egret
.
stopTick
(
ontick
,
this
);
},
this
);
},
this
);
});
});
PanelCtrl
.
instance
.
addEventListener
(
'onPanelRemoved'
,
this
.
onPanelRemoved
,
this
);
const
createMask
=
()
=>
{
const
s
=
new
egret
.
Sprite
();
s
.
graphics
.
beginFill
(
0
,
0.7
);
s
.
graphics
.
drawRect
(
0
,
0
,
750
,
1624
);
s
.
graphics
.
endFill
();
return
s
}
this
[
'guide'
].
addChild
(
createMask
())
this
[
'startBtnBg'
].
addChild
(
createMask
())
}
async
onPanelRemoved
(
e
:
egret
.
Event
)
{
const
panel
=
e
.
data
.
panel
as
Panel
;
if
(
panel
.
type
==
ModuleTypes
.
BoomNoPrizePanel
||
panel
.
type
==
ModuleTypes
.
BoomPrizePanel
)
{
await
updateLevelView
(
false
);
await
playToastSuccess
(
this
,
0
);
createItems
(
this
);
}
else
if
(
panel
.
type
==
ModuleTypes
.
CashBigPrize
||
panel
.
type
==
ModuleTypes
.
CashNoPrizePanel
||
panel
.
type
==
ModuleTypes
.
CashPrizePanel
)
{
resetLevel
();
this
[
'startBtnBg'
].
visible
=
this
[
'startBtn'
].
visible
=
this
[
'countTxt'
].
visible
=
true
;
this
.
updateStartBtnStatus
();
this
.
updateCountTxt
();
}
}
}
runEngine
()
{
runEngine
()
{
...
...
egret/src/startScene/check.ts
View file @
ba351be5
import
wait
from
"../../libs/new_tc/wait"
;
import
plugDoJoin
from
"../../libs/new_tw/ctrls/doPluginJoin"
;
import
plugIsWinning
from
"../../libs/new_tw/datas/plugIsWinning"
;
import
Loading
from
"../../libs/new_wx/components/Loading"
;
import
PanelCtrl
from
"../../libs/new_wx/ctrls/panelCtrl"
;
import
{
ModuleTypes
}
from
"../../libs/new_wx/types/sceneTypes"
;
import
{
award
}
from
"./collisionConfig"
;
import
{
award
}
from
"./collisionConfig"
;
import
{
stopCreateItems
}
from
"./createItems"
;
import
LabelType
from
"./LabelType"
;
import
LabelType
from
"./LabelType"
;
import
{
addItem
,
isAllLevelPass
,
isLevelPass
,
nextLevel
,
clearLevel
}
from
"./level"
;
import
{
addItem
,
clearLevel
,
isAllLevelPass
,
isLevelPass
,
nextLevel
}
from
"./level"
;
import
{
playBoom
,
playBoomAlert
,
playSuccess
,
playToast
,
playToastSuccess
}
from
"./playMovieClip"
;
import
StartScene
from
"./StartScene"
;
import
StartScene
from
"./StartScene"
;
import
vibrate
from
"./vibrate"
;
import
vibrate
from
"./vibrate"
;
import
{
playBoom
,
playSuccess
,
playToast
,
playBoomAlert
}
from
"./playMovieClip"
;
import
{
DataManager
}
from
"../../libs/tw/manager/DataManager"
;
import
{
stopCreateItems
}
from
"./createItems"
;
import
{
LotteryType
}
from
"../../libs/tw/enum/LotteryType"
;
import
wait
from
"../../libs/new_tc/wait"
;
import
PanelCtrl
from
"../../libs/new_wx/ctrls/panelCtrl"
;
import
{
ModuleTypes
}
from
"../../libs/new_wx/types/sceneTypes"
;
import
plugDoJoin
from
"../../libs/new_tw/ctrls/doPluginJoin"
;
import
plugIsWinning
from
"../../libs/new_tw/datas/plugIsWinning"
;
const
removeAward
=
(
_this
:
StartScene
)
=>
{
const
removeAward
=
(
_this
:
StartScene
)
=>
{
const
bodies
=
Matter
.
Composite
.
allBodies
(
_this
.
_engine
.
world
);
const
bodies
=
Matter
.
Composite
.
allBodies
(
_this
.
_engine
.
world
);
...
@@ -87,12 +90,15 @@ const check = (_this: StartScene) => {
...
@@ -87,12 +90,15 @@ const check = (_this: StartScene) => {
playBoom
(
_this
[
'group'
]);
playBoom
(
_this
[
'group'
]);
removeAward
(
_this
);
removeAward
(
_this
);
stopCreateItems
();
stopCreateItems
();
await
wait
(
700
);
Loading
.
instace
.
show
();
plugDoJoin
(()
=>
{
plugDoJoin
(()
=>
{
Loading
.
instace
.
hide
();
if
(
plugIsWinning
())
if
(
plugIsWinning
())
PanelCtrl
.
instance
.
show
(
ModuleTypes
.
BoomPrizePanel
);
PanelCtrl
.
instance
.
show
(
ModuleTypes
.
BoomPrizePanel
);
else
else
PanelCtrl
.
instance
.
show
(
ModuleTypes
.
BoomNoPrizePanel
);
PanelCtrl
.
instance
.
show
(
ModuleTypes
.
BoomNoPrizePanel
);
},
4039
);
},
window
[
'pluginID'
]
);
}
}
}
}
else
{
else
{
...
@@ -103,7 +109,23 @@ const check = (_this: StartScene) => {
...
@@ -103,7 +109,23 @@ const check = (_this: StartScene) => {
if
(
isLevelPass
())
{
if
(
isLevelPass
())
{
if
(
isAllLevelPass
())
{
if
(
isAllLevelPass
())
{
stopCreateItems
();
stopCreateItems
();
removeAward
(
_this
);
Loading
.
instace
.
show
();
plugDoJoin
(()
=>
{
Loading
.
instace
.
hide
();
if
(
plugIsWinning
())
{
if
(
DataManager
.
ins
.
getPlugOrderStatusData
.
lottery
.
type
==
LotteryType
.
OBJECT
)
PanelCtrl
.
instance
.
show
(
ModuleTypes
.
CashBigPrize
);
else
PanelCtrl
.
instance
.
show
(
ModuleTypes
.
CashPrizePanel
);
}
else
PanelCtrl
.
instance
.
show
(
ModuleTypes
.
CashNoPrizePanel
);
},
window
[
'pluginBigPrizeID'
]);
}
else
{
}
else
{
playToastSuccess
(
_this
)
nextLevel
();
nextLevel
();
}
}
}
}
...
...
egret/src/startScene/createItems.ts
View file @
ba351be5
...
@@ -29,7 +29,7 @@ const ontick = () => {
...
@@ -29,7 +29,7 @@ const ontick = () => {
else
if
(
tags
==
2
)
{
else
if
(
tags
==
2
)
{
frameInterval
=
60
;
frameInterval
=
60
;
}
}
// i=
1
// i=
4;
const
type
=
types
[
i
];
const
type
=
types
[
i
];
let
body
;
let
body
;
if
(
type
==
LabelType
.
Candy2
)
{
if
(
type
==
LabelType
.
Candy2
)
{
...
...
egret/src/startScene/level.ts
View file @
ba351be5
...
@@ -15,7 +15,6 @@ let currentLv;
...
@@ -15,7 +15,6 @@ let currentLv;
const
datastr
=
localStorage
.
getItem
(
'data'
);
const
datastr
=
localStorage
.
getItem
(
'data'
);
let
data
=
datastr
?
JSON
.
parse
(
datastr
)
:
{};
let
data
=
datastr
?
JSON
.
parse
(
datastr
)
:
{};
;
const
currentLvstr
=
localStorage
.
getItem
(
'currentLv'
);
const
currentLvstr
=
localStorage
.
getItem
(
'currentLv'
);
currentLv
=
currentLvstr
?
currentLvstr
:
groups
[
0
];
currentLv
=
currentLvstr
?
currentLvstr
:
groups
[
0
];
...
@@ -28,6 +27,18 @@ export const initLevel = ($that: StartScene) => {
...
@@ -28,6 +27,18 @@ export const initLevel = ($that: StartScene) => {
updateLevelView
(
false
);
updateLevelView
(
false
);
}
}
export
const
resetLevel
=
()
=>
{
resetData
();
updateLevelView
(
false
)
}
export
const
resetData
=
()
=>
{
data
=
{};
currentLv
=
groups
[
0
];
localStorage
.
setItem
(
'data'
,
'{}'
);
localStorage
.
setItem
(
'currentLv'
,
groups
[
0
])
}
export
const
isLevelPass
=
()
=>
{
export
const
isLevelPass
=
()
=>
{
return
getProgress
(
currentLv
)
==
MAX
return
getProgress
(
currentLv
)
==
MAX
}
}
...
@@ -53,7 +64,7 @@ export const addItem = async (type) => {
...
@@ -53,7 +64,7 @@ export const addItem = async (type) => {
export
const
clearLevel
=
()
=>
{
export
const
clearLevel
=
()
=>
{
data
[
currentLv
]
=
0
;
data
[
currentLv
]
=
0
;
localStorage
.
setItem
(
'data'
,
JSON
.
stringify
(
data
));
localStorage
.
setItem
(
'data'
,
JSON
.
stringify
(
data
));
updateLevelView
(
false
);
//
updateLevelView(false);
}
}
export
const
nextLevel
=
()
=>
{
export
const
nextLevel
=
()
=>
{
...
@@ -67,9 +78,9 @@ export const getCurrentLv = () => { return currentLv }
...
@@ -67,9 +78,9 @@ export const getCurrentLv = () => { return currentLv }
export
const
getCurrentName
=
()
=>
{
return
groupName
[
currentLv
]
}
export
const
getCurrentName
=
()
=>
{
return
groupName
[
currentLv
]
}
const
updateLevelView
=
async
(
add
)
=>
{
export
const
updateLevelView
=
async
(
add
)
=>
{
hideAllGroup
();
hideAllGroup
();
that
[
'awardDisabled'
].
visible
=
that
[
'award'
].
visible
=
!
isAllLevelPass
();
that
[
'awardDisabled'
].
visible
=
that
[
'award'
].
visible
=
!
isAllLevelPass
();
that
[
currentLv
].
visible
=
true
;
that
[
currentLv
].
visible
=
true
;
that
[
'condition'
].
text
=
`本轮需获3个
${
groupName
[
currentLv
]}
`
that
[
'condition'
].
text
=
`本轮需获3个
${
groupName
[
currentLv
]}
`
...
@@ -88,7 +99,7 @@ const updateLevelView = async (add) => {
...
@@ -88,7 +99,7 @@ const updateLevelView = async (add) => {
that
[
'condition'
].
filters
=
[
glowFilter
];
that
[
'condition'
].
filters
=
[
glowFilter
];
}
}
await
setProgress
(
currentLv
,
getProgress
(
currentLv
),
add
);
await
setProgress
(
currentLv
,
getProgress
(
currentLv
),
add
);
updateProgressBar
();
await
updateProgressBar
();
}
}
const
getProgress
=
(
type
)
=>
{
const
getProgress
=
(
type
)
=>
{
...
@@ -176,12 +187,15 @@ const initProgressBar = () => {
...
@@ -176,12 +187,15 @@ const initProgressBar = () => {
}
}
const
updateProgressBar
=
()
=>
{
const
updateProgressBar
=
()
=>
{
const
progressfg
=
that
[
'progressfg'
];
return
new
Promise
((
r
)
=>
{
let
counter
=
0
;
const
progressfg
=
that
[
'progressfg'
];
for
(
const
group
of
groups
)
{
let
counter
=
0
;
counter
+=
getProgress
(
group
);
for
(
const
group
of
groups
)
{
}
counter
+=
getProgress
(
group
);
const
targetWidth
=
558
*
(
counter
/
groups
.
length
/
3
);
}
egret
.
Tween
.
removeTweens
(
progressfg
.
mask
);
const
targetWidth
=
558
*
(
counter
/
groups
.
length
/
3
);
egret
.
Tween
.
get
(
progressfg
.
mask
).
to
({
width
:
targetWidth
},
200
);
egret
.
Tween
.
removeTweens
(
progressfg
.
mask
);
egret
.
Tween
.
get
(
progressfg
.
mask
).
to
({
width
:
targetWidth
},
200
).
call
(
r
);
})
}
}
\ No newline at end of file
egret/src/startScene/playMovieClip.ts
View file @
ba351be5
...
@@ -105,15 +105,31 @@ const createText = (score: number) => {
...
@@ -105,15 +105,31 @@ const createText = (score: number) => {
export
const
playBoomAlert
=
(
that
)
=>
{
export
const
playBoomAlert
=
(
that
)
=>
{
const
p1
=
200
;
const
p1
=
200
;
egret
.
Tween
.
removeTweens
(
that
[
'boomalert'
]);
egret
.
Tween
.
removeTweens
(
that
[
'boomalert'
]);
that
[
'boomalert'
].
visible
=
true
;
egret
.
Tween
.
get
(
that
[
'boomalert'
])
egret
.
Tween
.
get
(
that
[
'boomalert'
])
.
set
({
alpha
:
1
}).
wait
(
p1
)
.
set
({
alpha
:
1
}).
wait
(
p1
)
.
set
({
alpha
:
0
}).
wait
(
p1
)
.
set
({
alpha
:
0
}).
wait
(
p1
)
.
set
({
alpha
:
1
}).
wait
(
p1
)
.
set
({
alpha
:
1
}).
wait
(
p1
)
.
set
({
alpha
:
0
}).
wait
(
p1
)
.
set
({
alpha
:
0
}).
wait
(
p1
)
.
call
(()
=>
{
that
[
'boomalert'
].
visible
=
false
})
// .set({ alpha: 1 }).wait(p1)
// .set({ alpha: 1 }).wait(p1)
// .set({ alpha: 0 }).wait(p1)
// .set({ alpha: 0 }).wait(p1)
}
}
export
const
playToastSuccess
=
(
that
,
isSuccess
=
1
)
=>
{
return
new
Promise
((
r
)
=>
{
egret
.
Tween
.
get
(
that
[
isSuccess
?
'toast_success'
:
'toast_failed'
]).
set
({
alpha
:
1
,
scaleX
:
0
,
scaleY
:
0
}).
to
({
scaleX
:
1
,
scaleY
:
1
},
300
,
egret
.
Ease
.
getBackOut
(
5
)).
wait
(
300
)
.
to
({
alpha
:
0
},
100
).
call
(
r
);
})
}
// export const playToastFailed = (that) => {
// return new Promise((r) => {
// egret.Tween.get(that['toast_failed']).set({ alpha: 1, scaleX: 0, scaleY: 0 }).to({ scaleX: 1, scaleY: 1 }, 300, egret.Ease.backOut).wait(200)
// .to({ alpha: 0 }, 100).call(r);
// })
// }
export
const
playToast
=
(
that
,
type
,
isLeft
)
=>
{
export
const
playToast
=
(
that
,
type
,
isLeft
)
=>
{
//toastGroup toastInfo
//toastGroup toastInfo
let
txt
=
''
;
let
txt
=
''
;
...
@@ -121,7 +137,7 @@ export const playToast = (that, type, isLeft) => {
...
@@ -121,7 +137,7 @@ export const playToast = (that, type, isLeft) => {
if
(
isLeft
)
{
if
(
isLeft
)
{
if
(
type
==
LabelType
.
Boom
)
{
if
(
type
==
LabelType
.
Boom
)
{
txt
=
`很棒!躲避了炸弹!`
;
txt
=
`很棒!躲避了炸弹!`
;
}
}
}
else
{
}
else
{
if
(
type
!=
LabelType
.
Boom
)
{
if
(
type
!=
LabelType
.
Boom
)
{
if
(
currentType
==
type
)
{
if
(
currentType
==
type
)
{
...
...
mock/json/getPlugOrderStatus.json
View file @
ba351be5
{
{
"result"
:
1
,
"result"
:
2
,
"lotteryCode"
:
1
,
"exposure"
:
{
"activityId"
:
4039
,
"activityUseType"
:
"0"
,
"advertId"
:
29945
,
"appId"
:
1
,
"consumerId"
:
1
,
"dcm"
:
"104.29945.0.0"
,
"domain"
:
"//activity.tuistone.com"
,
"dpm"
:
"1.4.1.0"
,
"ip"
:
"124.160.32.2"
,
"isEmbed"
:
true
,
"materialId"
:
36844
,
"orderId"
:
"plugin_858561604043570001"
,
"os"
:
"iPhone"
},
"success"
:
true
,
"success"
:
true
,
"lottery"
:
{
"lottery"
:
{
"androidDownloadUrl"
:
"//trade.m.duiba.com.cn"
,
"androidDownloadUrl"
:
"//activity.tuistone.com/activity/redirect?orderId=plugin_858561604043570001&activityId=4039&appId=1&consumerId=1&materialId=36844&os=iPhone&advertId=29945&ip=124.160.32.2&activityUseType=0&dpm=1.4.1.0&dcm=104.29945.0.0&device_type=duiba&url=https%3A%2F%2Fvip.bangdata.cn%2Fi%2Fvaqbmgqj9r%2Forder"
,
"coupon_code"
:
"123456"
,
"id"
:
18554
,
"st_info"
:
"{
\"
info_type
\"
:
\"
1
\"
,
\"
os
\"
:
\"
1
\"
,
\"
login_type
\"
:1,
\"
item_id
\"
:31164,
\"
isEmbed
\"
:true,
\"
button_type
\"
:
\"
70004
\"
,
\"
ip
\"
:
\"
115.238.95.186
\"
,
\"
consumer_id
\"
:1,
\"
duiba_activity_id
\"
:350,
\"
domain
\"
:
\"
//embedlog.duiba.com.cn
\"
,
\"
activity_type
\"
:
\"
7
\"
,
\"
activity_id
\"
:350,
\"
app_id
\"
:1,
\"
info
\"
:
\"
355045189855250001
\"
}"
,
"imgurl"
:
"//yun.duiba.com.cn/babi/img/461wa4f0bb.jpg"
,
"link"
:
"//trade.m.duiba.com.cn/crecord/recordDetailNew?orderId=355045190182920001&after=1&dbnewopen&dpm=1.4.3.0&dcm=101.31164.0.0&pluginId=350"
,
"iosDownloadUrl"
:
"//activity.tuistone.com/activity/redirect?orderId=plugin_858561604043570001&activityId=4039&appId=1&consumerId=1&materialId=36844&os=iPhone&advertId=29945&ip=124.160.32.2&activityUseType=0&dpm=1.4.1.0&dcm=104.29945.0.0&device_type=duiba&url=https%3A%2F%2Fvip.bangdata.cn%2Fi%2Fvaqbmgqj9r%2Forder"
,
"useBtnText"
:
"查看使用方法"
,
"isAppHidden"
:
false
,
"st_info_close"
:
"{
\"
info_type
\"
:
\"
1
\"
,
\"
os
\"
:
\"
1
\"
,
\"
login_type
\"
:1,
\"
item_id
\"
:31164,
\"
isEmbed
\"
:true,
\"
button_type
\"
:
\"
70005
\"
,
\"
ip
\"
:
\"
115.238.95.186
\"
,
\"
consumer_id
\"
:1,
\"
duiba_activity_id
\"
:350,
\"
domain
\"
:
\"
//embedlog.duiba.com.cn
\"
,
\"
activity_type
\"
:
\"
7
\"
,
\"
activity_id
\"
:350,
\"
app_id
\"
:1,
\"
info
\"
:
\"
355045189855250001
\"
}"
,
"isDownloadUrl"
:
true
,
"st_info_expouse"
:
"{
\"
info_type
\"
:
\"
1
\"
,
\"
os
\"
:
\"
1
\"
,
\"
login_type
\"
:1,
\"
item_id
\"
:31164,
\"
isEmbed
\"
:true,
\"
button_type
\"
:
\"
70001
\"
,
\"
ip
\"
:
\"
115.238.95.186
\"
,
\"
consumer_id
\"
:1,
\"
duiba_activity_id
\"
:350,
\"
domain
\"
:
\"
//embedlog.duiba.com.cn
\"
,
\"
activity_type
\"
:
\"
7
\"
,
\"
activity_id
\"
:350,
\"
app_id
\"
:1,
\"
info
\"
:
\"
355045189855250001
\"
}"
,
"link"
:
"//activity.m.duiba.com.cn/crecord/recordLuckDetailNew?id=5296779438&locationId=1&dpm=1.4.3.0&dcm=104.29945.0.0&pluginId=4039"
,
"type"
:
"coupon"
,
"linkTo"
:
0
,
"title"
:
"重复券测试grape"
,
"openUrl"
:
""
,
"st_info_detail"
:
"{
\"
info_type
\"
:
\"
1
\"
,
\"
os
\"
:
\"
1
\"
,
\"
login_type
\"
:1,
\"
item_id
\"
:31164,
\"
isEmbed
\"
:true,
\"
button_type
\"
:
\"
70002
\"
,
\"
ip
\"
:
\"
115.238.95.186
\"
,
\"
consumer_id
\"
:1,
\"
duiba_activity_id
\"
:350,
\"
domain
\"
:
\"
//embedlog.duiba.com.cn
\"
,
\"
activity_type
\"
:
\"
7
\"
,
\"
activity_id
\"
:350,
\"
app_id
\"
:1,
\"
info
\"
:
\"
355045189855250001
\"
}"
,
"confirm"
:
false
,
"openUrl"
:
"//trade.m.duiba.com.cn/crecord/recordDetailNew?id=355045190182920001&after=1&dbnewopen&dpm=1.4.2.0&dcm=101.31164.0.0"
,
"imgurl"
:
"//yun.duiba.com.cn/images/201607/73htz55ih9.jpg"
,
"showUse"
:
true
,
"showUse"
:
true
,
"st_info_dpm_close"
:
"{
\"
dpm
\"
:
\"
1.4.4.0
\"
,
\"
consumerId
\"
:1,
\"
domain
\"
:
\"
//
embedlog.duiba.com.cn
\"
,
\"
appId
\"
:1,
\"
dcm
\"
:
\"
101.31164
.0.0
\"
}"
,
"st_info_dpm_close"
:
"{
\"
dpm
\"
:
\"
1.4.4.0
\"
,
\"
consumerId
\"
:1,
\"
domain
\"
:
\"
//
activity.m.duiba.com.cn
\"
,
\"
appId
\"
:1,
\"
dcm
\"
:
\"
104.29945
.0.0
\"
}"
,
"
iosDownloadUrl"
:
"//trade.m.duiba.com.cn
"
,
"
st_info_dpm_go_use"
:
"{
\"
dpm
\"
:
\"
1.4.1.0
\"
,
\"
consumerId
\"
:1,
\"
domain
\"
:
\"
//activity.m.duiba.com.cn
\"
,
\"
appId
\"
:1,
\"
dcm
\"
:
\"
104.29945.0.0
\"
}
"
,
"st_info_dpm_img"
:
"{
\"
dpm
\"
:
\"
1.4.
2.0
\"
,
\"
consumerId
\"
:1,
\"
domain
\"
:
\"
//embedlog.duiba.com.cn
\"
,
\"
appId
\"
:1,
\"
dcm
\"
:
\"
101.31164
.0.0
\"
}"
,
"st_info_dpm_img"
:
"{
\"
dpm
\"
:
\"
1.4.
1.0
\"
,
\"
consumerId
\"
:1,
\"
domain
\"
:
\"
//activity.m.duiba.com.cn
\"
,
\"
appId
\"
:1,
\"
dcm
\"
:
\"
104.29945
.0.0
\"
}"
,
"tip"
:
""
,
"tip"
:
"
一句话描述
"
,
"
id"
:
38852
,
"
title"
:
"腾讯视频会员8.8折"
,
"
coupon_key"
:
"111
"
,
"
type"
:
"lucky
"
,
"
st_info_use"
:
"{
\"
info_type
\"
:
\"
1
\"
,
\"
os
\"
:
\"
1
\"
,
\"
login_type
\"
:1,
\"
item_id
\"
:31164,
\"
isEmbed
\"
:true,
\"
button_type
\"
:
\"
40003
\"
,
\"
ip
\"
:
\"
115.238.95.186
\"
,
\"
consumer_id
\"
:1,
\"
duiba_activity_id
\"
:350,
\"
domain
\"
:
\"
//embedlog.duiba.com.cn
\"
,
\"
activity_type
\"
:
\"
7
\"
,
\"
activity_id
\"
:350,
\"
app_id
\"
:1,
\"
info
\"
:
\"
355045189855250001
\"
}
"
,
"
useBtnText"
:
"马上使用
"
,
"validate"
:
"20
20-04-01"
,
"validate"
:
"20
19-12-31"
"st_info_pic"
:
"{
\"
info_type
\"
:
\"
1
\"
,
\"
os
\"
:
\"
1
\"
,
\"
login_type
\"
:1,
\"
item_id
\"
:31164,
\"
isEmbed
\"
:true,
\"
button_type
\"
:
\"
70003
\"
,
\"
ip
\"
:
\"
115.238.95.186
\"
,
\"
consumer_id
\"
:1,
\"
duiba_activity_id
\"
:350,
\"
domain
\"
:
\"
//embedlog.duiba.com.cn
\"
,
\"
activity_type
\"
:
\"
7
\"
,
\"
activity_id
\"
:350,
\"
app_id
\"
:1,
\"
info
\"
:
\"
355045189855250001
\"
}"
},
}
"takeSuccess"
:
false
}
}
\ No newline at end of file
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