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
86adc8ef
Commit
86adc8ef
authored
Feb 26, 2021
by
xytk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交代码
parent
f8d0ae18
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
141 additions
and
153 deletions
+141
-153
Scene.fire
play/assets/tmpGame/scene/Scene.fire
+120
-150
Scene.js
play/assets/tmpGame/script/Scene.js
+20
-2
Tittle.ts
play/assets/tmpGame/script/Tittle.ts
+1
-1
No files found.
play/assets/tmpGame/scene/Scene.fire
View file @
86adc8ef
This diff is collapsed.
Click to expand it.
play/assets/tmpGame/script/Scene.js
View file @
86adc8ef
...
...
@@ -177,9 +177,9 @@ cc.Class({
initView
()
{
this
.
initBg
();
this
.
initPic
();
this
.
initTile
();
//this.initBtn();
this
.
initIcon
();
this
.
loadDragonBones
();
...
...
@@ -216,10 +216,28 @@ cc.Class({
});
},
initTile
(){
this
.
tittleJs
.
setTittleText
(
this
.
data
.
bt_text
);
let
dy
=
this
.
_frameSize
.
y
/
2
-
104
;
this
.
tittleJs
.
node
.
y
=
dy
;
},
initBg
()
{
//等比缩放,底部对齐
const
bgNode
=
cc
.
find
(
'
Canvas/bg
'
);
bgNode
.
scale
=
this
.
_mapScaleMin
;
let
screen_size
=
this
.
_frameSize
.
width
/
this
.
_frameSize
.
height
let
design_size
=
this
.
_designSize
.
width
/
this
.
_designSize
.
height
if
(
screen_size
<
design_size
){
bgNode
.
height
=
this
.
_frameSize
.
height
;
bgNode
.
width
=
this
.
_frameSize
.
height
*
design_size
;
}
else
{
bgNode
.
width
=
this
.
_frameSize
.
width
;
bgNode
.
height
=
this
.
_frameSize
.
width
/
design_size
;
let
dy
=
(
bgNode
.
height
-
this
.
_frameSize
.
height
)
/
2
bgNode
.
y
=
bgNode
.
y
+
dy
;
}
// bgNode.scale = this._mapScaleMin;
},
pic1
:
null
,
...
...
play/assets/tmpGame/script/Tittle.ts
View file @
86adc8ef
...
...
@@ -14,7 +14,7 @@ export default class NewClass extends cc.Component {
start
()
{
this
.
audioSource
.
node
.
on
(
cc
.
Node
.
EventType
.
TOUCH_START
,
this
.
playSe
,
this
);
// cc.view.getFrameSize
// cc.view.getFrameSize
()
}
/**
* 设置标题文本
...
...
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