Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
ns16_mole
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
ns16_mole
Commits
9f8aa7ad
Commit
9f8aa7ad
authored
Oct 14, 2022
by
Tt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
单机版完成
parent
807e2ac9
Changes
10
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
2576 additions
and
1400 deletions
+2576
-1400
layout_fish.ts
assets/gofishing/scene/game/layout_fish.ts
+177
-170
layout_info.ts
assets/gofishing/scene/game/layout_info.ts
+4
-2
gofishing.fire
assets/gofishing/scene/gofishing.fire
+2366
-1218
gofishing.ts
assets/gofishing/scene/gofishing.ts
+0
-4
Game.ts
assets/gofishing/scene/tool/Game.ts
+2
-0
defaultData.ts
assets/gofishing/script/defaultData.ts
+21
-1
view.png
assets/gofishing/textures/view.png
+0
-0
text_round.png.meta
assets/gofishing/textures/打地鼠/text_round.png.meta
+3
-3
creator.d.ts
creator.d.ts
+1
-0
ComponentBase.ts
form/src/app/form/ComponentBase.ts
+2
-2
No files found.
assets/gofishing/scene/game/layout_fish.ts
View file @
9f8aa7ad
This diff is collapsed.
Click to expand it.
assets/gofishing/scene/game/layout_info.ts
View file @
9f8aa7ad
...
...
@@ -40,12 +40,13 @@ export default class NewClass extends cc.Component {
pg
.
event
.
on
(
"
game_set_game_time
"
,
(
count
)
=>
{
this
.
countDown
=
count
;
});
pg
.
event
.
on
(
"
game_play_laba
"
,
()
=>
{
this
.
playLaba
();
});
this
.
btn_laba
.
on
(
cc
.
Node
.
EventType
.
TOUCH_END
,
this
.
playLaba
,
this
);
}
private
gameStart
()
{
this
.
countDown
=
Game
.
getIns
().
getCurrentPage
().
duration
;
// this.showRound();
this
.
playLaba
();
}
private
bg_round
:
cc
.
Node
;
private
initView
()
{
...
...
@@ -82,6 +83,7 @@ export default class NewClass extends cc.Component {
if
(
stop
&&
count
%
3
==
2
)
{
this
.
playing
=
false
;
clearInterval
(
this
.
intervalId
);
pg
.
event
.
emit
(
"
game_play_laba_successed
"
);
}
},
150
);
pg
.
audio
.
playAudioByUrlThen
(
Game
.
getIns
().
getCurrentPage
().
audio
).
then
(()
=>
{
...
...
assets/gofishing/scene/gofishing.fire
View file @
9f8aa7ad
This diff is collapsed.
Click to expand it.
assets/gofishing/scene/gofishing.ts
View file @
9f8aa7ad
...
...
@@ -52,7 +52,6 @@ export default class SceneComponent extends MyCocosSceneComponent {
this
.
audioId
=
await
pg
.
audio
.
playAudioByUrl
(
Game
.
getIns
().
question
.
audio
);
if
(
this
.
audioId
>
-
1
&&
Game
.
getIns
().
state
==
GAME_STATE
.
RUNNING
)
{
cc
.
audioEngine
.
stopAllEffects
();
// pg.audio.stopAudio(this.audioId);
}
}
initEvent
()
{
...
...
@@ -81,7 +80,6 @@ export default class SceneComponent extends MyCocosSceneComponent {
this
.
layout_start
.
active
=
false
;
if
(
this
.
audioId
>
-
1
)
{
cc
.
audioEngine
.
stopAllEffects
();
// pg.audio.stopAudio(this.audioId);
}
if
(
!
Game
.
getIns
().
singleGame
)
{
this
.
showVs
();
...
...
@@ -91,12 +89,10 @@ export default class SceneComponent extends MyCocosSceneComponent {
}
gameStart
()
{
Game
.
getIns
().
state
=
GAME_STATE
.
RUNNING
;
//游戏开始小鱼出现等等
this
.
layout_start
.
active
=
false
;
if
(
this
.
audioId
>
-
1
&&
Game
.
getIns
().
state
!=
GAME_STATE
.
WAIT
)
{
cc
.
audioEngine
.
stopAllEffects
();
// pg.audio.stopAudio(this.audioId);
}
}
private
showVs
()
{
...
...
assets/gofishing/scene/tool/Game.ts
View file @
9f8aa7ad
...
...
@@ -42,10 +42,12 @@ export class Item {
public
audio
;
public
duration
;
public
optionList
;
public
img
;
constructor
(
data
,
page
)
{
this
.
audio
=
data
.
questionAudio
;
this
.
duration
=
data
.
duration
;
let
id
=
0
;
this
.
img
=
data
.
questionImg
;
this
.
optionList
=
data
.
options
.
map
(
o
=>
{
return
new
Option
(
o
,
id
++
);
...
...
assets/gofishing/script/defaultData.ts
View file @
9f8aa7ad
...
...
@@ -2,5 +2,25 @@ export const defaultData =
{
"
onlineFlg
"
:
false
,
"
title
"
:
"
疯狂打地鼠
"
,
"
questionText
"
:
"
调皮的地鼠偷走了魔法卡牌,亲爱的小玩家,请仔细听游戏指令,快速找到藏着正确魔法卡牌的地鼠,用锤子敲打它,就能夺回魔法卡牌。在本次的游戏中,你将和其他玩家进行PK,游戏结束,获得魔法卡牌数量最多的玩家,将获得胜利。最后根据获得的魔法卡牌数量,你将获得相应的能量石奖励!开始挑战吧!
"
,
"
questionTextAudio
"
:
"
http://staging-teach.cdn.ireadabc.com/d08192ced3bd81941d38941bb36e5042_l.mp3
"
,
"
questions
"
:
[{
"
questionAudio
"
:
"
http://staging-teach.cdn.ireadabc.com/130feba39f7665f46adfc6765f86c6cd_l.mp3
"
,
"
duration
"
:
120
,
"
options
"
:
[{
"
type
"
:
"
img
"
,
"
image
"
:
"
http://staging-teach.cdn.ireadabc.com/317ef6895381d2f926a0d444326a5995.png
"
,
"
audio
"
:
"
http://staging-teach.cdn.ireadabc.com/f03e207cb6808b17c1510b230a70bb1d_l.mp3
"
,
"
text
"
:
""
,
"
right
"
:
true
,
"
audioName
"
:
"
加分.mp3
"
},
{
"
type
"
:
"
txt
"
,
"
image
"
:
""
,
"
audio
"
:
"
http://staging-teach.cdn.ireadabc.com/7432c9bfa754a4c9db54132308e8ce1f_l.mp3
"
,
"
text
"
:
"
xfuw
"
,
"
right
"
:
false
,
"
audioName
"
:
"
冒出.mp3
"
},
{
"
type
"
:
"
txt
"
,
"
image
"
:
""
,
"
audio
"
:
"
http://staging-teach.cdn.ireadabc.com/274d8965edafabf1e8d1a01400db82b7_l.mp3
"
,
"
text
"
:
"
head
"
,
"
right
"
:
true
,
"
audioName
"
:
"
错误.mp3
"
},
{
"
type
"
:
"
img
"
,
"
image
"
:
"
http://staging-teach.cdn.ireadabc.com/fc1d670c1a3461136506195e3e9e3797.png
"
,
"
audio
"
:
"
http://staging-teach.cdn.ireadabc.com/7432c9bfa754a4c9db54132308e8ce1f_l.mp3
"
,
"
text
"
:
""
,
"
right
"
:
false
,
"
audioName
"
:
"
冒出.mp3
"
}],
"
questionImg
"
:
"
http://staging-teach.cdn.ireadabc.com/317ef6895381d2f926a0d444326a5995.png
"
,
"
audioName
"
:
"
胜利.mp3
"
},
{
"
questionAudio
"
:
"
http://staging-teach.cdn.ireadabc.com/26e6e997562503a98918fadab7e7b6c2_l.mp3
"
,
"
duration
"
:
120
,
"
options
"
:
[{
"
type
"
:
"
img
"
,
"
image
"
:
"
http://staging-teach.cdn.ireadabc.com/fea420e83bd2ba03d014c279de780599.png
"
,
"
audio
"
:
"
http://staging-teach.cdn.ireadabc.com/7432c9bfa754a4c9db54132308e8ce1f_l.mp3
"
,
"
text
"
:
""
,
"
right
"
:
true
,
"
audioName
"
:
"
冒出.mp3
"
},
{
"
type
"
:
"
txt
"
,
"
image
"
:
""
,
"
audio
"
:
"
http://staging-teach.cdn.ireadabc.com/274d8965edafabf1e8d1a01400db82b7_l.mp3
"
,
"
text
"
:
"
eye
"
,
"
right
"
:
true
,
"
audioName
"
:
"
错误.mp3
"
},
{
"
type
"
:
"
txt
"
,
"
image
"
:
""
,
"
audio
"
:
"
http://staging-teach.cdn.ireadabc.com/f03e207cb6808b17c1510b230a70bb1d_l.mp3
"
,
"
text
"
:
"
fffsxz
"
,
"
right
"
:
false
,
"
audioName
"
:
"
加分.mp3
"
},
{
"
type
"
:
"
img
"
,
"
image
"
:
"
http://staging-teach.cdn.ireadabc.com/01247e69d70b995da41e6b7e2000b540.png
"
,
"
audio
"
:
"
http://staging-teach.cdn.ireadabc.com/f7fb9f71ab7d460ac2f78c85efba7610_l.mp3
"
,
"
text
"
:
""
,
"
right
"
:
false
,
"
audioName
"
:
"
按钮.mp3
"
}],
"
questionImg
"
:
"
http://staging-teach.cdn.ireadabc.com/fea420e83bd2ba03d014c279de780599.png
"
,
"
audioName
"
:
"
失败.mp3
"
}],
"
audioName
"
:
"
头像移动.mp3
"
,
"
bgAudio
"
:
"
http://staging-teach.cdn.ireadabc.com/93bb9ed985cff104879f4b4fa6ace4ea_l.mp3
"
"
questionText
"
:
"
调皮的地鼠偷走了魔法卡牌,亲爱的小玩家,请仔细听游戏指令,快速找到藏着正确魔法卡牌的地鼠,用锤子敲打它,就能夺回魔法卡牌。在本次的游戏中,你将和其他玩家进行PK,游戏结束,获得魔法卡牌数量最多的玩家,将获得胜利。最后根据获得的魔法卡牌数量,你将获得相应的能量石奖励!开始挑战吧!
"
,
"
questionTextAudio
"
:
"
http://staging-teach.cdn.ireadabc.com/d08192ced3bd81941d38941bb36e5042_l.mp3
"
,
"
questions
"
:
[
{
"
questionAudio
"
:
"
http://staging-teach.cdn.ireadabc.com/130feba39f7665f46adfc6765f86c6cd_l.mp3
"
,
"
duration
"
:
120
,
"
options
"
:
[{
"
type
"
:
"
img
"
,
"
image
"
:
"
http://staging-teach.cdn.ireadabc.com/317ef6895381d2f926a0d444326a5995.png
"
,
"
audio
"
:
"
http://staging-teach.cdn.ireadabc.com/f03e207cb6808b17c1510b230a70bb1d_l.mp3
"
,
"
text
"
:
""
,
"
right
"
:
true
,
"
audioName
"
:
"
加分.mp3
"
},
{
"
type
"
:
"
txt
"
,
"
image
"
:
""
,
"
audio
"
:
"
http://staging-teach.cdn.ireadabc.com/7432c9bfa754a4c9db54132308e8ce1f_l.mp3
"
,
"
text
"
:
"
xfuw
"
,
"
right
"
:
false
,
"
audioName
"
:
"
冒出.mp3
"
},
{
"
type
"
:
"
txt
"
,
"
image
"
:
""
,
"
audio
"
:
"
http://staging-teach.cdn.ireadabc.com/274d8965edafabf1e8d1a01400db82b7_l.mp3
"
,
"
text
"
:
"
head
"
,
"
right
"
:
true
,
"
audioName
"
:
"
错误.mp3
"
},
{
"
type
"
:
"
img
"
,
"
image
"
:
"
http://staging-teach.cdn.ireadabc.com/fc1d670c1a3461136506195e3e9e3797.png
"
,
"
audio
"
:
"
http://staging-teach.cdn.ireadabc.com/7432c9bfa754a4c9db54132308e8ce1f_l.mp3
"
,
"
text
"
:
""
,
"
right
"
:
false
,
"
audioName
"
:
"
冒出.mp3
"
}],
"
questionImg
"
:
"
http://staging-teach.cdn.ireadabc.com/317ef6895381d2f926a0d444326a5995.png
"
,
"
audioName
"
:
"
胜利.mp3
"
},
{
"
questionAudio
"
:
"
http://staging-teach.cdn.ireadabc.com/26e6e997562503a98918fadab7e7b6c2_l.mp3
"
,
"
duration
"
:
120
,
"
options
"
:
[{
"
type
"
:
"
img
"
,
"
image
"
:
"
http://staging-teach.cdn.ireadabc.com/fea420e83bd2ba03d014c279de780599.png
"
,
"
audio
"
:
"
http://staging-teach.cdn.ireadabc.com/7432c9bfa754a4c9db54132308e8ce1f_l.mp3
"
,
"
text
"
:
""
,
"
right
"
:
true
,
"
audioName
"
:
"
冒出.mp3
"
},
{
"
type
"
:
"
txt
"
,
"
image
"
:
""
,
"
audio
"
:
"
http://staging-teach.cdn.ireadabc.com/274d8965edafabf1e8d1a01400db82b7_l.mp3
"
,
"
text
"
:
"
eye
"
,
"
right
"
:
true
,
"
audioName
"
:
"
错误.mp3
"
},
{
"
type
"
:
"
txt
"
,
"
image
"
:
""
,
"
audio
"
:
"
http://staging-teach.cdn.ireadabc.com/f03e207cb6808b17c1510b230a70bb1d_l.mp3
"
,
"
text
"
:
"
fffsxz
"
,
"
right
"
:
false
,
"
audioName
"
:
"
加分.mp3
"
},
{
"
type
"
:
"
img
"
,
"
image
"
:
"
http://staging-teach.cdn.ireadabc.com/01247e69d70b995da41e6b7e2000b540.png
"
,
"
audio
"
:
"
http://staging-teach.cdn.ireadabc.com/f7fb9f71ab7d460ac2f78c85efba7610_l.mp3
"
,
"
text
"
:
""
,
"
right
"
:
false
,
"
audioName
"
:
"
按钮.mp3
"
}],
"
questionImg
"
:
"
http://staging-teach.cdn.ireadabc.com/fea420e83bd2ba03d014c279de780599.png
"
,
"
audioName
"
:
"
失败.mp3
"
}],
"
audioName
"
:
"
头像移动.mp3
"
,
"
bgAudio
"
:
"
http://staging-teach.cdn.ireadabc.com/93bb9ed985cff104879f4b4fa6ace4ea_l.mp3
"
}
\ No newline at end of file
assets/gofishing/textures/view.png
View replaced file @
807e2ac9
View file @
9f8aa7ad
This diff is collapsed.
Click to expand it.
assets/gofishing/textures/打地鼠/text_round.png.meta
View file @
9f8aa7ad
{
"ver": "2.3.5",
"uuid": "
28a64216-70e2-481e-b68f-fe1903e2855c
",
"uuid": "
0dcbe4c6-9dc4-4f4d-84bc-81382889e5c5
",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
...
...
@@ -13,8 +13,8 @@
"subMetas": {
"text_round": {
"ver": "1.0.4",
"uuid": "8
5b42405-9be3-45cc-8094-724da319850f
",
"rawTextureUuid": "
28a64216-70e2-481e-b68f-fe1903e2855c
",
"uuid": "8
bf6fd14-026b-4777-b9b7-69d9b17d97f0
",
"rawTextureUuid": "
0dcbe4c6-9dc4-4f4d-84bc-81382889e5c5
",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
...
...
creator.d.ts
View file @
9f8aa7ad
...
...
@@ -4588,6 +4588,7 @@ declare namespace cc {
/** !#en Returns a normalized vector representing the forward direction (Z axis) of the node in world space.
!#zh 获取节点正前方(z 轴)面对的方向,返回值为世界坐标系下的归一化向量 */
forward
:
Vec3
;
data
:
Option
;
/**
@param name name
form/src/app/form/ComponentBase.ts
View file @
9f8aa7ad
...
...
@@ -67,12 +67,12 @@ export class ComponentBase {
* 储存音频数据
* @param e
*/
onAudioUploadSuccess
(
e
,
key
,
it
=
this
.
item
)
{
onAudioUploadSuccess
(
e
,
key
,
it
=
this
.
item
,
name
=
'
audioName
'
)
{
let
url
=
e
.
url
;
let
sp
=
url
.
split
(
"
.mp3
"
);
let
u
=
sp
[
0
]
+
"
_l.mp3
"
;
it
[
key
]
=
u
;
it
[
"
audioName
"
]
=
e
.
name
||
""
;
it
[
name
]
=
e
.
name
||
""
;
this
.
save
();
}
...
...
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