Commit 9adc5954 authored by wildfirecode's avatar wildfirecode

1

parent 66195db7
...@@ -233,6 +233,7 @@ export default class MainBase extends eui.UILayer { ...@@ -233,6 +233,7 @@ export default class MainBase extends eui.UILayer {
const check = () => { const check = () => {
if (count <= 0) { if (count <= 0) {
Buried.init(); Buried.init();
SceneCtrl.instance.change(ModuleTypes.START_SCENE, this.svgaList); SceneCtrl.instance.change(ModuleTypes.START_SCENE, this.svgaList);
} }
} }
......
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
"name": "failed" "name": "failed"
}, },
{ {
"keys": "progress2_png,progress1_png,map3_jpg,map2_jpg,map1_jpg,icon_png,animal1_png,元宝bg_png,有星星_png,音乐_png,星星bg_png,星星_png,无星星_png,问题_png,退出_png,狮子_png,声音_png,设置bg_png,设置_png,关闭 拷贝_png,道具_png,宝箱btn_png,宝箱bg_png,宝箱_png,宝箱3_png,宝箱2_png,宝箱1_png,iconbg_png,光 副本 4_png", "keys": "progress2_png,progress1_png,map3_jpg,map2_jpg,map1_jpg,icon_png,animal1_png,元宝bg_png,有星星_png,音乐_png,星星bg_png,星星_png,无星星_png,问题_png,退出_png,狮子_png,声音_png,设置bg_png,设置_png,关闭 拷贝_png,道具_png,宝箱btn_png,宝箱bg_png,宝箱_png,宝箱3_png,宝箱2_png,宝箱1_png,iconbg_png,光 副本 4_png,音乐关闭_png,声音关闭_png",
"name": "map" "name": "map"
}, },
{ {
...@@ -1415,6 +1415,16 @@ ...@@ -1415,6 +1415,16 @@
"url": "assets/blood/blood体力补济站.png", "url": "assets/blood/blood体力补济站.png",
"type": "image", "type": "image",
"name": "blood体力补济站_png" "name": "blood体力补济站_png"
},
{
"url": "assets/map/音乐关闭.png",
"type": "image",
"name": "音乐关闭_png"
},
{
"url": "assets/map/声音关闭.png",
"type": "image",
"name": "声音关闭_png"
} }
] ]
} }
\ No newline at end of file
...@@ -76,6 +76,22 @@ ...@@ -76,6 +76,22 @@
</e:Skin> </e:Skin>
</e:skinName> </e:skinName>
</e:Button> </e:Button>
<e:Button id="musicOffBtn" label="" y="73.95" horizontalCenter="0.5" visible="false">
<e:skinName>
<e:Skin states="up,down,disabled">
<e:Image width="100%" height="100%" source="音乐关闭_png" source.down="音乐关闭_png" source.disabled="音乐关闭_png"/>
<e:Label id="labelDisplay" horizontalCenter="0" verticalCenter="0"/>
</e:Skin>
</e:skinName>
</e:Button>
<e:Button id="soundOffBtn" label="" y="120.24" horizontalCenter="0.5" visible="false">
<e:skinName>
<e:Skin states="up,down,disabled">
<e:Image width="100%" height="100%" source="声音关闭_png" source.down="声音关闭_png" source.disabled="声音关闭_png"/>
<e:Label id="labelDisplay" horizontalCenter="0" verticalCenter="0"/>
</e:Skin>
</e:skinName>
</e:Button>
</e:Group> </e:Group>
<e:Button id="settingBtn" label="" y="0" horizontalCenter="0"> <e:Button id="settingBtn" label="" y="0" horizontalCenter="0">
<e:skinName> <e:skinName>
......
...@@ -11,6 +11,7 @@ import MapTopPart from "./MapTopPart"; ...@@ -11,6 +11,7 @@ import MapTopPart from "./MapTopPart";
import { DataManager } from "../../libs/tw/manager/DataManager"; import { DataManager } from "../../libs/tw/manager/DataManager";
import wait from "../../libs/new_tc/wait"; import wait from "../../libs/new_tc/wait";
import { showToast } from "../../libs/new_wx/ctrls/toastCtrl"; import { showToast } from "../../libs/new_wx/ctrls/toastCtrl";
import { toggleSound, toggleBg } from "../soundCtrl";
export default class MapScene extends Scene { export default class MapScene extends Scene {
scrollGroup: eui.Group; scrollGroup: eui.Group;
...@@ -60,6 +61,10 @@ export default class MapScene extends Scene { ...@@ -60,6 +61,10 @@ export default class MapScene extends Scene {
this.updateHomeData(); this.updateHomeData();
this.showLog(); this.showLog();
this.updateBox(); this.updateBox();
if (data.level) {
PanelCtrl.instance.show('StartPanel', data.level)
}
} }
disableIcon(level) { disableIcon(level) {
...@@ -116,6 +121,21 @@ export default class MapScene extends Scene { ...@@ -116,6 +121,21 @@ export default class MapScene extends Scene {
this['questionBtn'].addEventListener(egret.TouchEvent.TOUCH_TAP, this.onTap_questionBtn, this); this['questionBtn'].addEventListener(egret.TouchEvent.TOUCH_TAP, this.onTap_questionBtn, this);
this['box'].addEventListener(egret.TouchEvent.TOUCH_TAP, this.onTap_boxLayer, this); this['box'].addEventListener(egret.TouchEvent.TOUCH_TAP, this.onTap_boxLayer, this);
this['boxani'].addEventListener(egret.TouchEvent.TOUCH_TAP, this.onTap_box, this); this['boxani'].addEventListener(egret.TouchEvent.TOUCH_TAP, this.onTap_box, this);
this['soundBtn'].addEventListener(egret.TouchEvent.TOUCH_TAP, this.onTap_sound, this);
this['soundOffBtn'].addEventListener(egret.TouchEvent.TOUCH_TAP, this.onTap_sound, this);
this['musicOffBtn'].addEventListener(egret.TouchEvent.TOUCH_TAP, this.onTap_music, this);
this['musicBtn'].addEventListener(egret.TouchEvent.TOUCH_TAP, this.onTap_music, this);
}
onTap_sound() {
this['soundBtn'].visible = !this['soundBtn'].visible;
this['soundOffBtn'].visible = !this['soundOffBtn'].visible;
toggleSound();
}
onTap_music() {
this['musicBtn'].visible = !this['musicBtn'].visible;
this['musicOffBtn'].visible = !this['musicOffBtn'].visible;
toggleBg();
} }
onTap_boxLayer() { onTap_boxLayer() {
......
...@@ -11,9 +11,10 @@ export default class StartScene extends Scene { ...@@ -11,9 +11,10 @@ export default class StartScene extends Scene {
private STOP_PERCENT = 99; private STOP_PERCENT = 99;
private _current = 0; private _current = 0;
private _timer; private _timer;
level;
async start(data?) { async start(data?) {
super.start(); super.start();
this.level = data.level;
this['container1'].x = 20; this['container1'].x = 20;
this['container4'].mask = this['progressmask']; this['container4'].mask = this['progressmask'];
this['maskwrapper'].mask = this['progressmask2']; this['maskwrapper'].mask = this['progressmask2'];
...@@ -21,7 +22,7 @@ export default class StartScene extends Scene { ...@@ -21,7 +22,7 @@ export default class StartScene extends Scene {
this['progressmask2'].scaleX = 0; this['progressmask2'].scaleX = 0;
this['percentTxt'].text = `0%`; this['percentTxt'].text = `0%`;
if (data) { if (data && Array.isArray(data)) {
this['container3'].addChild(data[0]); this['container3'].addChild(data[0]);
this['container2'].addChild(data[1]); this['container2'].addChild(data[1]);
this['container1'].addChild(data[2]); this['container1'].addChild(data[2]);
...@@ -78,6 +79,7 @@ export default class StartScene extends Scene { ...@@ -78,6 +79,7 @@ export default class StartScene extends Scene {
setTimeout(() => { setTimeout(() => {
egret.Tween.removeTweens(this['progressmask2']); egret.Tween.removeTweens(this['progressmask2']);
egret.Tween.get(this['progressmask2']).to({ scaleX: 1 }, 200).wait(200).call(() => { egret.Tween.get(this['progressmask2']).to({ scaleX: 1 }, 200).wait(200).call(() => {
d.level=this.level;
SceneCtrl.instance.change(ModuleTypes.MAP_SCENE, d); SceneCtrl.instance.change(ModuleTypes.MAP_SCENE, d);
}); });
this['percentTxt'].text = `100%` this['percentTxt'].text = `100%`
......
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