Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
middleLayer_for_kyxq
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
middleLayer_for_kyxq
Commits
00d31af4
Commit
00d31af4
authored
Nov 13, 2023
by
李维
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加教师头像进入动画
parent
a75ed69d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
12 deletions
+21
-12
middleLayer_for_kyxq.fire
assets/middleLayer_for_kyxq/scene/middleLayer_for_kyxq.fire
+8
-8
MissionPage.ts
assets/middleLayer_for_kyxq/script/MissionPage.ts
+13
-4
No files found.
assets/middleLayer_for_kyxq/scene/middleLayer_for_kyxq.fire
View file @
00d31af4
...
@@ -21218,14 +21218,14 @@
...
@@ -21218,14 +21218,14 @@
},
},
"_anchorPoint": {
"_anchorPoint": {
"__type__": "cc.Vec2",
"__type__": "cc.Vec2",
"x": 0
.5
,
"x": 0,
"y": 0.5
"y": 0.5
},
},
"_trs": {
"_trs": {
"__type__": "TypedArray",
"__type__": "TypedArray",
"ctor": "Float64Array",
"ctor": "Float64Array",
"array": [
"array": [
-
685
,
-
900
,
-410,
-410,
0,
0,
0,
0,
...
@@ -21280,14 +21280,14 @@
...
@@ -21280,14 +21280,14 @@
},
},
"_anchorPoint": {
"_anchorPoint": {
"__type__": "cc.Vec2",
"__type__": "cc.Vec2",
"x": 0
.5
,
"x": 0,
"y": 0.5
"y": 0.5
},
},
"_trs": {
"_trs": {
"__type__": "TypedArray",
"__type__": "TypedArray",
"ctor": "Float64Array",
"ctor": "Float64Array",
"array": [
"array": [
-56.184
,
0
,
0,
0,
0,
0,
0,
0,
...
@@ -21372,15 +21372,15 @@
...
@@ -21372,15 +21372,15 @@
},
},
"_anchorPoint": {
"_anchorPoint": {
"__type__": "cc.Vec2",
"__type__": "cc.Vec2",
"x": 0
.5
,
"x": 0,
"y": 0.5
"y": 0.5
},
},
"_trs": {
"_trs": {
"__type__": "TypedArray",
"__type__": "TypedArray",
"ctor": "Float64Array",
"ctor": "Float64Array",
"array": [
"array": [
140.459
,
200
,
9.364
,
0
,
0,
0,
0,
0,
0,
0,
...
@@ -21447,7 +21447,7 @@
...
@@ -21447,7 +21447,7 @@
"_enabled": true,
"_enabled": true,
"alignMode": 1,
"alignMode": 1,
"_target": null,
"_target": null,
"_alignFlags":
12
,
"_alignFlags":
4
,
"_left": 50,
"_left": 50,
"_right": 0,
"_right": 0,
"_top": 0,
"_top": 0,
...
...
assets/middleLayer_for_kyxq/script/MissionPage.ts
View file @
00d31af4
...
@@ -78,10 +78,11 @@ export default class MissionPageClass extends PageComponentBaseClass {
...
@@ -78,10 +78,11 @@ export default class MissionPageClass extends PageComponentBaseClass {
const
headSprStr
=
unitConfigData
&&
unitConfigData
.
teacher_avatar
?
unitConfigData
.
teacher_avatar
:
""
;
const
headSprStr
=
unitConfigData
&&
unitConfigData
.
teacher_avatar
?
unitConfigData
.
teacher_avatar
:
""
;
if
(
headSprStr
)
{
if
(
headSprStr
)
{
getSprNodeByUrl
(
headSprStr
,
(
spr
)
=>
{
getSprNodeByUrl
(
headSprStr
,
(
spr
)
=>
{
this
.
headNode
.
addChild
(
spr
.
node
);
this
.
headNode
.
getComponent
(
cc
.
Sprite
).
spriteFrame
=
spr
.
spriteFrame
;
spr
.
srcBlendFactor
=
cc
.
macro
.
BlendFactor
.
ONE
;
spr
.
node
.
destroy
()
setSprNodeMaxLen
(
spr
.
node
,
this
.
headNode
.
width
,
this
.
headNode
.
height
);
setSprNodeMaxLen
(
this
.
headNode
,
this
.
headNode
.
width
,
this
.
headNode
.
height
);
this
.
headNode
.
active
=
true
;
this
.
showHeaderAnimation
()
});
});
}
}
...
@@ -345,6 +346,14 @@ export default class MissionPageClass extends PageComponentBaseClass {
...
@@ -345,6 +346,14 @@ export default class MissionPageClass extends PageComponentBaseClass {
}
}
}
}
showHeaderAnimation
()
{
const
width
=
cc
.
find
(
"
/Canvas
"
).
width
/
2
;
this
.
headNode
.
x
=
-
width
/
2
-
this
.
headNode
.
parent
.
width
;
this
.
headNode
.
active
=
true
;
cc
.
tween
(
this
.
headNode
).
to
(
0.5
,
{
x
:
-
width
/
2
+
this
.
headNode
.
parent
.
width
},
{
easing
:
"
cubicOut
"
}).
start
()
}
onClickOpenLessonPreview
()
{
onClickOpenLessonPreview
()
{
this
.
LessonPreview
.
active
=
true
this
.
LessonPreview
.
active
=
true
...
...
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