Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
dap-hu
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
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
Vũ Gia Vương
dap-hu
Commits
5fabb20b
Commit
5fabb20b
authored
Apr 02, 2025
by
Vũ Gia Vương
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update BreakingBottleScreen
parent
417b3c67
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
588 additions
and
552 deletions
+588
-552
main.fire
assets/main.fire
+560
-550
BreakingBottleController.ts
assets/scripts/GamePlay/BreakingBottleController.ts
+1
-1
FragmentController.ts
assets/scripts/GamePlay/FragmentController.ts
+1
-0
ActionScreen.ts
assets/scripts/UI/ActionScreen.ts
+3
-1
BreakingBottleScreen.ts
assets/scripts/UI/BreakingBottleScreen.ts
+23
-0
No files found.
assets/main.fire
View file @
5fabb20b
This diff is collapsed.
Click to expand it.
assets/scripts/GamePlay/BreakingBottleController.ts
View file @
5fabb20b
...
...
@@ -22,9 +22,9 @@ export default class BreakingBottleController extends cc.Component {
this
.
_cardNode
=
this
.
node
.
getComponentInChildren
(
TheController
).
node
;
this
.
_cardNode
.
active
=
false
;
this
.
node
.
position
=
cc
.
v3
(
0
,
0
);
this
.
node
.
on
(
cc
.
Node
.
EventType
.
TOUCH_START
,
this
.
onTouchStart
,
this
);
this
.
node
.
on
(
cc
.
Node
.
EventType
.
TOUCH_END
,
this
.
onTouchEnd
,
this
);
eventTarget
.
on
(
CHECK_FRAGMENT
,
this
.
checkFragment
,
this
);
eventTarget
.
on
(
HAMMER
,
this
.
onHammer
,
this
);
}
...
...
assets/scripts/GamePlay/FragmentController.ts
View file @
5fabb20b
...
...
@@ -16,6 +16,7 @@ export default class FragmentController extends cc.Component {
this
.
_physicsCollider
.
points
=
this
.
_collider
.
points
;
this
.
_physicsCollider
.
enabled
=
false
;
this
.
_rg
=
this
.
node
.
getComponent
(
cc
.
RigidBody
);
this
.
_rg
.
type
=
cc
.
RigidBodyType
.
Static
;
eventTarget
.
on
(
CHECK_TOUCH
,
this
.
checkTouch
,
this
);
}
...
...
assets/scripts/UI/ActionScreen.ts
View file @
5fabb20b
import
{
eventTarget
,
PLAY_ANIM_NUT1
,
PLAY_ANIM_NUT2
,
PLAY_ANIM_NUT3
,
PLAY_ANIM_NUT4
,
SHOW_ACTION_SCREEN
,
SHOW_
CARD_POPUP
,
SHOW_
START_SCREEN
}
from
"../Events"
;
import
{
eventTarget
,
PLAY_ANIM_NUT1
,
PLAY_ANIM_NUT2
,
PLAY_ANIM_NUT3
,
PLAY_ANIM_NUT4
,
SHOW_ACTION_SCREEN
,
SHOW_START_SCREEN
}
from
"../Events"
;
import
BuaController
from
"../GamePlay/BuaController"
;
const
{
ccclass
,
property
}
=
cc
.
_decorator
;
...
...
@@ -14,6 +14,8 @@ export default class ActionScreen extends cc.Component {
private
_spine
:
sp
.
Skeleton
=
null
;
onLoad
()
{
return
;
eventTarget
.
on
(
SHOW_ACTION_SCREEN
,
this
.
showScreen
,
this
);
eventTarget
.
on
(
SHOW_START_SCREEN
,
this
.
hideScreen
,
this
);
eventTarget
.
on
(
PLAY_ANIM_NUT1
,
this
.
hideBottle
,
this
);
...
...
assets/scripts/UI/BreakingBottleScreen.ts
View file @
5fabb20b
import
{
eventTarget
,
SHOW_ACTION_SCREEN
,
SHOW_START_SCREEN
}
from
"../Events"
;
const
{
ccclass
,
property
}
=
cc
.
_decorator
;
@
ccclass
export
default
class
BreakingBottleScreen
extends
cc
.
Component
{
onLoad
()
{
eventTarget
.
on
(
SHOW_ACTION_SCREEN
,
this
.
showScreen
,
this
);
eventTarget
.
on
(
SHOW_START_SCREEN
,
this
.
hideScreen
,
this
);
// this.node.position = cc.v3(400, 600, 0);
}
private
hideBottle
()
{
// this.bottleAction.active = true;
// this.bottleIdle.active = false;
}
private
showScreen
()
{
console
.
log
(
'showScreen'
,
this
.
node
)
// this.bottleAction.active = false;
// this.bottleIdle.active = true;
// this._spine.setAnimation(0, 'Idle', true);
// this._buaController.onSetTool();
this
.
node
.
active
=
true
;
this
.
node
.
position
=
cc
.
v3
();
}
private
hideScreen
()
{
this
.
node
.
active
=
false
;
}
}
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