Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
op_input
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
op_input
Commits
03a45a60
Commit
03a45a60
authored
Sep 08, 2022
by
Tt
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://120.27.1.210:43210/huiwan/op_input
into master
parents
2d37d334
f1a71cf3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
13 deletions
+10
-13
op_input.ts
assets/op_input/scene/op_input.ts
+10
-13
No files found.
assets/op_input/scene/op_input.ts
View file @
03a45a60
...
...
@@ -24,6 +24,7 @@ export default class PuzzleJigsaw extends MyCocosSceneComponent {
}
onLoadEnd
()
{
cc
.
macro
.
ENABLE_MULTI_TOUCH
=
false
;
// TODO 加载完成后的逻辑写在这里, 下面的代码仅供参考
this
.
initData
();
this
.
initView
();
...
...
@@ -223,6 +224,7 @@ export default class PuzzleJigsaw extends MyCocosSceneComponent {
}
}
onItemTouchStart
(
e
)
{
if
(
this
.
checkRoundOver
())
return
;
let
target
:
cc
.
Node
=
e
.
target
;
let
data
=
target
.
data
;
//已经成功的方块要拒绝掉
...
...
@@ -232,12 +234,14 @@ export default class PuzzleJigsaw extends MyCocosSceneComponent {
this
.
setTouchPos
(
e
);
}
onItemTouchMove
(
e
)
{
if
(
this
.
checkRoundOver
())
return
;
let
target
:
cc
.
Node
=
e
.
target
;
let
data
=
target
.
data
;
//已经成功的方块要拒绝掉
this
.
setTouchPos
(
e
);
}
onItemTouchEnd
(
e
)
{
if
(
this
.
checkRoundOver
())
return
;
let
target
:
cc
.
Node
=
e
.
target
;
let
data
=
target
.
data
;
let
itemBg
=
this
.
wordItams
.
find
((
bg
)
=>
{
...
...
@@ -259,7 +263,7 @@ export default class PuzzleJigsaw extends MyCocosSceneComponent {
itemBg
.
errorCount
++
;
if
(
itemBg
.
errorCount
>=
3
)
{
this
.
errorThere
(
target
,
itemBg
);
this
.
playLocalAudio
(
"
right
"
);
this
.
playLocalAudio
(
"
right
"
,
0.6
);
this
.
roundOver
();
}
else
{
this
.
playLocalAudio
(
"
error
"
);
...
...
@@ -276,7 +280,7 @@ export default class PuzzleJigsaw extends MyCocosSceneComponent {
let
line
=
cc
.
find
(
"
line
"
,
item
);
word
.
active
=
true
;
line
.
active
=
false
;
this
.
playLocalAudio
(
"
right
"
);
this
.
playLocalAudio
(
"
right
"
,
0.6
);
this
.
roundOver
();
}
private
moveError
(
target
,
data
)
{
...
...
@@ -360,22 +364,15 @@ export default class PuzzleJigsaw extends MyCocosSceneComponent {
let
mao_ske
=
cc
.
find
(
"
mao_ske
"
,
this
.
node
);
let
ske
=
mao_ske
.
getComponent
(
dragonBones
.
ArmatureDisplay
).
playAnimation
(
aniName
,
0
);
}
playLocalAudio
(
audioName
)
{
playLocalAudio
(
audioName
,
volume
=
1
)
{
const
audio
=
cc
.
find
(
`Canvas/res/audio/
${
audioName
}
`
).
getComponent
(
cc
.
AudioSource
);
return
new
Promise
((
resolve
,
reject
)
=>
{
cc
.
audioEngine
.
setEffectsVolume
(
volume
);
const
id
=
cc
.
audioEngine
.
playEffect
(
audio
.
clip
,
false
);
cc
.
audioEngine
.
setFinishCallback
(
id
,
()
=>
{
cc
.
audioEngine
.
setEffectsVolume
(
1
);
resolve
(
id
);
});
})
}
}
/**
* 新游的调整
1. 不是播一个单词 换一轮 是播完所有单词 开始换第二轮
2. 最后弹出完整单词的时候 字母间不要有间距
3. 第二轮不需要题目音频
4. 第二轮 问号是可以点击的 发单词音
5. 播放完成音效的同时 弹出goodjob goodjob不消失
6. 音频加一个第二轮引导音频 在开始第二轮的时候 小猫自动播放第二轮引导音频
*/
\ No newline at end of file
}
\ No newline at end of file
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