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
Hide 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 @@
inst
.
source
=
'asset://'
+
engine
.
getAssetByName
(
name
).
uuid
;
return
inst
;
}
//# sourceMappingURL=utils.js.map
var
props
=
{};
function
prepareProps
()
{
...
...
@@ -27,6 +28,7 @@
function
injectProps
(
p
)
{
engine
.
injectProp
(
props
,
p
);
}
//# sourceMappingURL=props.js.map
var
Conveyor
=
(
function
(
_super
)
{
tslib
.
__extends
(
Conveyor
,
_super
);
...
...
@@ -62,6 +64,7 @@
};
return
Conveyor
;
}(
engine
.
Sprite
));
//# sourceMappingURL=Conveyor.js.map
var
GarbageTypes
;
(
function
(
GarbageTypes
)
{
...
...
@@ -70,6 +73,7 @@
GarbageTypes
[
"wetWaste"
]
=
"wetWaste"
;
GarbageTypes
[
"dryWaste"
]
=
"dryWaste"
;
})(
GarbageTypes
||
(
GarbageTypes
=
{}));
//# sourceMappingURL=GarbageTypes.js.map
var
GarbageConfig
=
(
function
()
{
function
GarbageConfig
()
{
...
...
@@ -128,6 +132,7 @@
];
return
GarbageConfig
;
}());
//# sourceMappingURL=GarbageConfig.js.map
var
transStores
=
(
function
(
list
)
{
var
tmp
=
[];
...
...
@@ -187,6 +192,7 @@
return
'其他垃圾'
;
}
};
//# sourceMappingURL=transStores.js.map
var
checkHit
=
(
function
(
view
,
rect
)
{
var
x
=
view
.
x
,
y
=
view
.
y
;
...
...
@@ -196,12 +202,14 @@
}
return
false
;
});
//# sourceMappingURL=checkHit.js.map
var
removeChild
=
(
function
(
d
)
{
if
(
d
&&
d
.
parent
)
{
d
.
parent
.
removeChild
(
d
);
}
});
//# sourceMappingURL=removeChild.js.map
var
removeEle
=
(
function
(
e
,
arr
)
{
var
index
=
arr
.
indexOf
(
e
);
...
...
@@ -209,6 +217,7 @@
arr
.
splice
(
index
,
1
);
}
});
//# sourceMappingURL=removeEle.js.map
var
shuffle
=
(
function
(
arr
)
{
var
_a
;
...
...
@@ -219,6 +228,7 @@
}
return
arr
;
});
//# sourceMappingURL=shuffle.js.map
var
WrongTips
=
(
function
(
_super
)
{
tslib
.
__extends
(
WrongTips
,
_super
);
...
...
@@ -263,6 +273,7 @@
return
gameview
.
recoverableWaste
;
}
};
//# sourceMappingURL=WrongTips.js.map
var
Conveyors
=
(
function
(
_super
)
{
tslib
.
__extends
(
Conveyors
,
_super
);
...
...
@@ -532,6 +543,7 @@
};
return
Conveyors
;
}(
engine
.
Sprite
));
//# sourceMappingURL=Conveyors.js.map
var
uiConfig
=
(
function
()
{
return
[
...
...
@@ -583,6 +595,7 @@
},
];
});
//# sourceMappingURL=uiConfig.js.map
var
getGuideInfo
=
(
function
()
{
if
(
!
window
.
localStorage
)
{
...
...
@@ -594,6 +607,7 @@
if
(
window
.
localStorage
)
localStorage
.
setItem
(
'recyclingGuide'
,
'1'
);
};
//# sourceMappingURL=getGuideInfo.js.map
var
createBg
=
(
function
(
a
)
{
if
(
a
===
void
0
)
{
a
=
1
;
}
...
...
@@ -604,10 +618,12 @@
rect
.
alpha
=
a
;
return
rect
;
});
//# sourceMappingURL=createBg.js.map
var
createImg
=
(
function
(
texture
)
{
return
new
engine
.
Sprite
(
getTextureByName
(
texture
));
});
//# sourceMappingURL=createImg.js.map
var
CountDownGroup
=
(
function
(
_super
)
{
tslib
.
__extends
(
CountDownGroup
,
_super
);
...
...
@@ -691,6 +707,7 @@
};
return
CountDownGroup
;
}(
engine
.
Sprite
));
//# sourceMappingURL=CountDownGroup.js.map
var
GuideView
=
(
function
(
_super
)
{
tslib
.
__extends
(
GuideView
,
_super
);
...
...
@@ -706,8 +723,8 @@
this
.
addChild
(
this
.
guideBg
);
this
.
guideEle
=
createImg
(
'guideEle'
);
this
.
addChild
(
this
.
guideEle
);
this
.
guideBg
.
x
=
39
3
;
this
.
guideBg
.
y
=
5
52
;
this
.
guideBg
.
x
=
40
3
;
this
.
guideBg
.
y
=
5
65
;
this
.
guideEle
.
x
=
361
;
this
.
guideEle
.
y
=
877
;
this
.
guideEle
.
anchorX
=
14
;
...
...
@@ -720,7 +737,7 @@
svga
.
mouseEnabled
=
svga
.
mouseChildren
=
false
;
};
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
))
{
return
true
;
}
...
...
@@ -775,6 +792,7 @@
};
return
GuideView
;
}(
engine
.
Sprite
));
//# sourceMappingURL=guideView.js.map
var
RightTips
=
(
function
(
_super
)
{
tslib
.
__extends
(
RightTips
,
_super
);
...
...
@@ -813,6 +831,7 @@
};
return
RightTips
;
}(
engine
.
Sprite
));
//# sourceMappingURL=RightTips.js.map
var
GameView
=
(
function
(
_super
)
{
tslib
.
__extends
(
GameView
,
_super
);
...
...
@@ -857,10 +876,10 @@
this
.
addChild
(
this
.
rightTips
);
};
GameView
.
prototype
.
createRects
=
function
()
{
this
.
wetWaste
=
this
.
createRect
(
74
,
552
,
301
,
293
,
0xffffff
);
this
.
harmfulWaste
=
this
.
createRect
(
75
,
247
,
300
,
293
,
0xff0000
);
this
.
dryWaste
=
this
.
createRect
(
389
,
249
,
286
,
291
,
0x000000
);
this
.
recoverableWaste
=
this
.
createRect
(
389
,
551
,
287
,
292
,
0x0000ff
);
this
.
wetWaste
=
this
.
createRect
(
104
,
565
,
252
,
297
,
0xffffff
);
this
.
harmfulWaste
=
this
.
createRect
(
104
,
232
,
252
,
297
,
0xff0000
);
this
.
dryWaste
=
this
.
createRect
(
403
,
232
,
252
,
297
,
0x000000
);
this
.
recoverableWaste
=
this
.
createRect
(
403
,
565
,
252
,
297
,
0x0000ff
);
};
GameView
.
prototype
.
createRect
=
function
(
x
,
y
,
w
,
h
,
c
)
{
var
rect
=
new
engine
.
Rectangle
(
x
,
y
,
w
,
h
);
...
...
@@ -973,6 +992,7 @@
};
return
GameView
;
}(
engine
.
Container
));
//# sourceMappingURL=GameView.js.map
var
GameWrapper
=
(
function
(
_super
)
{
tslib
.
__extends
(
GameWrapper
,
_super
);
...
...
@@ -997,6 +1017,7 @@
};
return
GameWrapper
;
}(
engine
.
Container
));
//# sourceMappingURL=GameWrapper.js.map
function
index
(
props
)
{
prepareProps
();
...
...
@@ -1004,6 +1025,7 @@
var
instance
=
new
GameWrapper
();
return
instance
;
}
//# sourceMappingURL=index.js.map
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 @@
},
{
"name"
:
"playBg"
,
"url"
:
"//yun.duiba.com.cn/aurora/assets/
2a5b5087d915c2510f1b96facdb9532798ab59cd.jp
g"
,
"uuid"
:
"1
e7dd156-b59a-491d-8154-af2ecf425a8b
"
,
"ext"
:
".
jp
g"
"url"
:
"//yun.duiba.com.cn/aurora/assets/
7ba8fbc28c05b312c3ac3de607ce6f00bf8ae28d.pn
g"
,
"uuid"
:
"1
53eeb1f-056d-4ee8-b887-7c6c3b0ef7af
"
,
"ext"
:
".
pn
g"
},
{
"name"
:
"wrongTips"
,
...
...
@@ -70,8 +70,8 @@
},
{
"name"
:
"guideBg"
,
"url"
:
"//yun.duiba.com.cn/aurora/assets/
b43a358298c7669dc9f80ea83bc79c74087b82a7
.png"
,
"uuid"
:
"
d96da0ff-b188-41e3-8a8b-8a67108c1e65
"
,
"url"
:
"//yun.duiba.com.cn/aurora/assets/
68e85e441ba1ef5aff111a9631679febb9e41276
.png"
,
"uuid"
:
"
ae92d05b-05ee-42fb-bc10-3e1936c4692f
"
,
"ext"
:
".png"
},
{
...
...
src/custom/recycling/src/game/GameView.ts
View file @
75054211
...
...
@@ -74,10 +74,10 @@ export default class GameView extends engine.Container {
}
private
createRects
()
{
this
.
wetWaste
=
this
.
createRect
(
74
,
552
,
301
,
293
,
0xffffff
);
this
.
harmfulWaste
=
this
.
createRect
(
75
,
247
,
300
,
293
,
0xff0000
);
this
.
dryWaste
=
this
.
createRect
(
389
,
249
,
286
,
291
,
0x000000
);
this
.
recoverableWaste
=
this
.
createRect
(
389
,
551
,
287
,
292
,
0x0000ff
);
this
.
wetWaste
=
this
.
createRect
(
104
,
565
,
252
,
297
,
0xffffff
);
this
.
harmfulWaste
=
this
.
createRect
(
104
,
232
,
252
,
297
,
0xff0000
);
this
.
dryWaste
=
this
.
createRect
(
403
,
232
,
252
,
297
,
0x000000
);
this
.
recoverableWaste
=
this
.
createRect
(
403
,
565
,
252
,
297
,
0x0000ff
);
}
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 {
this
.
addChild
(
this
.
guideBg
)
this
.
guideEle
=
createImg
(
'guideEle'
)
this
.
addChild
(
this
.
guideEle
)
this
.
guideBg
.
x
=
39
3
;
this
.
guideBg
.
y
=
5
52
;
this
.
guideBg
.
x
=
40
3
;
this
.
guideBg
.
y
=
5
65
;
this
.
guideEle
.
x
=
361
;
this
.
guideEle
.
y
=
877
;
...
...
@@ -36,7 +36,7 @@ export default class GuideView extends engine.Sprite {
}
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
))
{
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