Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MRBR04
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
MRBR04
Commits
f81508e1
Commit
f81508e1
authored
May 04, 2022
by
yu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
5.4调整
parent
98c7544e
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
24 additions
and
11 deletions
+24
-11
mouse_end.js
assets/MRBR04/mouse/end/mouse_end.js
+5
-1
MRBR04.fire
assets/MRBR04/scene/MRBR04.fire
+2
-2
MRBR04.ts
assets/MRBR04/scene/MRBR04.ts
+15
-6
util.ts
assets/MRBR04/script/util.ts
+2
-2
No files found.
assets/MRBR04/mouse/end/mouse_end.js
View file @
f81508e1
...
...
@@ -41,9 +41,13 @@ cc.Class({
let
db
=
this
.
ske
.
getComponent
(
dragonBones
.
ArmatureDisplay
)
db
.
playAnimation
(
'
normal
'
,
1
);
db
.
addEventListener
(
"
loopComplete
"
,
()
=>
{
resolve
(
''
);
//
resolve('');
})
setTimeout
(()
=>
{
resolve
(
''
);
},
2000
);
});
}
// update (dt) {},
});
assets/MRBR04/scene/MRBR04.fire
View file @
f81508e1
...
...
@@ -10835,12 +10835,12 @@
"startPosition": {
"__type__": "cc.Vec2",
"x": 8000,
"y": -2
440.2
"y": -2
200
},
"targetPosition": {
"__type__": "cc.Vec2",
"x": 4871.09,
"y": -2
440.2
"y": -2
200
},
"moveInTime": 1,
"_id": "e8cKr7zhZHuYKHHxTDRZZj"
...
...
assets/MRBR04/scene/MRBR04.ts
View file @
f81508e1
...
...
@@ -365,7 +365,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
desc
.
getComponent
(
cc
.
Label
).
string
=
data
.
text
;
setTimeout
(()
=>
{
if
(
desc
.
width
-
item
.
width
>
-
15
&&
item
.
name
!=
"
type4
"
)
{
item
.
width
=
desc
.
width
+
3
0
;
item
.
width
=
desc
.
width
+
6
0
;
img_laba02
.
opacity
=
data
.
audio_url
?
255
:
0
;
}
},
30
);
...
...
@@ -523,21 +523,29 @@ export default class SceneComponent extends MyCocosSceneComponent {
// this.lined.push(line);
let
deltaY
=
pos1
.
y
-
pos2
.
y
;
let
drawX
=
pos1
.
x
;
let
drawX
=
pos1
.
x
+
1
;
let
drawY
=
pos1
.
y
+
1
;
this
.
schedule
(
()
=>
{
// graphics.moveTo(drawX, drawY);
// drawY = drawY - deltaY / 30;
// drawX = ((drawY - pos2.y) * (pos1.x - pos2.x)) / (pos1.y - pos2.y) + pos2.x;
// let a = ((drawY - pos2.y) * (pos1.x - pos2.x));
// let b = (pos1.y - pos2.y) + pos2.x;
// drawX = Math.abs(a / b);
// drawX = drawX - deltaY / 30;
// drawY = ((drawY - pos2.y) * (pos1.x + pos2.x)) / (pos1.y - pos2.y) + pos2.y;
// graphics.lineTo(drawX, drawY);
graphics
.
moveTo
(
pos1
.
x
,
pos1
.
y
);
graphics
.
lineTo
(
pos2
.
x
,
pos2
.
y
);
graphics
.
stroke
();
this
.
resetLayout
();
},
0.3
/
30
,
30
);
this
.
scheduleOnce
(()
=>
{
this
.
resetLayout
();
},
0.15
);
this
.
_drawIndex
++
;
if
(
this
.
_drawIndex
>=
this
.
data
.
item
[
this
.
roundIdx
].
group
.
length
)
{
this
.
scheduleOnce
(()
=>
{
...
...
@@ -555,6 +563,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
let
mouse_end
=
pg
.
view
.
find
(
this
,
"
mouse_end
"
);
mouse_end
.
active
=
true
;
mouse_end
.
getComponent
(
"
mouse_end
"
).
play
().
then
(()
=>
{
onHomeworkFinish
();
})
},
1800
);
}
...
...
@@ -582,7 +591,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
if
(
isSpY
)
item
=
cc
.
instantiate
(
cc
.
find
(
"
items/type1
"
,
this
.
node
));
else
item
=
cc
.
instantiate
(
cc
.
find
(
"
items/type5
"
,
this
.
node
));
}
else
{
if
(
isSpY
)
item
=
cc
.
instantiate
(
cc
.
find
(
"
items/type
4
"
,
this
.
node
));
if
(
isSpY
)
item
=
cc
.
instantiate
(
cc
.
find
(
"
items/type
1
"
,
this
.
node
));
else
item
=
cc
.
instantiate
(
cc
.
find
(
"
items/type5
"
,
this
.
node
));
}
}
else
if
(
this
.
upArr
.
length
==
3
)
{
...
...
@@ -590,7 +599,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
if
(
isSpY
)
item
=
cc
.
instantiate
(
cc
.
find
(
"
items/type1
"
,
this
.
node
));
else
item
=
cc
.
instantiate
(
cc
.
find
(
"
items/type6
"
,
this
.
node
));
}
else
{
if
(
isSpY
)
item
=
cc
.
instantiate
(
cc
.
find
(
"
items/type
4
"
,
this
.
node
));
if
(
isSpY
)
item
=
cc
.
instantiate
(
cc
.
find
(
"
items/type
1
"
,
this
.
node
));
else
item
=
cc
.
instantiate
(
cc
.
find
(
"
items/type6
"
,
this
.
node
));
}
}
...
...
assets/MRBR04/script/util.ts
View file @
f81508e1
...
...
@@ -415,9 +415,9 @@ export function onHomeworkFinish() {
const
middleLayer
=
cc
.
find
(
'
middleLayer
'
);
if
(
middleLayer
)
{
const
middleLayerComponent
=
middleLayer
.
getComponent
(
'
middleLayer
'
);
if
(
middleLayerComponent
.
role
==
'
student
'
)
{
//
if (middleLayerComponent.role == 'student') {
middleLayerComponent
.
onHomeworkFinish
(()
=>
{
});
}
//
}
}
else
{
console
.
log
(
'
onHomeworkFinish
'
);
}
...
...
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