Commit c43bbd2e authored by zhangjinzhou's avatar zhangjinzhou

暂存5

parent ada01e85
...@@ -142,7 +142,7 @@ ...@@ -142,7 +142,7 @@
window['signconfigs'] = [ window['signconfigs'] = [
{ nums: '*20', type: 'money' }, { nums: '*20', type: 'money' },
{ nums: '*20', type: 'money' }, { nums: '*40', type: 'money' },
{ nums: '*1', type: 'hammer' }, { nums: '*1', type: 'hammer' },
{ nums: '*20', type: 'money' }, { nums: '*20', type: 'money' },
{ nums: '*20', type: 'money' }, { nums: '*20', type: 'money' },
......
...@@ -16,7 +16,9 @@ import QuitPanel from "../../src/panels/QuitPanel"; ...@@ -16,7 +16,9 @@ import QuitPanel from "../../src/panels/QuitPanel";
import ShopPanel from "../../src/panels/ShopPanel"; import ShopPanel from "../../src/panels/ShopPanel";
import SignPanel from "../../src/panels/SignPanel"; import SignPanel from "../../src/panels/SignPanel";
import StartPanel from "../../src/panels/StartPanel"; import StartPanel from "../../src/panels/StartPanel";
import { getBgOn, playBg, stopBg } from "../../src/soundCtrl";
// import StartPanelNew from "../../src/panels/StartPanelNew";
import { getSoundOn, playBg, stopBg } from "../../src/soundCtrl";
import { playGameBg, stopGamebg } from "../../src/soundCtrl2"; import { playGameBg, stopGamebg } from "../../src/soundCtrl2";
import StartScene from "../../src/startScene/StartScene"; import StartScene from "../../src/startScene/StartScene";
import getResPath from "../new_tc/getResPath"; import getResPath from "../new_tc/getResPath";
...@@ -115,7 +117,6 @@ export default class MainBase extends eui.UILayer { ...@@ -115,7 +117,6 @@ export default class MainBase extends eui.UILayer {
protected getData() { protected getData() {
} }
protected createChildren(): void { protected createChildren(): void {
super.createChildren(); super.createChildren();
egret.lifecycle.addLifecycleListener((context) => { egret.lifecycle.addLifecycleListener((context) => {
...@@ -248,7 +249,7 @@ export default class MainBase extends eui.UILayer { ...@@ -248,7 +249,7 @@ export default class MainBase extends eui.UILayer {
for (var i = 0; i <= 9; i++) { for (var i = 0; i <= 9; i++) {
RES.getResAsync("curScoreNum" + i + "_png") RES.getResAsync("curScoreNum" + i + "_png")
} }
for (var i = 5; i <= 14; i++) { for (var i = 5; i <= 15; i++) {
RES.getResAsync("ele" + i + "_png") RES.getResAsync("ele" + i + "_png")
} }
for (var i = 1; i <= 10; i++) { for (var i = 1; i <= 10; i++) {
...@@ -257,6 +258,11 @@ export default class MainBase extends eui.UILayer { ...@@ -257,6 +258,11 @@ export default class MainBase extends eui.UILayer {
for (var i = 1; i <= 13; i++) { for (var i = 1; i <= 13; i++) {
RES.getResAsync("lineLight" + i + "_png") RES.getResAsync("lineLight" + i + "_png")
} }
//三个星星宝箱
RES.getResAsync("starbox1_png");
RES.getResAsync("starbox2_png");
RES.getResAsync("starbox3_png");
var arr = [ var arr = [
"redDoorBg", "blueDoorBg", "yellowDoorBg", "doorOpen", "doorClosed", "redDoorBg", "blueDoorBg", "yellowDoorBg", "doorOpen", "doorClosed",
"rectLatWhite", "rectLatWhite",
...@@ -422,7 +428,7 @@ export default class MainBase extends eui.UILayer { ...@@ -422,7 +428,7 @@ export default class MainBase extends eui.UILayer {
// if (document.visibilityState == "visible") { // if (document.visibilityState == "visible") {
// if (getBgOn()) { // if (getSoundOn()) {
// if (SceneCtrl.instance.currentScene instanceof MapScene) // if (SceneCtrl.instance.currentScene instanceof MapScene)
// playBg(); // playBg();
// else if (SceneCtrl.instance.currentScene instanceof MainScene) // else if (SceneCtrl.instance.currentScene instanceof MainScene)
...@@ -458,7 +464,7 @@ export default class MainBase extends eui.UILayer { ...@@ -458,7 +464,7 @@ export default class MainBase extends eui.UILayer {
stopGamebg(); stopGamebg();
} }
window["webviewShow"] = () => { window["webviewShow"] = () => {
if (getBgOn()) { if (getSoundOn()) {
if (SceneCtrl.instance.currentScene instanceof MapScene) if (SceneCtrl.instance.currentScene instanceof MapScene)
playBg(); playBg();
else if (SceneCtrl.instance.currentScene instanceof MainScene) else if (SceneCtrl.instance.currentScene instanceof MainScene)
......
{"file":"albhtxxl.png","frames":{
"0":{"x":27,"y":36,"w":24,"h":34,"offX":0,"offY":0,"sourceW":24,"sourceH":34},
"1":{"x":78,"y":70,"w":18,"h":32,"offX":0,"offY":0,"sourceW":18,"sourceH":32},
"2":{"x":27,"y":72,"w":24,"h":33,"offX":0,"offY":0,"sourceW":24,"sourceH":33},
"3":{"x":53,"y":36,"w":23,"h":34,"offX":0,"offY":0,"sourceW":23,"sourceH":34},
"4":{"x":95,"y":0,"w":25,"h":32,"offX":0,"offY":0,"sourceW":25,"sourceH":32},
"5":{"x":53,"y":72,"w":23,"h":33,"offX":0,"offY":0,"sourceW":23,"sourceH":33},
"6":{"x":0,"y":36,"w":25,"h":34,"offX":0,"offY":0,"sourceW":25,"sourceH":34},
"7":{"x":78,"y":36,"w":23,"h":32,"offX":0,"offY":0,"sourceW":23,"sourceH":32},
"8":{"x":0,"y":72,"w":25,"h":34,"offX":0,"offY":0,"sourceW":25,"sourceH":34},
"9":{"x":68,"y":0,"w":25,"h":34,"offX":0,"offY":0,"sourceW":25,"sourceH":34},
"次":{"x":0,"y":0,"w":66,"h":34,"offX":0,"offY":0,"sourceW":67,"sourceH":34}}}
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<e:Skin class="MapSkin" width="750" height="1206" xmlns:e="http://ns.egret.com/eui" xmlns:w="http://ns.egret.com/wing"> <e:Skin class="MapSkin" width="750" height="1206" xmlns:e="http://ns.egret.com/eui" xmlns:w="http://ns.egret.com/wing">
<e:Rect id="rectbg" width="750" height="1206"/> <e:Rect id="rectbg" width="750" height="1206"/>
<e:Scroller id="scroll" width="750" height="1624" x="0" y="0" scrollPolicyH="off" scrollPolicyV="on" locked="true"> <e:Scroller id="scroll" width="750" height="1624" x="0" y="0" scrollPolicyH="off" scrollPolicyV="on">
<e:Group id="scrollGroup"> <e:Group id="scrollGroup">
</e:Group> </e:Group>
</e:Scroller> </e:Scroller>
<e:Group id="treasureboxBtn" y="-3.06" x="518.26" scaleX="1" scaleY="1">
<e:Image source="宝箱bg_png" y="22" x="3.75"/>
<e:Group x="41.08" y="35.48">
<e:Rect id="rect" width="124" height="45" x="0" y="0" visible="false"/>
<e:Image id="progressbg" source="progress2_png" y="0" x="0" visible="false"/>
<e:Image id="progressfront" source="progress1_png" y="0" x="0" visible="false"/>
<e:Image source="星星_png" verticalCenter="-2.5" x="-14.31"/>
<e:Label id="totalStarTxt" text="0/0" x="24.04" verticalAlign="middle" textAlign="left" size="22" verticalCenter="0.5" bold="true" fontFamily="FZY3JW"/>
</e:Group>
<e:Image id="box" source="宝箱_png" right="24" verticalCenter="9.5" anchorOffsetX="34" anchorOffsetY="34"/>
<e:Group id="boxiconWrapper" x="166.08" y="34.86" touchEnabled="false" touchChildren="false">
<e:Image x="8.32" y="0" source="iconbg_png"/>
<e:Label id="boxNumsTxt" text="0" x="-2.25" verticalAlign="middle" textAlign="center" size="18" width="46" y="3.64" fontFamily="FZY3JW"/>
</e:Group>
</e:Group>
<e:Group id="top" x="170.04" y="18.05">
<e:Image source="元宝bg_png" x="0" y="0"/>
<e:Label id="bloodTxt" text="5" x="3.96" y="22.84" width="49" verticalAlign="middle" textAlign="center" size="22" fontFamily="FZY3JW" bold="true"/>
<e:Label id="fullTxt" text="已满" x="57.96" y="22.34" width="82" verticalAlign="middle" textAlign="center" size="24" visible="false"/>
<e:Label id="goldTxt" text="0" x="247.23" y="24.94" width="88" verticalAlign="middle" textAlign="center" fontFamily="FZY3JW" size="22"/>
<e:Button id="bloodBtn" label="" x="147.13" y="15.35">
<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="goldBtn" label="" x="385.2" y="16.6" 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:Label id="countdown" text="00:00:00" x="63.64" y="24.94" verticalAlign="middle" textAlign="center" size="22" fontFamily="FZY3JW"/>
</e:Group>
<e:Button id="shopBtn" label="" x="613.08" y="174.01" 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="recordBtn" label="" x="594.14" y="175">
<e:skinName>
<e:Skin states="up,down,disabled">
<e:Image width="100%" height="100%" source="recordbtn_png" source.down="recordbtn_png" source.disabled="recordbtn_png"/>
<e:Label id="labelDisplay" horizontalCenter="0" verticalCenter="0"/>
</e:Skin>
</e:skinName>
</e:Button>
<e:Group id="wuhanGroup" y="325" right="30">
<e:Button label="" y="0">
<e:skinName>
<e:Skin states="up,down,disabled">
<e:Image width="100%" height="100%" source="wuhanIcon_png" source.down="wuhanIcon_png" source.disabled="wuhanIcon_png"/>
<e:Label id="labelDisplay" horizontalCenter="0" verticalCenter="0"/>
</e:Skin>
</e:skinName>
</e:Button>
<e:Group x="-24">
<e:Image id="wuhanTips" y="0" touchEnabled="false" source="dailingqu_png"/>
</e:Group>
</e:Group>
<e:Group id="tuiaGroup" y="325" right="30">
<e:Button label="" y="0">
<e:skinName>
<e:Skin states="up,down,disabled">
<e:Image width="100%" height="100%" source="tuiaIcon_png" source.down="tuiaIcon_png" source.disabled="tuiaIcon_png"/>
<e:Label id="labelDisplay" horizontalCenter="0" verticalCenter="0"/>
</e:Skin>
</e:skinName>
</e:Button>
<e:Group x="-24">
<e:Image id="tuiaTips" y="0" touchEnabled="false" source="dailingqu_png"/>
</e:Group>
</e:Group>
<e:Group id="friendBtn" x="-0.12" y="22.31" width="171" height="120">
<e:Image source="avatar_png" y="0" horizontalCenter="0"/> <e:Group id="topcont" width="750" height="150" x="0" top="0">
<e:Group x="38.5" y="10"> <e:Image source="topban_png" horizontalCenter="0" y="0"/>
<e:Image id="avatar" y="0" source="" width="96" height="96" x="0"/> <e:BitmapLabel id="bloodTxt" width="164" height="48" x="120" y="32" text="次数 5" font="albhtxxl_fnt"/>
<e:Rect id="avatarMask" width="96" height="96" x="0" y="0" ellipseWidth="96" ellipseHeight="96"/> <e:BitmapLabel id="goldTxt" width="81" height="48" x="376" y="32" text="231" font="albhtxxl_fnt"/>
<e:Image id="exchangebtn" source="exchangebtn2_png" x="462" y="17"/>
<e:Group id="soundbtn" width="80" height="80" y="7" x="632">
<e:Image id="stopsoundimg" source="stopsoundbtn_png" scaleX="1" scaleY="1" x="10" y="9"/>
<e:Image id="opensoundimg" source="opensoundbtn_png" scaleX="1" scaleY="1" x="10" y="9"/>
</e:Group> </e:Group>
<e:Image source="namebg_png" horizontalCenter="-4" bottom="-4"/>
<e:Label id="nameTxt" text="La121233bel" y="91.5" size="20" horizontalCenter="1" fontFamily="FZY3JW"/>
</e:Group> </e:Group>
<e:Image id="adBtn" y="478" source="ad_icon_png" right="602" width="122" height="122" visible="false"/> <e:Group id="signGroup" x="26" y="172">
<e:Group id="signGroup" x="26.69" y="172.57">
<e:Button id="signBtn" label="" x="0" y="0"> <e:Button id="signBtn" label="" x="0" y="0">
<e:skinName> <e:skinName>
<e:Skin states="up,down,disabled"> <e:Skin states="up,down,disabled">
...@@ -111,70 +31,18 @@ ...@@ -111,70 +31,18 @@
<e:Image id="sign_s2" source="map明日可领_png" x="0" y="0" visible="false"/> <e:Image id="sign_s2" source="map明日可领_png" x="0" y="0" visible="false"/>
</e:Group> </e:Group>
</e:Group> </e:Group>
<e:Group id="rankGroup" width="115" height="121" y="172" x="609">
<e:Image source="rankbtn_png" scaleX="1" scaleY="1"/>
</e:Group>
<e:Group id="turnGroup" width="115" height="121" x="609" y="322">
<e:Image source="turnpbtn_png"/>
<e:Image source="turnpbtnicon_png" x="-35" y="9"/>
</e:Group>
<e:Group id="settingsx" x="30" scaleX="1.4" scaleY="1.4" bottom="23" touchEnabled="false" locked="true">
<e:Group id="settingGroup" x="2" y="6.08" visible="false">
<e:Image id="settingbg" source="设置bg_png" y="0" x="0" scale9Grid="9,84,54,76" height="231"/>
<e:Button id="soundBtn" label="" y="59.65" horizontalCenter="0.5">
<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="questionBtn" label="" y="109.41" horizontalCenter="0.5">
<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="musicBtn" label="" y="14.36" horizontalCenter="0.5">
<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="musicOffBtn" label="" y="13.69" 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="60.32" 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:Button id="settingBtn" label="" y="162.34" horizontalCenter="0">
<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 id="boxLayer" x="0" y="0" visible="false">
<e:Rect width="750" height="1624" fillAlpha="0.7" x="0" y="0"/>
<e:Group id="boxani">
</e:Group>
<e:Label text="点击开宝箱" y="791" size="37" horizontalCenter="0" bold="true"/>
</e:Group>
<w:Config id="16c89f4ae1a"/> <w:Config id="16c89f4ae1a"/>
</e:Skin> </e:Skin>
\ No newline at end of file
...@@ -37,7 +37,7 @@ import { ElementTargets } from '../something/uis/ElementTargets'; ...@@ -37,7 +37,7 @@ import { ElementTargets } from '../something/uis/ElementTargets';
import { PropGuide } from '../something/uis/PropGuide'; import { PropGuide } from '../something/uis/PropGuide';
import { ScoreProgress } from '../something/uis/ScoreProgress'; import { ScoreProgress } from '../something/uis/ScoreProgress';
import { StepNumber } from '../something/uis/StepNumber'; import { StepNumber } from '../something/uis/StepNumber';
import { getBgOn, getSoundOn, playSound, SoundType, stopBg, toggleSound } from '../soundCtrl'; import { getSoundOn, playSound, SoundType, stopBg, toggleSound } from '../soundCtrl';
import { playGameBg, toggleGameBg } from '../soundCtrl2'; import { playGameBg, toggleGameBg } from '../soundCtrl2';
import { createData } from '../startScene/StartScene'; import { createData } from '../startScene/StartScene';
import { DataManager } from './../../libs/tw/manager/DataManager'; import { DataManager } from './../../libs/tw/manager/DataManager';
...@@ -68,7 +68,6 @@ import { FesRedBombShowAni } from '../something/anisCall/FesRedBombShowAni'; ...@@ -68,7 +68,6 @@ import { FesRedBombShowAni } from '../something/anisCall/FesRedBombShowAni';
import { RectsWaveAni } from '../something/anisCall/RectsWaveAni'; import { RectsWaveAni } from '../something/anisCall/RectsWaveAni';
import { Door } from '../something/class/Door'; import { Door } from '../something/class/Door';
import Utils, { CouponJoinScene } from '../Utils'; import Utils, { CouponJoinScene } from '../Utils';
import { Candy } from '../../../../../../../node_modules/@spark/guideact/types/something/class/Candy';
const aniClass = { const aniClass = {
"BoomAni": BoomAni, "BoomAni": BoomAni,
...@@ -461,7 +460,7 @@ export default class MainScene extends Scene { ...@@ -461,7 +460,7 @@ export default class MainScene extends Scene {
} else { } else {
this.soundBtn.source = "mainSoundBtnOff_png" this.soundBtn.source = "mainSoundBtnOff_png"
} }
if (getBgOn()) { if (getSoundOn()) {
this.musicBtn.source = "mainMusicBtnOn_png"; this.musicBtn.source = "mainMusicBtnOn_png";
stopBg(); stopBg();
playGameBg(); playGameBg();
...@@ -978,7 +977,7 @@ export default class MainScene extends Scene { ...@@ -978,7 +977,7 @@ export default class MainScene extends Scene {
onTap_musicBtn() { onTap_musicBtn() {
// toggleBg(); // toggleBg();
toggleGameBg(); toggleGameBg();
if (getBgOn()) { if (getSoundOn()) {
this.musicBtn.source = "mainMusicBtnOn_png" this.musicBtn.source = "mainMusicBtnOn_png"
} else { } else {
this.musicBtn.source = "mainMusicBtnOff_png" this.musicBtn.source = "mainMusicBtnOff_png"
......
This diff is collapsed.
...@@ -18,7 +18,6 @@ import { HairballBlackState } from "../states/HairballBlackState"; ...@@ -18,7 +18,6 @@ import { HairballBlackState } from "../states/HairballBlackState";
import { Tool } from "../Tool"; import { Tool } from "../Tool";
import { FestivalEle } from "./FestivalEle"; import { FestivalEle } from "./FestivalEle";
import {loadImageByUrl} from "../../../libs/new_wx/loadSpriteSheet";
/** /**
* 考虑到底继承白鹭的啥Component还是Container * 考虑到底继承白鹭的啥Component还是Container
* 坐标原点需要坐落在格子的中心点 * 坐标原点需要坐落在格子的中心点
...@@ -173,12 +172,10 @@ export class Element extends eui.Component { ...@@ -173,12 +172,10 @@ export class Element extends eui.Component {
async changeSource(source: string) { async changeSource(source: string) {
// this.showImage.source = source; // this.showImage.source = source;
var texture: egret.Texture; var texture: egret.Texture;
if(this.type==ElementType.BLIND_BOX){
texture = await loadImageByUrl("//yun.duiba.com.cn/aurora/assets/730048e95b89906c3a8076b88910ab272bc47d6f.jpeg");
}else{
texture = RES.getRes(source); texture = RES.getRes(source);
if(this.type==ElementType.BLIND_BOX){
console.error('盲盒的',source,texture);
} }
this.showImage.texture = texture this.showImage.texture = texture
this.showImage.x = -texture.textureWidth / 2; this.showImage.x = -texture.textureWidth / 2;
......
import { loadImageByUrl } from "../../../libs/new_wx/loadSpriteSheet"; import { loadImageByUrl } from "../../../libs/new_wx/loadSpriteSheet";
import setGray from "../../setGray";
import Utils, { CouponJoinScene } from "../../Utils"; import Utils, { CouponJoinScene } from "../../Utils";
import { CurScoreNum } from "./CurScoreNum"; import { CurScoreNum } from "./CurScoreNum";
...@@ -127,29 +128,22 @@ export class ScoreProgress { ...@@ -127,29 +128,22 @@ export class ScoreProgress {
let starboxwid = 50;
let starboxhei = 50;
let starboxy = 25; let starboxy = 25;
let starbox1x = 423; let starbox1x = 423;
let starbox2x = 498; let starbox2x = 498;
let starbox3x = 573; let starbox3x = 573;
this.starbox1 = new eui.Image(); this.starbox1 = new eui.Image();
this.starbox1.width = starboxwid;
this.starbox1.height = starboxhei;
p.addChild(this.starbox1); p.addChild(this.starbox1);
this.starbox1.x = starbox1x;//-starboxwid/2; this.starbox1.x = starbox1x;//-starboxwid/2;
this.starbox1.y = starboxy; this.starbox1.y = starboxy;
this.starbox2 = new eui.Image(); this.starbox2 = new eui.Image();
this.starbox2.width = starboxwid;
this.starbox2.height = starboxhei;
p.addChild(this.starbox2); p.addChild(this.starbox2);
this.starbox2.x = starbox2x;//-starboxwid/2; this.starbox2.x = starbox2x;//-starboxwid/2;
this.starbox2.y = starboxy; this.starbox2.y = starboxy;
this.starbox3 = new eui.Image(); this.starbox3 = new eui.Image();
this.starbox3.width = starboxwid;
this.starbox3.height = starboxhei;
p.addChild(this.starbox3); p.addChild(this.starbox3);
this.starbox3.x = starbox3x;//-starboxwid/2; this.starbox3.x = starbox3x;//-starboxwid/2;
this.starbox3.y = starboxy; this.starbox3.y = starboxy;
...@@ -169,16 +163,11 @@ export class ScoreProgress { ...@@ -169,16 +163,11 @@ export class ScoreProgress {
starbox2: eui.Image; starbox2: eui.Image;
starbox3: eui.Image; starbox3: eui.Image;
box1wid = 50;
box1hei = 50;
box2wid = 70;
box2hei = 70;
sbox1x = 423; sbox1x = 423;
sbox2x = 498; sbox2x = 498;
sbox3x = 573; sbox3x = 573;
starwid = 46; starwid = 46;
sboxy = 50; sboxy = 35;
updateStarBox(data) { updateStarBox(data) {
this.starboxdata = data; this.starboxdata = data;
...@@ -196,17 +185,24 @@ export class ScoreProgress { ...@@ -196,17 +185,24 @@ export class ScoreProgress {
let data = this.starboxdata[idx]; let data = this.starboxdata[idx];
let spx = this["sbox" + (idx + 1) + "x"]; let spx = this["sbox" + (idx + 1) + "x"];
let texurl = data == 2 ? "//yun.duiba.com.cn/aurora/assets/8312db117356184c07b0d67153ec67ba3ed16f9f.png" : "//yun.duiba.com.cn/aurora/assets/f565872fe14ec885c7a9935bc0cfc40515b81898.png";
sp.texture = await loadImageByUrl(texurl);
sp.width = data == 2 ? this.box2wid : this.box1wid; // let texurl = data == 2 ? "//yun.duiba.com.cn/aurora/assets/8312db117356184c07b0d67153ec67ba3ed16f9f.png" : "//yun.duiba.com.cn/aurora/assets/f565872fe14ec885c7a9935bc0cfc40515b81898.png";
sp.height = data == 2 ? this.box2hei : this.box1hei; sp.texture = RES.getRes("starbox"+(idx+1)+"_png");
// await loadImageByUrl(texurl);
// sp.width = data == 2 ? this.box2wid : this.box1wid;
// sp.height = data == 2 ? this.box2hei : this.box1hei;
sp.anchorOffsetX = sp.width / 2; sp.anchorOffsetX = sp.width / 2;
sp.anchorOffsetY = sp.height / 2; sp.anchorOffsetY = sp.height / 2;
sp.x = spx + this.starwid / 2;// - sp.width / 2; sp.x = spx + this.starwid / 2;// - sp.width / 2;
sp.y = this.sboxy;// - sp.height / 2; sp.y = this.sboxy;// - sp.height / 2;
if(data==0){
setGray(sp);
}else{
sp.filters = [];
}
if (data == 1) { if (data == 1) {
if (!this["s" + (idx + 1) + "havetween"]) { if (!this["s" + (idx + 1) + "havetween"]) {
this["s" + (idx + 1) + "havetween"] = true; this["s" + (idx + 1) + "havetween"] = true;
......
...@@ -19,9 +19,9 @@ let loading = false; ...@@ -19,9 +19,9 @@ let loading = false;
export const getSoundOn = () => { export const getSoundOn = () => {
return soundOn return soundOn
} }
export const getBgOn = () => { // export const getBgOn = () => {
return bgOn // return bgOn
} // }
export const toggleSound = () => { export const toggleSound = () => {
soundOn = !soundOn; soundOn = !soundOn;
......
import { getBgOn, toggleBgStatus } from "./soundCtrl"; import { getSoundOn, toggleBgStatus } from "./soundCtrl";
let bgChannel: egret.SoundChannel; let bgChannel: egret.SoundChannel;
let loading = false; let loading = false;
export const toggleGameBg = () => { export const toggleGameBg = () => {
toggleBgStatus(); toggleBgStatus();
const bgOn=getBgOn(); const bgOn=getSoundOn();
if (bgChannel) { if (bgChannel) {
if (!bgOn) { if (!bgOn) {
bgChannel.stop(); bgChannel.stop();
......
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