Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
X
xytk_cs_001
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
xytk_cs_001
Commits
6892e582
Commit
6892e582
authored
Feb 26, 2021
by
xytk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交代码
parent
94a68f48
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
7 deletions
+8
-7
Middle.ts
play/assets/tmpGame/script/Middle.ts
+1
-0
Scene.js
play/assets/tmpGame/script/Scene.js
+7
-7
No files found.
play/assets/tmpGame/script/Middle.ts
View file @
6892e582
...
...
@@ -48,6 +48,7 @@ export default class NewClass extends cc.Component {
* 飞入
*/
flyIn
(){
this
.
node
.
y
=
cc
.
winSize
.
height
/
2
+
50
;
let
tween
=
cc
.
tween
().
to
(
1
,{
y
:
0
},{
easing
:
"
quadOut
"
});
cc
.
tween
(
this
.
node
).
then
(
tween
).
start
();
}
...
...
play/assets/tmpGame/script/Scene.js
View file @
6892e582
...
...
@@ -218,22 +218,22 @@ cc.Class({
},
initTile
(){
this
.
tittleJs
.
setTittleText
(
this
.
data
.
bt_text
);
let
dy
=
this
.
_frame
Size
.
height
/
2
-
10
;
let
dy
=
cc
.
win
Size
.
height
/
2
-
10
;
this
.
tittleJs
.
node
.
y
=
dy
;
},
initBg
()
{
//等比缩放,底部对齐
const
bgNode
=
cc
.
find
(
'
Canvas/bg
'
);
let
screen_size
=
this
.
_frameSize
.
width
/
this
.
_frame
Size
.
height
let
screen_size
=
cc
.
winSize
.
width
/
cc
.
win
Size
.
height
let
design_size
=
this
.
_designSize
.
width
/
this
.
_designSize
.
height
if
(
screen_size
<
design_size
){
bgNode
.
height
=
this
.
_frame
Size
.
height
;
bgNode
.
width
=
this
.
_frame
Size
.
height
*
design_size
;
bgNode
.
height
=
cc
.
win
Size
.
height
;
bgNode
.
width
=
cc
.
win
Size
.
height
*
design_size
;
}
else
{
bgNode
.
width
=
this
.
_frame
Size
.
width
;
bgNode
.
height
=
this
.
_frame
Size
.
width
/
design_size
;
let
dy
=
(
bgNode
.
height
-
this
.
_frame
Size
.
height
)
/
2
bgNode
.
width
=
cc
.
win
Size
.
width
;
bgNode
.
height
=
cc
.
win
Size
.
width
/
design_size
;
let
dy
=
(
bgNode
.
height
-
cc
.
win
Size
.
height
)
/
2
bgNode
.
y
=
bgNode
.
y
+
dy
;
}
// bgNode.scale = this._mapScaleMin;
...
...
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