Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OPW_BoardGame_L5R4
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
OPW_BoardGame_L5R4
Commits
aa10bbf4
Commit
aa10bbf4
authored
Jan 17, 2023
by
李维
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
拉伸鲨鱼背景 适配全屏
parent
65cc1480
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
0 deletions
+11
-0
OPW_BoardGame_L5R4.ts
assets/OPW_BoardGame_L5R4/scene/OPW_BoardGame_L5R4.ts
+11
-0
No files found.
assets/OPW_BoardGame_L5R4/scene/OPW_BoardGame_L5R4.ts
View file @
aa10bbf4
...
...
@@ -169,6 +169,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
this
.
initLoadingLayer
();
this
.
initOfflineLayer
();
this
.
initPronunciationTestLayer
();
this
.
initSharkBG
();
this
.
initCoolCat
();
this
.
initSeagull
();
this
.
initBox
();
...
...
@@ -273,6 +274,16 @@ export default class SceneComponent extends MyCocosSceneComponent {
this
.
treeNode
=
cc
.
find
(
"
Canvas/center_map/tree/stand
"
);
}
// 初始化鲨鱼背景
initSharkBG
()
{
const
canvas
=
cc
.
find
(
"
Canvas
"
)
const
shark
=
cc
.
find
(
"
Canvas/bgGroup/shark_wave
"
);
const
sx
=
canvas
.
width
/
1318.5
const
sy
=
canvas
.
height
/
806.5
const
s
=
Math
.
max
(
sx
*
1.05
,
sy
*
1.05
)
shark
.
scale
=
s
;
}
// 初始化酷猫
coolCat
=
null
;
coolCatClick
=
null
;
...
...
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