Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
DF-L211
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
DF-L211
Commits
2408c97e
Commit
2408c97e
authored
May 27, 2020
by
Chen Jiping
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
完善
parent
56648c24
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
21 additions
and
42 deletions
+21
-42
Exercises.ts
src/app/play/Exercises.ts
+2
-2
Player.ts
src/app/play/Player.ts
+0
-3
Stage.ts
src/app/play/Stage.ts
+17
-33
play.component.css
src/app/play/play.component.css
+2
-2
play.component.ts
src/app/play/play.component.ts
+0
-2
stage_box.png
src/assets/play/stage_box.png
+0
-0
No files found.
src/app/play/Exercises.ts
View file @
2408c97e
...
...
@@ -117,9 +117,9 @@ export class Answer{
content_val
.
text
=
this
.
answerContent
.
text
;
content_val
.
textAlign
=
'
middle
'
;
content_val
.
fontSize
=
66
;
content_val
.
fontName
=
"
arial
"
;
content_val
.
fontName
=
"
MMTextBook-Bold
"
;
content_val
.
fontColor
=
"
#FBEB4F
"
;
content_val
.
setOutline
(
3
,
'
#315305
'
);
content_val
.
setOutline
(
5
,
'
#315305
'
);
content_val
.
alpha
=
0
;
content_val
.
refreshSize
();
...
...
src/app/play/Player.ts
View file @
2408c97e
...
...
@@ -57,9 +57,6 @@ export class Player {
let
width
=
playerPic
.
getBoundingBox
().
width
;
let
height
=
playerPic
.
getBoundingBox
().
height
;
let
rect
=
{
x
:
0
,
y
:
0
,
width
:
width
,
height
:
height
};
playerPic
.
setShowRect
(
rect
);
const
bg
=
new
ShapeRect
();
bg
.
setSize
(
width
,
height
);
bg
.
alpha
=
0
;
...
...
src/app/play/Stage.ts
View file @
2408c97e
...
...
@@ -28,23 +28,23 @@ export class Stage {
rightDoor
;
rightDorrInitX
;
constructor
(
images
){
constructor
(
images
)
{
this
.
images
=
images
;
}
setScaleXY
(
scale
){
setScaleXY
(
scale
)
{
this
.
scaleX
=
this
.
scaleY
=
scale
;
}
init
(){
init
()
{
const
stage_box
=
new
MySprite
();
stage_box
.
init
(
this
.
images
.
get
(
'
stage_box
'
));
stage_box
.
init
(
this
.
images
.
get
(
'
stage_box
'
)
,
0.5
,
1
);
stage_box
.
scaleX
=
this
.
scaleX
;
stage_box
.
scaleY
=
this
.
scaleY
;
let
width
=
stage_box
.
getBoundingBox
().
width
;
let
height
=
stage_box
.
getBoundingBox
().
height
;
let
width
=
1280
*
this
.
scaleX
;
let
height
=
713
*
this
.
scaleY
;
const
bg
=
new
ShapeRect
();
...
...
@@ -57,7 +57,7 @@ export class Stage {
stage_bg
.
scaleX
=
this
.
scaleX
;
stage_bg
.
scaleY
=
this
.
scaleY
;
stage_bg
.
x
=
width
/
2
;
stage_bg
.
y
=
5
2
*
this
.
scaleY
+
stage_bg
.
getBoundingBox
().
height
/
2
;
stage_bg
.
y
=
5
3
*
this
.
scaleY
+
stage_bg
.
getBoundingBox
().
height
/
2
;
bg
.
addChild
(
stage_bg
);
...
...
@@ -88,28 +88,12 @@ export class Stage {
//初始化门
this
.
initDoor
();
stage_box
.
x
=
width
/
2
;
stage_box
.
y
=
height
/
2
;
stage_box
.
x
=
width
/
2
+
1
*
this
.
scaleX
;
stage_box
.
y
=
height
;
bg
.
addChild
(
stage_box
);
const
left
=
new
MySprite
();
left
.
init
(
this
.
images
.
get
(
'
bg_1
'
));
left
.
scaleX
=
this
.
scaleX
;
left
.
scaleY
=
this
.
scaleY
;
left
.
x
=
-
left
.
getBoundingBox
().
width
/
2
;
left
.
y
=
height
-
left
.
getBoundingBox
().
height
/
2
;
bg
.
addChild
(
left
);
const
right
=
new
MySprite
();
right
.
init
(
this
.
images
.
get
(
'
bg_1
'
));
right
.
scaleX
=
this
.
scaleX
;
right
.
scaleY
=
this
.
scaleY
;
right
.
x
=
bg
.
width
+
left
.
getBoundingBox
().
width
/
2
;
right
.
y
=
left
.
y
;
bg
.
addChild
(
right
);
}
private
initDoor
(){
private
initDoor
()
{
const
leftDoor
=
new
MySprite
();
leftDoor
.
init
(
this
.
images
.
get
(
'
doorleft
'
),
0
);
leftDoor
.
scaleX
=
this
.
scaleX
;
...
...
@@ -131,21 +115,21 @@ export class Stage {
this
.
rightDorrInitX
=
rightDoor
.
x
;
}
setPromptText
(
text
){
setPromptText
(
text
)
{
this
.
prompt
.
text
=
text
;
}
closeDoor
(
callback
=
null
){
closeDoor
(
callback
=
null
)
{
tweenChange
(
this
.
leftDoor
,
{
x
:
75
*
this
.
scaleX
},
2
,
callback
);
tweenChange
(
this
.
leftDoor
,
{
x
:
75
*
this
.
scaleX
},
2
,
callback
);
let
toX
=
this
.
rightDorrInitX
-
this
.
rightDoor
.
getBoundingBox
().
width
;
tweenChange
(
this
.
rightDoor
,
{
x
:
toX
},
2
);
tweenChange
(
this
.
rightDoor
,
{
x
:
toX
},
2
);
}
openDoor
(
callback
=
null
){
tweenChange
(
this
.
leftDoor
,
{
x
:
this
.
leftDoorInitX
},
2
,
callback
);
openDoor
(
callback
=
null
)
{
tweenChange
(
this
.
leftDoor
,
{
x
:
this
.
leftDoorInitX
},
2
,
callback
);
tweenChange
(
this
.
rightDoor
,
{
x
:
this
.
rightDorrInitX
},
2
);
tweenChange
(
this
.
rightDoor
,
{
x
:
this
.
rightDorrInitX
},
2
);
}
}
\ No newline at end of file
src/app/play/play.component.css
View file @
2408c97e
...
...
@@ -19,6 +19,6 @@
@font-face
{
font-family
:
'
arial
'
;
src
:
url("../../assets/font/
arial.t
tf")
;
font-family
:
'
MMTextBook-Bold
'
;
src
:
url("../../assets/font/
MMTextBook-Bold.o
tf")
;
}
\ No newline at end of file
src/app/play/play.component.ts
View file @
2408c97e
...
...
@@ -647,8 +647,6 @@ export class PlayComponent implements OnInit, OnDestroy {
*/
initView
()
{
this
.
initBg
();
this
.
initPic
();
this
.
initPlayer
();
...
...
src/assets/play/stage_box.png
View replaced file @
56648c24
View file @
2408c97e
373 KB
|
W:
|
H:
429 KB
|
W:
|
H:
2-up
Swipe
Onion skin
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