Commit aa10bbf4 authored by 李维's avatar 李维

拉伸鲨鱼背景 适配全屏

parent 65cc1480
...@@ -169,6 +169,7 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -169,6 +169,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
this.initLoadingLayer(); this.initLoadingLayer();
this.initOfflineLayer(); this.initOfflineLayer();
this.initPronunciationTestLayer(); this.initPronunciationTestLayer();
this.initSharkBG();
this.initCoolCat(); this.initCoolCat();
this.initSeagull(); this.initSeagull();
this.initBox(); this.initBox();
...@@ -273,6 +274,16 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -273,6 +274,16 @@ export default class SceneComponent extends MyCocosSceneComponent {
this.treeNode = cc.find("Canvas/center_map/tree/stand"); 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; coolCat = null;
coolCatClick = null; coolCatClick = null;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment