Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
LWD_2
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
template admin
LWD_2
Commits
0a57d259
Commit
0a57d259
authored
Jun 17, 2021
by
Lwd
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
aaaa
parent
ea972d13
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
43 additions
and
58 deletions
+43
-58
Game.fire
play/assets/tmpGame/scene/Game.fire
+14
-14
item.js
play/assets/tmpGame/script/game/item.js
+28
-43
bg_sahua.png.meta
play/assets/tmpGame/textures/bg_sahua.png.meta
+1
-1
No files found.
play/assets/tmpGame/scene/Game.fire
View file @
0a57d259
...
...
@@ -189,7 +189,7 @@
"array": [
0,
0,
355.0704155516199
,
278.86018001858923
,
0,
0,
0,
...
...
@@ -667,8 +667,8 @@
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
-3
72
.5,
29
8.5,
-3
06
.5,
30
8.5,
0,
0,
0,
...
...
@@ -853,9 +853,9 @@
"alignMode": 1,
"_target": null,
"_alignFlags": 9,
"_left":
0
,
"_left":
66
,
"_right": 0,
"_top":
2
0,
"_top":
1
0,
"_bottom": 0,
"_verticalCenter": 0,
"_horizontalCenter": 0,
...
...
@@ -3037,7 +3037,7 @@
"_isSystemFontUsed": false,
"_spacingX": 0,
"_batchAsBitmap": false,
"_styleFlags":
0
,
"_styleFlags":
1
,
"_underlineHeight": 0,
"_N$horizontalAlign": 1,
"_N$verticalAlign": 1,
...
...
@@ -3200,7 +3200,7 @@
"_isSystemFontUsed": false,
"_spacingX": 0,
"_batchAsBitmap": false,
"_styleFlags":
0
,
"_styleFlags":
1
,
"_underlineHeight": 0,
"_N$horizontalAlign": 1,
"_N$verticalAlign": 1,
...
...
@@ -3711,7 +3711,7 @@
"_isSystemFontUsed": false,
"_spacingX": 0,
"_batchAsBitmap": false,
"_styleFlags":
0
,
"_styleFlags":
1
,
"_underlineHeight": 0,
"_N$horizontalAlign": 1,
"_N$verticalAlign": 1,
...
...
@@ -3874,7 +3874,7 @@
"_isSystemFontUsed": false,
"_spacingX": 0,
"_batchAsBitmap": false,
"_styleFlags":
0
,
"_styleFlags":
1
,
"_underlineHeight": 0,
"_N$horizontalAlign": 1,
"_N$verticalAlign": 1,
...
...
@@ -6147,7 +6147,7 @@
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor":
770
,
"_srcBlendFactor":
1
,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "130348e9-f1a0-4858-8d2a-dfd298bc57f1"
...
...
@@ -6241,7 +6241,7 @@
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor":
770
,
"_srcBlendFactor":
1
,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "130348e9-f1a0-4858-8d2a-dfd298bc57f1"
...
...
@@ -6335,7 +6335,7 @@
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor":
770
,
"_srcBlendFactor":
1
,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "130348e9-f1a0-4858-8d2a-dfd298bc57f1"
...
...
@@ -6429,7 +6429,7 @@
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor":
770
,
"_srcBlendFactor":
1
,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "130348e9-f1a0-4858-8d2a-dfd298bc57f1"
...
...
@@ -6523,7 +6523,7 @@
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor":
770
,
"_srcBlendFactor":
1
,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "130348e9-f1a0-4858-8d2a-dfd298bc57f1"
...
...
play/assets/tmpGame/script/game/item.js
View file @
0a57d259
...
...
@@ -100,66 +100,51 @@ cc.Class({
// console.log("坐标" + svLeftBottomPoint.x + "," + svLeftBottomPoint.y + "是否包含" + isIntersect_1);
if
(
isIntersect_1
)
{
if
(
this
.
node
.
type
==
2
)
{
this
.
Item_complete
.
active
=
true
;
this
.
node
.
isComplent
=
true
;
g
.
data_mgr
.
nowNum
-=
1
;
if
(
g
.
data_mgr
.
nowNum
==
0
)
{
g
.
effect
.
inst
.
showEffect2
();
}
g
.
speaker
.
inst
.
play_good
();
var
newItem_temp
=
cc
.
instantiate
(
g
.
game
.
inst
.
Item_0
[
2
]);
g
.
game
.
inst
.
contentArr_1
[
1
].
getChildByName
(
"
db
"
).
active
=
true
;
g
.
game
.
inst
.
contentArr_1
[
1
].
getChildByName
(
"
db
"
).
getComponent
(
dragonBones
.
ArmatureDisplay
).
playAnimation
(
"
newAnimation
"
,
1
);
if
(
this
.
node
.
width
>=
150
)
{
this
.
node
.
scale
=
0.666
;
this
.
node
.
x
=
0
;
}
this
.
node
.
parent
=
newItem_temp
;
newItem_temp
.
parent
=
g
.
game
.
inst
.
contentArr_1
[
1
].
getChildByName
(
"
connent_3
"
).
getChildByName
(
"
Layout
"
);
this
.
node
.
x
=
0
;
this
.
node
.
y
=
0
;
this
.
setItemState
(
g
.
game
.
inst
.
contentArr_1
[
1
]);
}
else
{
this
.
errorEffect
();
}
console
.
log
(
"
被1包含
"
+
isIntersect_1
);
}
else
if
(
isIntersect_0
)
{
if
(
this
.
node
.
type
==
1
)
{
this
.
setItemState
(
g
.
game
.
inst
.
contentArr_1
[
0
]);
}
else
{
this
.
errorEffect
();
}
}
else
{
//回到原来的位置
this
.
node
.
x
=
0
;
this
.
node
.
y
=
0
;
}
},
setItemState
:
function
(
content
)
{
this
.
Item_complete
.
active
=
true
;
this
.
node
.
isComplent
=
true
;
g
.
data_mgr
.
nowNum
-=
1
;
if
(
g
.
data_mgr
.
nowNum
==
0
)
{
setTimeout
(()
=>
{
g
.
speaker
.
inst
.
play_congratulation
();
g
.
effect
.
inst
.
showEffect2
();
},
500
)
}
g
.
speaker
.
inst
.
play_good
();
var
newItem_temp
=
cc
.
instantiate
(
g
.
game
.
inst
.
Item_0
[
2
]);
g
.
game
.
inst
.
contentArr_1
[
0
]
.
getChildByName
(
"
db
"
).
active
=
true
;
g
.
game
.
inst
.
contentArr_1
[
0
]
.
getChildByName
(
"
db
"
).
getComponent
(
dragonBones
.
ArmatureDisplay
).
playAnimation
(
"
newAnimation
"
,
1
);
content
.
getChildByName
(
"
db
"
).
active
=
true
;
content
.
getChildByName
(
"
db
"
).
getComponent
(
dragonBones
.
ArmatureDisplay
).
playAnimation
(
"
newAnimation
"
,
1
);
if
(
this
.
node
.
width
>=
150
)
{
this
.
node
.
scale
=
0.666
;
this
.
node
.
x
=
0
;
}
this
.
node
.
parent
=
newItem_temp
;
newItem_temp
.
parent
=
g
.
game
.
inst
.
contentArr_1
[
0
]
.
getChildByName
(
"
connent_3
"
).
getChildByName
(
"
Layout
"
);
newItem_temp
.
parent
=
content
.
getChildByName
(
"
connent_3
"
).
getChildByName
(
"
Layout
"
);
this
.
node
.
x
=
0
;
this
.
node
.
y
=
0
;
console
.
log
(
"
被2包含
"
+
isIntersect_0
);
}
else
{
this
.
errorEffect
();
}
}
else
{
//回到原来的位置
this
.
node
.
x
=
0
;
this
.
node
.
y
=
0
;
}
},
errorEffect
:
function
()
{
...
...
play/assets/tmpGame/textures/bg_sahua.png.meta
View file @
0a57d259
...
...
@@ -4,7 +4,7 @@
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha":
fals
e,
"premultiplyAlpha":
tru
e,
"genMipmaps": false,
"packable": true,
"width": 36,
...
...
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