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
1ebab6a7
Commit
1ebab6a7
authored
Dec 20, 2018
by
wildfirecode
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
f82337a0
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
33 additions
and
3 deletions
+33
-3
doPluginJoin.ts
egret/libs/new_tw/ctrls/doPluginJoin.ts
+1
-1
plugIsWinning.ts
egret/libs/new_tw/datas/plugIsWinning.ts
+10
-0
check.ts
egret/src/startScene/check.ts
+22
-2
No files found.
egret/libs/new_tw/ctrls/doPluginJoin.ts
View file @
1ebab6a7
...
@@ -26,4 +26,4 @@ const plugDoJoin = (callback: Function, plugId: number) => {
...
@@ -26,4 +26,4 @@ const plugDoJoin = (callback: Function, plugId: number) => {
},
plugId
);
},
plugId
);
}
}
export
default
plugDoJoin
egret/libs/new_tw/datas/plugIsWinning.ts
0 → 100644
View file @
1ebab6a7
import
{
DataManager
}
from
"../../tw/manager/DataManager"
;
/**
* 插件结果弹窗
*/
const
plugIsWinning
=
():
boolean
=>
{
return
DataManager
.
ins
.
getPlugOrderStatusData
.
lottery
?
true
:
false
;
}
export
default
plugIsWinning
\ No newline at end of file
egret/src/startScene/check.ts
View file @
1ebab6a7
...
@@ -5,6 +5,19 @@ import StartScene from "./StartScene";
...
@@ -5,6 +5,19 @@ import StartScene from "./StartScene";
import
vibrate
from
"./vibrate"
;
import
vibrate
from
"./vibrate"
;
import
{
playBoom
,
playSuccess
,
playToast
,
playBoomAlert
}
from
"./playMovieClip"
;
import
{
playBoom
,
playSuccess
,
playToast
,
playBoomAlert
}
from
"./playMovieClip"
;
import
{
stopCreateItems
}
from
"./createItems"
;
import
{
stopCreateItems
}
from
"./createItems"
;
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
bodies
=
Matter
.
Composite
.
allBodies
(
_this
.
_engine
.
world
);
const
isAward
=
(
i
:
Matter
.
Body
)
=>
{
return
i
.
collisionFilter
.
group
==
award
};
bodies
.
forEach
(
i
=>
{
if
(
isAward
(
i
))
_this
.
_egretRender
.
remove
(
i
);
});
}
const
check
=
(
_this
:
StartScene
)
=>
{
const
check
=
(
_this
:
StartScene
)
=>
{
const
center
=
109
-
40
;
const
center
=
109
-
40
;
...
@@ -71,9 +84,16 @@ const check = (_this: StartScene) => {
...
@@ -71,9 +84,16 @@ const check = (_this: StartScene) => {
clearLevel
();
clearLevel
();
vibrate
(
_this
,
2
);
vibrate
(
_this
,
2
);
playBoomAlert
(
_this
)
playBoomAlert
(
_this
)
playBoom
(
_this
[
'group'
])
playBoom
(
_this
[
'group'
]);
removeAward
(
_this
);
stopCreateItems
();
plugDoJoin
(()
=>
{
if
(
plugIsWinning
())
PanelCtrl
.
instance
.
show
(
ModuleTypes
.
BoomPrizePanel
);
else
PanelCtrl
.
instance
.
show
(
ModuleTypes
.
BoomNoPrizePanel
);
},
4039
);
}
}
}
}
else
{
else
{
if
(
xResult2
&&
yResult2
)
{
if
(
xResult2
&&
yResult2
)
{
...
...
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