Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Z
zeroing-libs
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
劳工
zeroing-libs
Commits
75054211
Commit
75054211
authored
Jun 29, 2020
by
zjz1994
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
调整图和垃圾桶检测区域
parent
4e6c7a50
Changes
6
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
48 additions
and
26 deletions
+48
-26
recycling.json
dist/customs/recycling.json
+6
-6
main.js
src/custom/recycling/debug/main.js
+29
-7
main.js.map
src/custom/recycling/debug/main.js.map
+1
-1
meta.json
src/custom/recycling/meta.json
+5
-5
GameView.ts
src/custom/recycling/src/game/GameView.ts
+4
-4
guideView.ts
src/custom/recycling/src/game/views/guideView.ts
+3
-3
No files found.
dist/customs/recycling.json
View file @
75054211
This diff is collapsed.
Click to expand it.
src/custom/recycling/debug/main.js
View file @
75054211
...
@@ -18,6 +18,7 @@
...
@@ -18,6 +18,7 @@
inst
.
source
=
'asset://'
+
engine
.
getAssetByName
(
name
).
uuid
;
inst
.
source
=
'asset://'
+
engine
.
getAssetByName
(
name
).
uuid
;
return
inst
;
return
inst
;
}
}
//# sourceMappingURL=utils.js.map
var
props
=
{};
var
props
=
{};
function
prepareProps
()
{
function
prepareProps
()
{
...
@@ -27,6 +28,7 @@
...
@@ -27,6 +28,7 @@
function
injectProps
(
p
)
{
function
injectProps
(
p
)
{
engine
.
injectProp
(
props
,
p
);
engine
.
injectProp
(
props
,
p
);
}
}
//# sourceMappingURL=props.js.map
var
Conveyor
=
(
function
(
_super
)
{
var
Conveyor
=
(
function
(
_super
)
{
tslib
.
__extends
(
Conveyor
,
_super
);
tslib
.
__extends
(
Conveyor
,
_super
);
...
@@ -62,6 +64,7 @@
...
@@ -62,6 +64,7 @@
};
};
return
Conveyor
;
return
Conveyor
;
}(
engine
.
Sprite
));
}(
engine
.
Sprite
));
//# sourceMappingURL=Conveyor.js.map
var
GarbageTypes
;
var
GarbageTypes
;
(
function
(
GarbageTypes
)
{
(
function
(
GarbageTypes
)
{
...
@@ -70,6 +73,7 @@
...
@@ -70,6 +73,7 @@
GarbageTypes
[
"wetWaste"
]
=
"wetWaste"
;
GarbageTypes
[
"wetWaste"
]
=
"wetWaste"
;
GarbageTypes
[
"dryWaste"
]
=
"dryWaste"
;
GarbageTypes
[
"dryWaste"
]
=
"dryWaste"
;
})(
GarbageTypes
||
(
GarbageTypes
=
{}));
})(
GarbageTypes
||
(
GarbageTypes
=
{}));
//# sourceMappingURL=GarbageTypes.js.map
var
GarbageConfig
=
(
function
()
{
var
GarbageConfig
=
(
function
()
{
function
GarbageConfig
()
{
function
GarbageConfig
()
{
...
@@ -128,6 +132,7 @@
...
@@ -128,6 +132,7 @@
];
];
return
GarbageConfig
;
return
GarbageConfig
;
}());
}());
//# sourceMappingURL=GarbageConfig.js.map
var
transStores
=
(
function
(
list
)
{
var
transStores
=
(
function
(
list
)
{
var
tmp
=
[];
var
tmp
=
[];
...
@@ -187,6 +192,7 @@
...
@@ -187,6 +192,7 @@
return
'其他垃圾'
;
return
'其他垃圾'
;
}
}
};
};
//# sourceMappingURL=transStores.js.map
var
checkHit
=
(
function
(
view
,
rect
)
{
var
checkHit
=
(
function
(
view
,
rect
)
{
var
x
=
view
.
x
,
y
=
view
.
y
;
var
x
=
view
.
x
,
y
=
view
.
y
;
...
@@ -196,12 +202,14 @@
...
@@ -196,12 +202,14 @@
}
}
return
false
;
return
false
;
});
});
//# sourceMappingURL=checkHit.js.map
var
removeChild
=
(
function
(
d
)
{
var
removeChild
=
(
function
(
d
)
{
if
(
d
&&
d
.
parent
)
{
if
(
d
&&
d
.
parent
)
{
d
.
parent
.
removeChild
(
d
);
d
.
parent
.
removeChild
(
d
);
}
}
});
});
//# sourceMappingURL=removeChild.js.map
var
removeEle
=
(
function
(
e
,
arr
)
{
var
removeEle
=
(
function
(
e
,
arr
)
{
var
index
=
arr
.
indexOf
(
e
);
var
index
=
arr
.
indexOf
(
e
);
...
@@ -209,6 +217,7 @@
...
@@ -209,6 +217,7 @@
arr
.
splice
(
index
,
1
);
arr
.
splice
(
index
,
1
);
}
}
});
});
//# sourceMappingURL=removeEle.js.map
var
shuffle
=
(
function
(
arr
)
{
var
shuffle
=
(
function
(
arr
)
{
var
_a
;
var
_a
;
...
@@ -219,6 +228,7 @@
...
@@ -219,6 +228,7 @@
}
}
return
arr
;
return
arr
;
});
});
//# sourceMappingURL=shuffle.js.map
var
WrongTips
=
(
function
(
_super
)
{
var
WrongTips
=
(
function
(
_super
)
{
tslib
.
__extends
(
WrongTips
,
_super
);
tslib
.
__extends
(
WrongTips
,
_super
);
...
@@ -263,6 +273,7 @@
...
@@ -263,6 +273,7 @@
return
gameview
.
recoverableWaste
;
return
gameview
.
recoverableWaste
;
}
}
};
};
//# sourceMappingURL=WrongTips.js.map
var
Conveyors
=
(
function
(
_super
)
{
var
Conveyors
=
(
function
(
_super
)
{
tslib
.
__extends
(
Conveyors
,
_super
);
tslib
.
__extends
(
Conveyors
,
_super
);
...
@@ -532,6 +543,7 @@
...
@@ -532,6 +543,7 @@
};
};
return
Conveyors
;
return
Conveyors
;
}(
engine
.
Sprite
));
}(
engine
.
Sprite
));
//# sourceMappingURL=Conveyors.js.map
var
uiConfig
=
(
function
()
{
var
uiConfig
=
(
function
()
{
return
[
return
[
...
@@ -583,6 +595,7 @@
...
@@ -583,6 +595,7 @@
},
},
];
];
});
});
//# sourceMappingURL=uiConfig.js.map
var
getGuideInfo
=
(
function
()
{
var
getGuideInfo
=
(
function
()
{
if
(
!
window
.
localStorage
)
{
if
(
!
window
.
localStorage
)
{
...
@@ -594,6 +607,7 @@
...
@@ -594,6 +607,7 @@
if
(
window
.
localStorage
)
if
(
window
.
localStorage
)
localStorage
.
setItem
(
'recyclingGuide'
,
'1'
);
localStorage
.
setItem
(
'recyclingGuide'
,
'1'
);
};
};
//# sourceMappingURL=getGuideInfo.js.map
var
createBg
=
(
function
(
a
)
{
var
createBg
=
(
function
(
a
)
{
if
(
a
===
void
0
)
{
a
=
1
;
}
if
(
a
===
void
0
)
{
a
=
1
;
}
...
@@ -604,10 +618,12 @@
...
@@ -604,10 +618,12 @@
rect
.
alpha
=
a
;
rect
.
alpha
=
a
;
return
rect
;
return
rect
;
});
});
//# sourceMappingURL=createBg.js.map
var
createImg
=
(
function
(
texture
)
{
var
createImg
=
(
function
(
texture
)
{
return
new
engine
.
Sprite
(
getTextureByName
(
texture
));
return
new
engine
.
Sprite
(
getTextureByName
(
texture
));
});
});
//# sourceMappingURL=createImg.js.map
var
CountDownGroup
=
(
function
(
_super
)
{
var
CountDownGroup
=
(
function
(
_super
)
{
tslib
.
__extends
(
CountDownGroup
,
_super
);
tslib
.
__extends
(
CountDownGroup
,
_super
);
...
@@ -691,6 +707,7 @@
...
@@ -691,6 +707,7 @@
};
};
return
CountDownGroup
;
return
CountDownGroup
;
}(
engine
.
Sprite
));
}(
engine
.
Sprite
));
//# sourceMappingURL=CountDownGroup.js.map
var
GuideView
=
(
function
(
_super
)
{
var
GuideView
=
(
function
(
_super
)
{
tslib
.
__extends
(
GuideView
,
_super
);
tslib
.
__extends
(
GuideView
,
_super
);
...
@@ -706,8 +723,8 @@
...
@@ -706,8 +723,8 @@
this
.
addChild
(
this
.
guideBg
);
this
.
addChild
(
this
.
guideBg
);
this
.
guideEle
=
createImg
(
'guideEle'
);
this
.
guideEle
=
createImg
(
'guideEle'
);
this
.
addChild
(
this
.
guideEle
);
this
.
addChild
(
this
.
guideEle
);
this
.
guideBg
.
x
=
39
3
;
this
.
guideBg
.
x
=
40
3
;
this
.
guideBg
.
y
=
5
52
;
this
.
guideBg
.
y
=
5
65
;
this
.
guideEle
.
x
=
361
;
this
.
guideEle
.
x
=
361
;
this
.
guideEle
.
y
=
877
;
this
.
guideEle
.
y
=
877
;
this
.
guideEle
.
anchorX
=
14
;
this
.
guideEle
.
anchorX
=
14
;
...
@@ -720,7 +737,7 @@
...
@@ -720,7 +737,7 @@
svga
.
mouseEnabled
=
svga
.
mouseChildren
=
false
;
svga
.
mouseEnabled
=
svga
.
mouseChildren
=
false
;
};
};
GuideView
.
prototype
.
checkHit
=
function
(
x
,
y
,
w
,
h
)
{
GuideView
.
prototype
.
checkHit
=
function
(
x
,
y
,
w
,
h
)
{
var
rect
=
new
engine
.
Rectangle
(
393
,
552
,
281
,
320
);
var
rect
=
new
engine
.
Rectangle
(
403
,
565
,
252
,
297
);
if
(
x
>
rect
.
x
&&
y
>
rect
.
y
&&
(
x
+
w
)
<
(
rect
.
x
+
rect
.
width
)
&&
(
y
+
h
)
<
(
rect
.
y
+
rect
.
height
))
{
if
(
x
>
rect
.
x
&&
y
>
rect
.
y
&&
(
x
+
w
)
<
(
rect
.
x
+
rect
.
width
)
&&
(
y
+
h
)
<
(
rect
.
y
+
rect
.
height
))
{
return
true
;
return
true
;
}
}
...
@@ -775,6 +792,7 @@
...
@@ -775,6 +792,7 @@
};
};
return
GuideView
;
return
GuideView
;
}(
engine
.
Sprite
));
}(
engine
.
Sprite
));
//# sourceMappingURL=guideView.js.map
var
RightTips
=
(
function
(
_super
)
{
var
RightTips
=
(
function
(
_super
)
{
tslib
.
__extends
(
RightTips
,
_super
);
tslib
.
__extends
(
RightTips
,
_super
);
...
@@ -813,6 +831,7 @@
...
@@ -813,6 +831,7 @@
};
};
return
RightTips
;
return
RightTips
;
}(
engine
.
Sprite
));
}(
engine
.
Sprite
));
//# sourceMappingURL=RightTips.js.map
var
GameView
=
(
function
(
_super
)
{
var
GameView
=
(
function
(
_super
)
{
tslib
.
__extends
(
GameView
,
_super
);
tslib
.
__extends
(
GameView
,
_super
);
...
@@ -857,10 +876,10 @@
...
@@ -857,10 +876,10 @@
this
.
addChild
(
this
.
rightTips
);
this
.
addChild
(
this
.
rightTips
);
};
};
GameView
.
prototype
.
createRects
=
function
()
{
GameView
.
prototype
.
createRects
=
function
()
{
this
.
wetWaste
=
this
.
createRect
(
74
,
552
,
301
,
293
,
0xffffff
);
this
.
wetWaste
=
this
.
createRect
(
104
,
565
,
252
,
297
,
0xffffff
);
this
.
harmfulWaste
=
this
.
createRect
(
75
,
247
,
300
,
293
,
0xff0000
);
this
.
harmfulWaste
=
this
.
createRect
(
104
,
232
,
252
,
297
,
0xff0000
);
this
.
dryWaste
=
this
.
createRect
(
389
,
249
,
286
,
291
,
0x000000
);
this
.
dryWaste
=
this
.
createRect
(
403
,
232
,
252
,
297
,
0x000000
);
this
.
recoverableWaste
=
this
.
createRect
(
389
,
551
,
287
,
292
,
0x0000ff
);
this
.
recoverableWaste
=
this
.
createRect
(
403
,
565
,
252
,
297
,
0x0000ff
);
};
};
GameView
.
prototype
.
createRect
=
function
(
x
,
y
,
w
,
h
,
c
)
{
GameView
.
prototype
.
createRect
=
function
(
x
,
y
,
w
,
h
,
c
)
{
var
rect
=
new
engine
.
Rectangle
(
x
,
y
,
w
,
h
);
var
rect
=
new
engine
.
Rectangle
(
x
,
y
,
w
,
h
);
...
@@ -973,6 +992,7 @@
...
@@ -973,6 +992,7 @@
};
};
return
GameView
;
return
GameView
;
}(
engine
.
Container
));
}(
engine
.
Container
));
//# sourceMappingURL=GameView.js.map
var
GameWrapper
=
(
function
(
_super
)
{
var
GameWrapper
=
(
function
(
_super
)
{
tslib
.
__extends
(
GameWrapper
,
_super
);
tslib
.
__extends
(
GameWrapper
,
_super
);
...
@@ -997,6 +1017,7 @@
...
@@ -997,6 +1017,7 @@
};
};
return
GameWrapper
;
return
GameWrapper
;
}(
engine
.
Container
));
}(
engine
.
Container
));
//# sourceMappingURL=GameWrapper.js.map
function
index
(
props
)
{
function
index
(
props
)
{
prepareProps
();
prepareProps
();
...
@@ -1004,6 +1025,7 @@
...
@@ -1004,6 +1025,7 @@
var
instance
=
new
GameWrapper
();
var
instance
=
new
GameWrapper
();
return
instance
;
return
instance
;
}
}
//# sourceMappingURL=index.js.map
return
index
;
return
index
;
...
...
src/custom/recycling/debug/main.js.map
View file @
75054211
This source diff could not be displayed because it is too large. You can
view the blob
instead.
src/custom/recycling/meta.json
View file @
75054211
...
@@ -16,9 +16,9 @@
...
@@ -16,9 +16,9 @@
},
},
{
{
"name"
:
"playBg"
,
"name"
:
"playBg"
,
"url"
:
"//yun.duiba.com.cn/aurora/assets/
2a5b5087d915c2510f1b96facdb9532798ab59cd.jp
g"
,
"url"
:
"//yun.duiba.com.cn/aurora/assets/
7ba8fbc28c05b312c3ac3de607ce6f00bf8ae28d.pn
g"
,
"uuid"
:
"1
e7dd156-b59a-491d-8154-af2ecf425a8b
"
,
"uuid"
:
"1
53eeb1f-056d-4ee8-b887-7c6c3b0ef7af
"
,
"ext"
:
".
jp
g"
"ext"
:
".
pn
g"
},
},
{
{
"name"
:
"wrongTips"
,
"name"
:
"wrongTips"
,
...
@@ -70,8 +70,8 @@
...
@@ -70,8 +70,8 @@
},
},
{
{
"name"
:
"guideBg"
,
"name"
:
"guideBg"
,
"url"
:
"//yun.duiba.com.cn/aurora/assets/
b43a358298c7669dc9f80ea83bc79c74087b82a7
.png"
,
"url"
:
"//yun.duiba.com.cn/aurora/assets/
68e85e441ba1ef5aff111a9631679febb9e41276
.png"
,
"uuid"
:
"
d96da0ff-b188-41e3-8a8b-8a67108c1e65
"
,
"uuid"
:
"
ae92d05b-05ee-42fb-bc10-3e1936c4692f
"
,
"ext"
:
".png"
"ext"
:
".png"
},
},
{
{
...
...
src/custom/recycling/src/game/GameView.ts
View file @
75054211
...
@@ -74,10 +74,10 @@ export default class GameView extends engine.Container {
...
@@ -74,10 +74,10 @@ export default class GameView extends engine.Container {
}
}
private
createRects
()
{
private
createRects
()
{
this
.
wetWaste
=
this
.
createRect
(
74
,
552
,
301
,
293
,
0xffffff
);
this
.
wetWaste
=
this
.
createRect
(
104
,
565
,
252
,
297
,
0xffffff
);
this
.
harmfulWaste
=
this
.
createRect
(
75
,
247
,
300
,
293
,
0xff0000
);
this
.
harmfulWaste
=
this
.
createRect
(
104
,
232
,
252
,
297
,
0xff0000
);
this
.
dryWaste
=
this
.
createRect
(
389
,
249
,
286
,
291
,
0x000000
);
this
.
dryWaste
=
this
.
createRect
(
403
,
232
,
252
,
297
,
0x000000
);
this
.
recoverableWaste
=
this
.
createRect
(
389
,
551
,
287
,
292
,
0x0000ff
);
this
.
recoverableWaste
=
this
.
createRect
(
403
,
565
,
252
,
297
,
0x0000ff
);
}
}
createRect
(
x
,
y
,
w
,
h
,
c
)
{
createRect
(
x
,
y
,
w
,
h
,
c
)
{
...
...
src/custom/recycling/src/game/views/guideView.ts
View file @
75054211
...
@@ -19,8 +19,8 @@ export default class GuideView extends engine.Sprite {
...
@@ -19,8 +19,8 @@ export default class GuideView extends engine.Sprite {
this
.
addChild
(
this
.
guideBg
)
this
.
addChild
(
this
.
guideBg
)
this
.
guideEle
=
createImg
(
'guideEle'
)
this
.
guideEle
=
createImg
(
'guideEle'
)
this
.
addChild
(
this
.
guideEle
)
this
.
addChild
(
this
.
guideEle
)
this
.
guideBg
.
x
=
39
3
;
this
.
guideBg
.
x
=
40
3
;
this
.
guideBg
.
y
=
5
52
;
this
.
guideBg
.
y
=
5
65
;
this
.
guideEle
.
x
=
361
;
this
.
guideEle
.
x
=
361
;
this
.
guideEle
.
y
=
877
;
this
.
guideEle
.
y
=
877
;
...
@@ -36,7 +36,7 @@ export default class GuideView extends engine.Sprite {
...
@@ -36,7 +36,7 @@ export default class GuideView extends engine.Sprite {
}
}
checkHit
(
x
,
y
,
w
,
h
)
{
checkHit
(
x
,
y
,
w
,
h
)
{
const
rect
=
new
engine
.
Rectangle
(
393
,
552
,
281
,
320
)
const
rect
=
new
engine
.
Rectangle
(
403
,
565
,
252
,
297
);
if
(
x
>
rect
.
x
&&
y
>
rect
.
y
&&
(
x
+
w
)
<
(
rect
.
x
+
rect
.
width
)
&&
(
y
+
h
)
<
(
rect
.
y
+
rect
.
height
))
{
if
(
x
>
rect
.
x
&&
y
>
rect
.
y
&&
(
x
+
w
)
<
(
rect
.
x
+
rect
.
width
)
&&
(
y
+
h
)
<
(
rect
.
y
+
rect
.
height
))
{
return
true
return
true
}
}
...
...
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