Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
l4_boardgame_space
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
l4_boardgame_space
Commits
73b249ae
Commit
73b249ae
authored
Oct 29, 2022
by
liubing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加对方轮次提示音和提示图&修改背景图缩放逻辑。
parent
be667906
Changes
3
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
624 additions
and
534 deletions
+624
-534
l4_boardgame_space.fire
assets/l4_boardgame_space/scene/l4_boardgame_space.fire
+599
-532
l4_boardgame_space.ts
assets/l4_boardgame_space/scene/l4_boardgame_space.ts
+22
-1
defaultData.ts
assets/l4_boardgame_space/script/defaultData.ts
+3
-1
No files found.
assets/l4_boardgame_space/scene/l4_boardgame_space.fire
View file @
73b249ae
This diff is collapsed.
Click to expand it.
assets/l4_boardgame_space/scene/l4_boardgame_space.ts
View file @
73b249ae
...
@@ -33,6 +33,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
...
@@ -33,6 +33,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
this
.
data
.
waitingWheel
&&
this
.
_audioResList
.
push
({
url
:
this
.
data
.
waitingWheel
});
this
.
data
.
waitingWheel
&&
this
.
_audioResList
.
push
({
url
:
this
.
data
.
waitingWheel
});
this
.
data
.
waitingPiece
&&
this
.
_audioResList
.
push
({
url
:
this
.
data
.
waitingPiece
});
this
.
data
.
waitingPiece
&&
this
.
_audioResList
.
push
({
url
:
this
.
data
.
waitingPiece
});
this
.
data
.
waitingTurn
&&
this
.
_audioResList
.
push
({
url
:
this
.
data
.
waitingTurn
});
this
.
data
.
waitingTurn
&&
this
.
_audioResList
.
push
({
url
:
this
.
data
.
waitingTurn
});
this
.
data
.
otherTurn
&&
this
.
_audioResList
.
push
({
url
:
this
.
data
.
otherTurn
});
}
}
addPreloadAnima
()
{
}
addPreloadAnima
()
{
}
...
@@ -118,6 +119,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
...
@@ -118,6 +119,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
this
.
initPiece
();
this
.
initPiece
();
this
.
showAstronautAni
();
this
.
showAstronautAni
();
}
}
addComponents
()
{
addComponents
()
{
cc
.
find
(
'
Canvas/bg/chessBoard/boardItems
'
).
children
.
forEach
(
node
=>
{
cc
.
find
(
'
Canvas/bg/chessBoard/boardItems
'
).
children
.
forEach
(
node
=>
{
let
itemData
=
node
.
getComponent
(
"
space_game_4_item_data
"
);
let
itemData
=
node
.
getComponent
(
"
space_game_4_item_data
"
);
...
@@ -695,7 +697,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
...
@@ -695,7 +697,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
});
});
}
}
updateStatus
(
status
=
null
)
{
async
updateStatus
(
status
=
null
)
{
if
(
status
)
{
if
(
status
)
{
console
.
log
(
"
status:
"
+
JSON
.
stringify
(
status
));
console
.
log
(
"
status:
"
+
JSON
.
stringify
(
status
));
this
.
_status
=
JSON
.
parse
(
JSON
.
stringify
(
status
));
this
.
_status
=
JSON
.
parse
(
JSON
.
stringify
(
status
));
...
@@ -716,6 +718,8 @@ export default class SceneComponent extends MyCocosSceneComponent {
...
@@ -716,6 +718,8 @@ export default class SceneComponent extends MyCocosSceneComponent {
this
.
rollPiece
(
this
.
getCurrentPiece
());
this
.
rollPiece
(
this
.
getCurrentPiece
());
}
}
}
else
{
}
else
{
this
.
audioId
=
await
this
.
playAudioByUrl
(
this
.
data
.
otherTurn
);
this
.
showOtherTurn
();
this
.
greyDice
();
this
.
greyDice
();
}
}
...
@@ -788,6 +792,23 @@ export default class SceneComponent extends MyCocosSceneComponent {
...
@@ -788,6 +792,23 @@ export default class SceneComponent extends MyCocosSceneComponent {
});
});
}
}
// 展示:对方轮次
showOtherTurn
()
{
return
new
Promise
((
resolve
,
reject
)
=>
{
const
otherTurn
=
cc
.
find
(
"
Canvas/bg/otherturn
"
);
otherTurn
.
active
=
true
;
cc
.
tween
(
otherTurn
)
.
set
({
opacity
:
0
,
scale
:
5
})
.
to
(
1
,
{
opacity
:
255
,
scale
:
2
})
.
delay
(
0.5
)
.
to
(
0.5
,
{
opacity
:
0
})
.
call
(()
=>
{
resolve
(
null
);
})
.
start
();
});
}
async
pieceGoBack
(
node
)
{
async
pieceGoBack
(
node
)
{
const
touchStartPos
=
node
[
"
touchStartPos
"
];
const
touchStartPos
=
node
[
"
touchStartPos
"
];
if
(
!
touchStartPos
)
{
if
(
!
touchStartPos
)
{
...
...
assets/l4_boardgame_space/script/defaultData.ts
View file @
73b249ae
...
@@ -9,5 +9,7 @@ export const defaultData = {
...
@@ -9,5 +9,7 @@ export const defaultData = {
""
,
""
,
waitingTurn
:
waitingTurn
:
""
,
""
,
recordWait
:
"
http://staging-teach.cdn.ireadabc.com/31952573236dd316a8ee1672d1614a1c.mp3
"
recordWait
:
""
,
otherTurn
:
""
,
};
};
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