Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
Cocos-GoldenMiner
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
等吃饭
Cocos-GoldenMiner
Commits
6ce3a256
Commit
6ce3a256
authored
Apr 14, 2023
by
Friends233
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
测试面板
parent
0486f6a6
Changes
2
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
879 additions
and
17 deletions
+879
-17
Game.fire
assets/Scenes/Game.fire
+859
-13
GameScene.ts
assets/Script/GameScene.ts
+20
-4
No files found.
assets/Scenes/Game.fire
View file @
6ce3a256
This diff is collapsed.
Click to expand it.
assets/Script/GameScene.ts
View file @
6ce3a256
...
...
@@ -24,15 +24,15 @@ const CLIP_STATE = {
@
ccclass
export
default
class
GameScene
extends
cc
.
Component
{
/** 单格进度条 */
@
property
(
cc
.
Prefab
)
@
property
(
{
type
:
cc
.
Prefab
,
displayName
:
'单格进度条'
}
)
procItem
:
cc
.
Prefab
=
null
/** 舞台道具 */
@
property
(
[
cc
.
Prefab
]
)
@
property
(
{
type
:
[
cc
.
Prefab
],
displayName
:
'舞台道具'
}
)
propItem
:
cc
.
Prefab
[]
=
[]
/** 加分道具 */
@
property
(
cc
.
Prefab
)
@
property
(
{
type
:
cc
.
Prefab
,
displayName
:
'加分道具'
}
)
bsetPropItem
:
cc
.
Prefab
=
null
/** 当前关卡 0、1、2... */
...
...
@@ -75,7 +75,7 @@ export default class GameScene extends cc.Component {
/** 开启碰撞检测 */
const
cm
=
cc
.
director
.
getCollisionManager
()
cm
.
enabled
=
true
cm
.
enabledDebugDraw
=
true
;
//
cm.enabledDebugDraw = true;
}
start
()
{
...
...
@@ -113,6 +113,22 @@ export default class GameScene extends cc.Component {
gameBtn
.
on
(
cc
.
Node
.
EventType
.
TOUCH_END
,
this
.
playGame
,
this
)
this
.
node
.
on
(
CUSTOM_EVENT
.
CLIP_ANI_END
,
this
.
onAnimCompleted
,
this
)
this
.
node
.
on
(
CUSTOM_EVENT
.
CLIP_COLLISION
,
this
.
onCollEnter
,
this
)
// TODO 测试用
const
href
=
window
?.
location
?.
href
const
isTest
=
href
?.
includes
(
'duibadev'
)
||
href
?.
includes
(
'duibatest'
)
||
href
?.
includes
(
'localhost'
)
const
testNode
=
cc
.
find
(
'test'
,
this
.
node
)
testNode
.
active
=
isTest
if
(
isTest
)
{
const
testEventMap
=
{
next
:
'nextLevel'
,
refreshProp
:
'refreshStageProps'
,
addTime
:
'addTime'
}
testNode
.
children
.
forEach
((
n
)
=>
{
const
event
=
this
?.[
testEventMap
[
n
.
name
]]
n
.
on
(
cc
.
Node
.
EventType
.
TOUCH_END
,
event
,
this
)
})
}
}
/**
...
...
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