Commit c3e21e2c authored by zhangjinzhou's avatar zhangjinzhou

消消乐版本暂存

parent 345031ec
...@@ -78,7 +78,7 @@ ...@@ -78,7 +78,7 @@
<script> <script>
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' },
......
...@@ -18,7 +18,7 @@ import ShopPanel from "../../src/panels/ShopPanel"; ...@@ -18,7 +18,7 @@ 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 StartPanelNew from "../../src/panels/StartPanelNew"; import StartPanelNew from "../../src/panels/StartPanelNew";
import { getBgOn, playBg, stopBg } from "../../src/soundCtrl"; 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";
...@@ -124,6 +124,7 @@ export default class MainBase extends eui.UILayer { ...@@ -124,6 +124,7 @@ export default class MainBase extends eui.UILayer {
} }
protected initNativeEvent() { protected initNativeEvent() {
return;
// 穿山甲广告位 // 穿山甲广告位
// 首页&游戏中banner // 首页&游戏中banner
// window["TTIndexBanner"] = '945073403' // window["TTIndexBanner"] = '945073403'
...@@ -326,7 +327,7 @@ export default class MainBase extends eui.UILayer { ...@@ -326,7 +327,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++) {
...@@ -335,6 +336,11 @@ export default class MainBase extends eui.UILayer { ...@@ -335,6 +336,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",
...@@ -509,7 +515,7 @@ export default class MainBase extends eui.UILayer { ...@@ -509,7 +515,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)
...@@ -545,7 +551,7 @@ export default class MainBase extends eui.UILayer { ...@@ -545,7 +551,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
This diff is collapsed.
This diff is collapsed.
...@@ -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,
...@@ -464,7 +463,7 @@ export default class MainScene extends Scene { ...@@ -464,7 +463,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();
...@@ -1009,7 +1008,7 @@ export default class MainScene extends Scene { ...@@ -1009,7 +1008,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;
texture = RES.getRes(source);
if(this.type==ElementType.BLIND_BOX){ if(this.type==ElementType.BLIND_BOX){
texture = await loadImageByUrl("//yun.duiba.com.cn/aurora/assets/730048e95b89906c3a8076b88910ab272bc47d6f.jpeg"); console.error('盲盒的',source,texture);
}else{
texture = RES.getRes(source);
} }
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); // let texurl = data == 2 ? "//yun.duiba.com.cn/aurora/assets/8312db117356184c07b0d67153ec67ba3ed16f9f.png" : "//yun.duiba.com.cn/aurora/assets/f565872fe14ec885c7a9935bc0cfc40515b81898.png";
sp.texture = RES.getRes("starbox"+(idx+1)+"_png");
// await loadImageByUrl(texurl);
sp.width = data == 2 ? this.box2wid : this.box1wid; // sp.width = data == 2 ? this.box2wid : this.box1wid;
sp.height = data == 2 ? this.box2hei : this.box1hei; // 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