Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
JJ_Game_03
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
JJ_Game_03
Commits
bf32a77e
Commit
bf32a77e
authored
Dec 27, 2023
by
limingzhe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: debug
parent
01f8c8f7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
1 deletion
+33
-1
JJ_Game_03.js
assets/JJ_Game_03/scene/JJ_Game_03.js
+33
-1
No files found.
assets/JJ_Game_03/scene/JJ_Game_03.js
View file @
bf32a77e
...
...
@@ -258,7 +258,13 @@ cc.Class({
.
start
();
await
asyncDelay
(
0.6
);
if
(
isDestroy
)
{
return
;
}
await
asyncTweenTo
(
starBig
,
0.8
,
{
scale
:
0
},
{
easing
:
'
quadOut
'
});
if
(
this
.
isDestroy
)
{
return
;
}
await
this
.
playAudioSync
(
'
question
'
);
},
...
...
@@ -283,7 +289,7 @@ cc.Class({
};
this
.
createStars
();
await
this
.
showGuns
();
await
this
.
playQuestionAudio
();
this
.
startShowBalls
();
},
...
...
@@ -485,6 +491,9 @@ cc.Class({
}
this
.
speakerBlink
();
await
playAudioByUrlSync
(
currentQuestion
.
questionAudio
);
if
(
this
.
isDestroy
)
{
return
;
}
this
.
speakerStopBlink
();
},
...
...
@@ -525,6 +534,9 @@ cc.Class({
asyncTweenTo
(
Water
,
0.1
,
{
angle
:
-
angle
});
await
asyncTweenTo
(
Gun
,
0.1
,
{
angle
:
angle
,
scaleY
:
0.95
});
if
(
this
.
isDestroy
)
{
return
;
}
let
startPos
=
exchangeNodePos
(
bg
,
Muzzle
);
bullet
.
x
=
startPos
.
x
;
bullet
.
y
=
startPos
.
y
;
...
...
@@ -543,6 +555,10 @@ cc.Class({
scaleX
:
Between
(
0.5
,
1
,
bullet
.
height
/
flySide
.
mag
())
});
if
(
this
.
isDestroy
)
{
return
;
}
bullet
.
setAnchorPoint
(
0.5
,
1
);
bullet
.
x
=
targetPos
.
x
;
bullet
.
y
=
targetPos
.
y
;
...
...
@@ -562,7 +578,13 @@ cc.Class({
.
start
();
await
this
.
playAudioSync
(
'
right
'
);
if
(
this
.
isDestroy
)
{
return
;
}
await
playAudioByUrlSync
(
node
.
audio
);
if
(
this
.
isDestroy
)
{
return
;
}
node
.
removeFromParent
();
},
...
...
@@ -572,10 +594,19 @@ cc.Class({
let
offsetX
=
RandomInt
(
20
,
50
)
*
2
*
(
RandomInt
(
2
)
-
0.5
);
let
offsetY
=
RandomInt
(
20
,
50
)
*
2
*
(
RandomInt
(
2
)
-
0.5
);
await
asyncTweenBy
(
node
,
0.05
,
{
x
:
offsetX
,
y
:
offsetY
});
if
(
this
.
isDestroy
)
{
return
;
}
offsetX
=
RandomInt
(
20
,
50
)
*
2
*
(
RandomInt
(
2
)
-
0.5
);
offsetY
=
RandomInt
(
20
,
50
)
*
2
*
(
RandomInt
(
2
)
-
0.5
);
await
asyncTweenBy
(
node
,
0.05
,
{
x
:
offsetX
,
y
:
offsetY
});
if
(
this
.
isDestroy
)
{
return
;
}
await
asyncTweenTo
(
node
,
0.05
,
{
x
:
x
});
if
(
this
.
isDestroy
)
{
return
;
}
},
playAudio
(
audioName
,
cb
,
value
=
0.8
)
{
...
...
@@ -602,5 +633,6 @@ cc.Class({
onDestroy
()
{
this
.
stopShowBalls
();
this
.
isDestroy
=
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