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
8e2c8cf7
Commit
8e2c8cf7
authored
May 07, 2025
by
Vũ Gia Vương
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add slot
parent
44938c22
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3764 additions
and
3762 deletions
+3764
-3762
main.fire
assets/main.fire
+3758
-3739
FragmentJarController.ts
assets/scripts/GamePlay/FragmentJarController.ts
+5
-5
StartScreen.ts
assets/scripts/UI/StartScreen.ts
+1
-18
No files found.
assets/main.fire
View file @
8e2c8cf7
This diff is collapsed.
Click to expand it.
assets/scripts/GamePlay/FragmentJarController.ts
View file @
8e2c8cf7
...
...
@@ -59,7 +59,7 @@ export default class FragmentJarController extends cc.Component {
}
private
checkTouch
(
point
:
cc
.
Vec2
)
{
if
(
this
.
isDropped
)
{
if
(
this
.
isDropped
||
this
.
isBottom
)
{
return
;
}
const
pos
=
point
.
clone
().
subtract
(
cc
.
v2
(
this
.
node
.
position
.
x
,
this
.
node
.
position
.
y
));
...
...
@@ -91,10 +91,10 @@ export default class FragmentJarController extends cc.Component {
return
;
}
if
(
this
.
isBottom
)
{
eventTarget
.
emit
(
DROP_ALL_FRAGMENT
)
return
;
}
//
if (this.isBottom) {
//
eventTarget.emit(DROP_ALL_FRAGMENT)
//
return;
//
}
this
.
dropFragment
();
}
...
...
assets/scripts/UI/StartScreen.ts
View file @
8e2c8cf7
import
{
eventTarget
,
SHOW_ACTION_SCREEN
,
SHOW_S
ELECT_POPUP
,
SHOW_S
TART_SCREEN
}
from
"../Events"
;
import
{
eventTarget
,
SHOW_ACTION_SCREEN
,
SHOW_START_SCREEN
}
from
"../Events"
;
import
{
Global
}
from
"../Global"
;
const
{
ccclass
,
property
}
=
cc
.
_decorator
;
...
...
@@ -8,30 +8,13 @@ export default class StartScreen extends cc.Component {
@
property
(
cc
.
Node
)
private
selectBtnNode
:
cc
.
Node
=
null
;
@
property
(
cc
.
Node
)
private
contentNode
:
cc
.
Node
=
null
;
@
property
(
cc
.
Node
)
private
checkedNode
:
cc
.
Node
=
null
;
protected
onLoad
():
void
{
this
.
selectBtnNode
.
on
(
'click'
,
this
.
onSelectBtnClick
,
this
);
this
.
contentNode
.
children
.
forEach
((
item
:
cc
.
Node
,
index
:
number
)
=>
{
item
.
on
(
cc
.
Node
.
EventType
.
TOUCH_START
,
()
=>
this
.
onItemNodeClick
(
item
,
index
),
this
);
});
eventTarget
.
on
(
SHOW_START_SCREEN
,
()
=>
this
.
node
.
active
=
true
,
this
);
eventTarget
.
on
(
SHOW_ACTION_SCREEN
,
()
=>
this
.
node
.
active
=
false
,
this
);
}
private
onItemNodeClick
(
item
:
cc
.
Node
,
index
:
number
)
{
this
.
checkedNode
.
active
=
true
;
this
.
checkedNode
.
setPosition
(
item
.
getPosition
());
Global
.
tool
=
index
;
}
private
onSelectBtnClick
()
{
Global
.
tool
=
3
;
eventTarget
.
emit
(
SHOW_ACTION_SCREEN
);
...
...
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