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
e5156445
Commit
e5156445
authored
Feb 04, 2021
by
wjf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
l
parent
c71edfec
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
3 deletions
+11
-3
PlayScene.ts
src/scene/PlayScene.ts
+11
-3
No files found.
src/scene/PlayScene.ts
View file @
e5156445
...
@@ -349,7 +349,7 @@ export class PlayScene extends Scene {
...
@@ -349,7 +349,7 @@ export class PlayScene extends Scene {
* 加载所有用到的svga
* 加载所有用到的svga
* 重写,变成其他动画
* 重写,变成其他动画
*/
*/
async
initSvgas
()
{
async
initSvgas
()
{
//这里加载资源吧
//这里加载资源吧
await
RES
.
loadGroup
(
"bonusTime"
)
await
RES
.
loadGroup
(
"bonusTime"
)
var
bonusTime
=
new
Lottie
(
bonus_lottie
)
var
bonusTime
=
new
Lottie
(
bonus_lottie
)
...
@@ -394,7 +394,7 @@ export class PlayScene extends Scene {
...
@@ -394,7 +394,7 @@ export class PlayScene extends Scene {
this
.
addChild
(
this
.
elementContainer
);
this
.
addChild
(
this
.
elementContainer
);
//加遮罩,大遮罩一直都加,小遮罩时时判断
//加遮罩,大遮罩一直都加,小遮罩时时判断
var
mask
=
drawShape
(
path
);
var
mask
=
drawShape
(
path
);
mask
.
hitTestByPixel
=
false
;
//临时加上,可能导致点击区域问题,再说,引擎兼容
mask
.
hitTestByPixel
=
false
;
//临时加上,可能导致点击区域问题,再说,引擎兼容
this
.
elementContainer
.
mask
=
mask
;
this
.
elementContainer
.
mask
=
mask
;
mask
.
updateShape
();
//执行一边吧,不然又bug,不更新_localBoundSelf
mask
.
updateShape
();
//执行一边吧,不然又bug,不更新_localBoundSelf
this
.
addChild
(
mask
)
this
.
addChild
(
mask
)
...
@@ -969,7 +969,7 @@ export class PlayScene extends Scene {
...
@@ -969,7 +969,7 @@ export class PlayScene extends Scene {
}
}
}
}
async
sendPropUse
(
prop
:
PropType
,
index
?:
number
)
{
async
sendPropUse
(
prop
:
PropType
,
index
?:
number
)
{
//移除事件
//移除事件
this
.
propGuide
.
removeAllEventListener
();
this
.
propGuide
.
removeAllEventListener
();
//移除自己
//移除自己
...
@@ -1148,6 +1148,14 @@ export class PlayScene extends Scene {
...
@@ -1148,6 +1148,14 @@ export class PlayScene extends Scene {
fall
(
callback
:
Function
)
{
fall
(
callback
:
Function
)
{
//去重一次
//去重一次
Tool
.
removeReapty
(
this
.
emptys
);
Tool
.
removeReapty
(
this
.
emptys
);
//检查一次是否索引的格子是否为空,为了之前偶现的bug;初步判断空格有误,
//TODO当初为啥脑抽,不直接在这里找所有空格(注意关闭的石门不能进空格)
for
(
var
i
=
this
.
emptys
.
length
-
1
;
i
>=
0
;
i
--
)
{
if
(
this
.
lattices
[
this
.
emptys
[
i
]].
element
)
{
console
.
warn
(
"该格子索引空格有误:"
+
this
.
emptys
[
i
])
this
.
emptys
.
splice
(
i
,
1
)
}
}
//逻辑需要重新梳理
//逻辑需要重新梳理
if
(
/*!this.fallVerMark ||*/
Tool
.
judgeOutOne
(
this
.
emptys
,
this
.
lattices
))
{
if
(
/*!this.fallVerMark ||*/
Tool
.
judgeOutOne
(
this
.
emptys
,
this
.
lattices
))
{
...
...
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