Commit e53d1f28 authored by wildfirecode's avatar wildfirecode

1

parent 163e78b1
......@@ -42,9 +42,11 @@
<script src="libs/zepto.min.js"></script>
<script src="libs/security.js"></script>
<script src="libs/downloadApp.js"></script>
<script src='https://cdnjs.cloudflare.com/ajax/libs/mathjs/5.4.0/math.js'></script>
<!-- <script src='https://cdnjs.cloudflare.com/ajax/libs/mathjs/5.4.0/math.js'></script> -->
<script>
// localStorage.clear();
// const data ={"IceCream":3,"Donut":3,"Egg":3,"Candy2":3,"Gift2":1};
// localStorage.setItem('data',JSON.stringify({"IceCream":3,"Donut":3,"Egg":3,"Candy2":3,"Gift2":1}))
window['development'] = true;
var gameId = 1;
var CFG = {
......
......@@ -8,6 +8,7 @@ import PanelCtrl from "../ctrls/panelCtrl";
import SceneCtrl from "../ctrls/sceneCtrl";
import { ModuleTypes } from "../types/sceneTypes";
import Scene from "./Scene";
import { isAllLevelPass } from "../../../src/startScene/level";
export default class StartSceneBase extends Scene {
ruleBtn: eui.Button;
......@@ -22,7 +23,8 @@ export default class StartSceneBase extends Scene {
async start(data?) {
this.startBtn.visible = false;
this.updateGetInfoView();
if (!isAllLevelPass())
this.updateGetInfoView();
this.updateExemptionTxt();
super.start();
}
......@@ -48,7 +50,7 @@ export default class StartSceneBase extends Scene {
updateStartBtnStatus() {
if (this.startBtn) {
this.startBtn.visible = true;
this.startBtn.visible =this['startBtnBg'].visible =this.countTxt.visible = true;
this.startBtn.enabled = getStartBtnEnable();
}
}
......
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"preload","version":5,"files":["../assets/startScene/dot.png"]}
\ No newline at end of file
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"preload","version":5,"files":["../assets/startScene/btnLeft1.png","../assets/startScene/btnRight1.png","../assets/startScene/toast.png","../assets/startScene/垃圾桶前盖.png","../assets/startScene/碗前盖.png","../assets/startScene/显示器纹路.png","../assets/startScene/boomalert.png","../assets/startScene/startbtn.png","../assets/startScene/startbtnGray.png","../assets/startScene/红包gray.png"]}
\ No newline at end of file
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"start","version":5,"files":["../assets/startScene/ruleBtn.png","../assets/startScene/recordbtn.png","../assets/startScene/rankBtn.png","../assets/startScene/optionBtn.png","../assets/startScene/getit.png","../assets/startScene/dot.png","../assets/startScene/btnRight.png","../assets/startScene/btnLeft.png","../assets/startScene/bg3.png","../assets/startScene/arrow.png","../assets/startScene/转盘前景.png","../assets/startScene/小丑+转盘.png","../assets/startScene/碗后盖.png","../assets/startScene/甜筒-已获得.png","../assets/startScene/甜筒-未获得.png","../assets/startScene/甜甜圈-已获得.png","../assets/startScene/甜甜圈-未获得.png","../assets/startScene/糖果-已获得.png","../assets/startScene/糖果-未获得.png","../assets/startScene/前景.png","../assets/startScene/目标.png","../assets/startScene/礼盒-已获得.png","../assets/startScene/礼盒-未获得.png","../assets/startScene/垃圾桶后盖.png","../assets/startScene/垃圾桶.png","../assets/startScene/进度条-已显示.png","../assets/startScene/进度条-未显示.png","../assets/startScene/金蛋-已获得.png","../assets/startScene/金蛋-未获得.png","../assets/startScene/奖品.png","../assets/startScene/红包.png","../assets/startScene/灯2.png","../assets/startScene/灯1.png"]}
\ No newline at end of file
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"start","version":5,"files":["../assets/startScene/toast.png","../assets/startScene/startbtnGray.png","../assets/startScene/startbtn.png","../assets/startScene/ruleBtn.png","../assets/startScene/recordbtn.png","../assets/startScene/rankBtn.png","../assets/startScene/optionBtn.png","../assets/startScene/getit.png","../assets/startScene/dot.png","../assets/startScene/btnRight1.png","../assets/startScene/btnRight.png","../assets/startScene/btnLeft1.png","../assets/startScene/btnLeft.png","../assets/startScene/boomalert.png","../assets/startScene/bg3.png","../assets/startScene/arrow.png","../assets/startScene/转盘前景.png","../assets/startScene/小丑+转盘.png","../assets/startScene/显示器纹路.png","../assets/startScene/碗前盖.png","../assets/startScene/碗后盖.png","../assets/startScene/甜筒-已获得.png","../assets/startScene/甜筒-未获得.png","../assets/startScene/甜甜圈-已获得.png","../assets/startScene/甜甜圈-未获得.png","../assets/startScene/糖果-已获得.png","../assets/startScene/糖果-未获得.png","../assets/startScene/前景.png","../assets/startScene/目标.png","../assets/startScene/礼盒-已获得.png","../assets/startScene/礼盒-未获得.png","../assets/startScene/垃圾桶前盖.png","../assets/startScene/垃圾桶后盖.png","../assets/startScene/垃圾桶.png","../assets/startScene/进度条-已显示.png","../assets/startScene/进度条-未显示.png","../assets/startScene/金蛋-已获得.png","../assets/startScene/金蛋-未获得.png","../assets/startScene/奖品.png","../assets/startScene/红包gray.png","../assets/startScene/红包.png","../assets/startScene/灯2.png","../assets/startScene/灯1.png"]}
\ No newline at end of file
......@@ -5,12 +5,8 @@
"name": "rule"
},
{
"keys": "startscenebg_jpg,ruleBtn_png,recordbtn_png,rankBtn_png,optionBtn_png,getit_png,dot_png,btnRight_png,btnLeft_png,bg3_png,arrow_png,转盘前景_png,小丑+转盘_png,碗后盖_png,甜筒-已获得_png,甜筒-未获得_png,甜甜圈-已获得_png,甜甜圈-未获得_png,糖果-已获得_png,糖果-未获得_png,前景_png,目标_png,礼盒-已获得_png,礼盒-未获得_png,垃圾桶后盖_png,垃圾桶_png,进度条-已显示_png,进度条-未显示_png,金蛋-已获得_png,金蛋-未获得_png,奖品_png,红包_png,灯2_png,灯1_png",
"keys": "toast_png,startscenebg_jpg,startbtnGray_png,startbtn_png,ruleBtn_png,recordbtn_png,rankBtn_png,optionBtn_png,getit_png,dot_png,btnRight1_png,btnRight_png,btnLeft1_png,btnLeft_png,boomalert_png,bg3_png,arrow_png,转盘前景_png,小丑+转盘_png,显示器纹路_png,碗前盖_png,碗后盖_png,甜筒-已获得_png,甜筒-未获得_png,甜甜圈-已获得_png,甜甜圈-未获得_png,糖果-已获得_png,糖果-未获得_png,前景_png,目标_png,礼盒-已获得_png,礼盒-未获得_png,垃圾桶前盖_png,垃圾桶后盖_png,垃圾桶_png,进度条-已显示_png,进度条-未显示_png,金蛋-已获得_png,金蛋-未获得_png,奖品_png,红包gray_png,红包_png,灯2_png,灯1_png",
"name": "start"
},
{
"name": "preload",
"keys": "btnLeft1_png,btnRight1_png,toast_png,垃圾桶前盖_png,碗前盖_png,显示器纹路_png,boomalert_png,success_json,failed_json,startbtn_png,startbtnGray_png"
}
],
"resources": [
......@@ -277,61 +273,66 @@
"name": "目标_png"
},
{
"name": "btnLeft1_png",
"url": "assets/startScene/btnLeft1.png",
"type": "image",
"url": "assets/startScene/btnLeft1.png"
"name": "btnLeft1_png"
},
{
"name": "btnRight1_png",
"url": "assets/startScene/btnRight1.png",
"type": "image",
"url": "assets/startScene/btnRight1.png"
"name": "btnRight1_png"
},
{
"name": "toast_png",
"url": "assets/startScene/toast.png",
"type": "image",
"url": "assets/startScene/toast.png"
"name": "toast_png"
},
{
"name": "垃圾桶前盖_png",
"url": "assets/startScene/垃圾桶前盖.png",
"type": "image",
"url": "assets/startScene/垃圾桶前盖.png"
"name": "垃圾桶前盖_png"
},
{
"name": "碗前盖_png",
"url": "assets/startScene/碗前盖.png",
"type": "image",
"url": "assets/startScene/碗前盖.png"
"name": "碗前盖_png"
},
{
"name": "显示器纹路_png",
"url": "assets/startScene/显示器纹路.png",
"type": "image",
"url": "assets/startScene/显示器纹路.png"
"name": "显示器纹路_png"
},
{
"name": "boomalert_png",
"url": "assets/startScene/boomalert.png",
"type": "image",
"url": "assets/startScene/boomalert.png"
"name": "boomalert_png"
},
{
"name": "success_json",
"type": "sheet",
"url": "assets/mc/success.json",
"subkeys": "普通碰撞_00011,普通碰撞_00010,普通碰撞_00009,普通碰撞_00008,普通碰撞_00007,普通碰撞_00006,普通碰撞_00005,普通碰撞_00004,普通碰撞_00003,普通碰撞_00002,普通碰撞_00001,普通碰撞_00000"
"type": "sheet",
"name": "success_json",
"subkeys": "普通碰撞_00000,普通碰撞_00001,普通碰撞_00002,普通碰撞_00003,普通碰撞_00004,普通碰撞_00005,普通碰撞_00006,普通碰撞_00007,普通碰撞_00008,普通碰撞_00009,普通碰撞_00010,普通碰撞_00011"
},
{
"name": "failed_json",
"type": "sheet",
"url": "assets/mc/failed.json",
"subkeys": "炸弹碰撞_00011,炸弹碰撞_00010,炸弹碰撞_00009,炸弹碰撞_00008,炸弹碰撞_00007,炸弹碰撞_00006,炸弹碰撞_00005,炸弹碰撞_00004,炸弹碰撞_00003,炸弹碰撞_00002,炸弹碰撞_00001,炸弹碰撞_00000"
"type": "sheet",
"name": "failed_json",
"subkeys": "炸弹碰撞_00000,炸弹碰撞_00001,炸弹碰撞_00002,炸弹碰撞_00003,炸弹碰撞_00004,炸弹碰撞_00005,炸弹碰撞_00006,炸弹碰撞_00007,炸弹碰撞_00008,炸弹碰撞_00009,炸弹碰撞_00010,炸弹碰撞_00011"
},
{
"url": "assets/startScene/startbtn.png",
"type": "image",
"name": "startbtn_png"
},
{
"name": "startbtn_png",
"url": "assets/startScene/startbtnGray.png",
"type": "image",
"url": "assets/startScene/startbtn.png"
"name": "startbtnGray_png"
},
{
"name": "startbtnGray_png",
"url": "assets/startScene/红包gray.png",
"type": "image",
"url": "assets/startScene/startbtnGray.png"
"name": "红包gray_png"
}
]
}
\ No newline at end of file
{
"skins": {},
"autoGenerateExmlsList": true,
"exmls": [
"resource/skins/AlertSkin.exml",
"resource/skins/OptionItemSkin.exml",
"resource/skins/OptionsSkin.exml",
"resource/skins/PlaySkin.exml",
"resource/skins/PrizeSkin.exml",
"resource/skins/RankItemSkin.exml",
"resource/skins/RankSkin.exml",
"resource/skins/RuleSkin.exml",
"resource/skins/StartSkin.exml",
"resource/skins/VScrollBarSkin.exml"
],
"path": "resource/default.thm.json"
"skins": {},
"autoGenerateExmlsList": true,
"exmls": [
"resource/skins/AlertSkin.exml",
"resource/skins/OptionItemSkin.exml",
"resource/skins/OptionsSkin.exml",
"resource/skins/PlaySkin.exml",
"resource/skins/PrizeSkin.exml",
"resource/skins/RankItemSkin.exml",
"resource/skins/RankSkin.exml",
"resource/skins/RuleSkin.exml",
"resource/skins/StartSkin.exml",
"resource/skins/VScrollBarSkin.exml"
],
"path": "resource/default.thm.json"
}
\ No newline at end of file
......@@ -23,36 +23,8 @@
<e:Image id="x3" source="目标_png" x="106" y="1514"/>
<e:Image id="noname" source="奖品_png" x="103" y="1553"/>
<e:Label id="condition" text="本轮需要获得3个甜筒" verticalAlign="middle" textAlign="center" size="25" y="1386.34" x="201" width="334" fontFamily="Tahoma" textColor="0xffffff"/>
<e:Image source="红包_png" x="626" y="1501"/>
<e:Image id="guide" source="dot_png" x="0" y="0" width="750" height="1624" touchEnabled="true" visible="false"/>
<e:Label id="exemptionTxt" text="*兑换项与活动均与设备制造商Apple Inc.公司无关*" width="100%" verticalAlign="middle" textAlign="center" size="12" y="1609.67" x="0" textColor="0x000000"/>
<e:Button id="rightBtn" label="" y="1292.31" scaleX="1" scaleY="1" alpha="1" x="550.33">
<e:skinName>
<e:Skin states="up,down,disabled">
<e:Image width="100%" height="100%" source="btnRight_png" source.down="btnRight1_png" source.disabled="btnRight1_png"/>
<e:Label id="labelDisplay" horizontalCenter="0" verticalCenter="0" size="26"/>
</e:Skin>
</e:skinName>
</e:Button>
<e:Button id="leftBtn" label="" y="1292.31" scaleX="1" scaleY="1" left="43" alpha="1">
<e:skinName>
<e:Skin states="up,down,disabled">
<e:Image width="100%" height="100%" source="btnLeft_png" source.down="btnLeft1_png" source.disabled="btnLeft1_png"/>
<e:Label id="labelDisplay" horizontalCenter="0" verticalCenter="0" size="26"/>
</e:Skin>
</e:skinName>
</e:Button>
<e:Image id="guild2pic" source="垃圾桶_png" x="15.03" y="1230.06" touchEnabled="false" visible="false"/>
<e:Label id="tips" text="点击左右按钮控制跷跷板的方向" width="100%" size="26" y="1122.7" x="0" textColor="0xffffff" verticalAlign="middle" textAlign="center" visible="false"/>
<e:Label id="tips2" text="炸弹放进垃圾桶就安全了哦~" size="26" y="1165.7" x="21" textColor="0xFFFFFF" verticalAlign="middle" textAlign="left" visible="false"/>
<e:Button id="getitBtn" label="" x="497" y="1149.03" visible="false">
<e:skinName>
<e:Skin states="up,down,disabled">
<e:Image width="100%" height="100%" source="getit_png" source.down="getit_png" source.disabled="getit_png"/>
<e:Label id="labelDisplay" horizontalCenter="0" verticalCenter="0"/>
</e:Skin>
</e:skinName>
</e:Button>
<e:Image id="award" source="红包_png" x="626" y="1501"/>
<e:Image id="awardDisabled" x="626" y="1501" source="红包gray_png"/>
<e:Group id="IceCream" y="1242.75" x="210.38" visible="false">
<e:Image id="IceCream_0_1" source="甜筒-未获得_png" x="26.7" top="1"/>
<e:Image id="IceCream_0_2" source="甜筒-未获得_png" x="105.72" top="1"/>
......@@ -102,8 +74,37 @@
<e:Image source="toast_png" x="0" y="0"/>
<e:Label id="toastInfo" text="收集到一个甜筒甜筒" width="100%" height="100%" verticalAlign="middle" textAlign="center" horizontalCenter="0" verticalCenter="0" size="28"/>
</e:Group>
<e:Image id="startBtnBg" source="dot_png" x="0" y="0" width="750" height="1624" touchEnabled="true" scaleX="1" scaleY="1"/>
<e:Button id="startBtn" label="" scaleX="1" scaleY="1" y="1376" horizontalCenter="0">
<e:Image id="guide" source="dot_png" x="0" y="0" width="750" height="1624" touchEnabled="true" visible="false"/>
<e:Label id="exemptionTxt" text="*兑换项与活动均与设备制造商Apple Inc.公司无关*" width="750" verticalAlign="middle" textAlign="center" size="12" y="1609.67" x="0" textColor="0x000000"/>
<e:Button id="rightBtn" label="" y="1292.31" scaleX="1" scaleY="1" alpha="1" x="550.33">
<e:skinName>
<e:Skin states="up,down,disabled">
<e:Image width="100%" height="100%" source="btnRight_png" source.down="btnRight1_png" source.disabled="btnRight1_png"/>
<e:Label id="labelDisplay" horizontalCenter="0" verticalCenter="0" size="26"/>
</e:Skin>
</e:skinName>
</e:Button>
<e:Button id="leftBtn" label="" y="1292.31" scaleX="1" scaleY="1" left="43" alpha="1">
<e:skinName>
<e:Skin states="up,down,disabled">
<e:Image width="100%" height="100%" source="btnLeft_png" source.down="btnLeft1_png" source.disabled="btnLeft1_png"/>
<e:Label id="labelDisplay" horizontalCenter="0" verticalCenter="0" size="26"/>
</e:Skin>
</e:skinName>
</e:Button>
<e:Image id="guild2pic" source="垃圾桶_png" x="15.03" y="1230.06" touchEnabled="false" visible="false"/>
<e:Label id="tips" text="点击左右按钮控制跷跷板的方向" width="100%" size="26" y="1122.7" x="0" textColor="0xffffff" verticalAlign="middle" textAlign="center" visible="false"/>
<e:Label id="tips2" text="炸弹放进垃圾桶就安全了哦~" size="26" y="1165.7" x="21" textColor="0xFFFFFF" verticalAlign="middle" textAlign="left" visible="false"/>
<e:Button id="getitBtn" label="" x="497" y="1149.03" visible="false">
<e:skinName>
<e:Skin states="up,down,disabled">
<e:Image width="100%" height="100%" source="getit_png" source.down="getit_png" source.disabled="getit_png"/>
<e:Label id="labelDisplay" horizontalCenter="0" verticalCenter="0"/>
</e:Skin>
</e:skinName>
</e:Button>
<e:Image id="startBtnBg" source="dot_png" x="0" y="0" width="750" height="1624" touchEnabled="true" scaleX="1" scaleY="1" visible="false"/>
<e:Button id="startBtn" label="" scaleX="1" scaleY="1" y="1376" horizontalCenter="0" visible="false">
<e:skinName>
<e:Skin states="up,down,disabled">
<e:Image width="100%" height="100%" source="startbtn_png" source.down="startbtn_png" source.disabled="startbtnGray_png"/>
......@@ -111,7 +112,7 @@
</e:Skin>
</e:skinName>
</e:Button>
<e:Label id="countTxt" text="0积分每次" width="100%" verticalAlign="middle" textAlign="center" size="19" y="1458.67" textColor="0xffd434"/>
<e:Label id="countTxt" text="0积分每次" width="100%" verticalAlign="middle" textAlign="center" size="19" y="1458.67" textColor="0xffd434" visible="false"/>
</e:Group>
<e:Button id="recordBtn" label="奖品记录" y="16" scaleX="1" scaleY="1" right="23" visible="false">
<e:skinName>
......
......@@ -19,7 +19,7 @@ export class MyExmlPlugin extends ExmlPlugin2 implements plugins.Command {
'egg.png',
'icecream.png',
'success.png',
'fail.png',
'failed.png',
];
if (excludes.indexOf(file.basename) != -1) {
return file;
......
......@@ -6,7 +6,7 @@ import check from "./check";
import check2 from "./check2";
import createBox from "./createBox";
import createItems from "./createItems";
import { initLevel } from "./level";
import { initLevel, isAllLevelPass } from "./level";
import Panel from "../../libs/new_wx/components/Panel";
import PanelCtrl from "../../libs/new_wx/ctrls/panelCtrl";
import wait from "../../libs/new_tc/wait";
......@@ -97,7 +97,6 @@ export default class StartScene extends StartSceneBase {
// this.initJoker(this['joker']);
this.initLights(this['lights1'], this['lights2']);
this['boomalert'].height = this.stage.stageHeight;
this.runGame();
}
......@@ -208,9 +207,9 @@ export default class StartScene extends StartSceneBase {
onTap_startBtn(e?: egret.Event) {
super.onTap_startBtn(e);
this['startBtnBg'].visible=false;
this['startBtn'].visible=false;
this['countTxt'].visible=false;
this['startBtnBg'].visible = false;
this['startBtn'].visible = false;
this['countTxt'].visible = false;
createItems(this);
}
......
......@@ -4,6 +4,7 @@ import { addItem, isAllLevelPass, isLevelPass, nextLevel, clearLevel } from "./l
import StartScene from "./StartScene";
import vibrate from "./vibrate";
import { playBoom, playSuccess, playToast, playBoomAlert } from "./playMovieClip";
import { stopCreateItems } from "./createItems";
const check = (_this: StartScene) => {
const center = 109 - 40;
......@@ -53,13 +54,13 @@ const check = (_this: StartScene) => {
//leftbasket rightbasket
egret.Tween.removeTweens(_this['leftbasket']);
egret.Tween.removeTweens(_this['leftbasket1']);
egret.Tween.get(_this['leftbasket']).to({ scaleX: 1.1 }, 200).to({ scaleX: 1 }, 100);
egret.Tween.get(_this['leftbasket1']).to({ scaleX: 1.1 }, 200).to({ scaleX: 1 }, 100);
egret.Tween.get(_this['leftbasket']).to({ scaleX: 1.2 }, 100).to({ scaleX: 1 }, 100);
egret.Tween.get(_this['leftbasket1']).to({ scaleX: 1.2 }, 100).to({ scaleX: 1 }, 100);
} else {
egret.Tween.removeTweens(_this['rightbasket']);
egret.Tween.removeTweens(_this['rightbasket1']);
egret.Tween.get(_this['rightbasket']).to({ scaleX: 1.1 }, 200).to({ scaleX: 1 }, 100);
egret.Tween.get(_this['rightbasket1']).to({ scaleX: 1.1 }, 200).to({ scaleX: 1 }, 100);
egret.Tween.get(_this['rightbasket']).to({ scaleX: 1.2 }, 100).to({ scaleX: 1 }, 100);
egret.Tween.get(_this['rightbasket1']).to({ scaleX: 1.2 }, 100).to({ scaleX: 1 }, 100);
}
if (i.label == LabelType.Boom) {
_this._egretRender.remove(i);
......@@ -81,7 +82,7 @@ const check = (_this: StartScene) => {
if (isLevelPass()) {
if (isAllLevelPass()) {
stopCreateItems();
} else {
nextLevel();
}
......
......@@ -3,6 +3,7 @@ import { award, awardMask } from "./collisionConfig";
import createItem from "./items/createItem";
import LabelType from "./LabelType";
import StartScene from "./StartScene";
import { isAllLevelPass } from "./level";
const startY = 984 - 100 - 60;
const startX = 100;
......@@ -28,6 +29,7 @@ const ontick = () => {
else if (tags == 2) {
frameInterval = 60;
}
// i=1
const type = types[i];
let body;
if (type == LabelType.Candy2) {
......@@ -78,6 +80,7 @@ const ontick = () => {
export default ($this: StartScene) => {
_this = $this;
if(isAllLevelPass())return;
egret.startTick(ontick, this)
}
......
import LabelType from "./LabelType";
import StartScene from "./StartScene";
import vibrate from "./vibrate";
const groups = [
LabelType.IceCream,
LabelType.Donut,
......@@ -13,8 +12,13 @@ groupName[LabelType.Egg] = '彩蛋';
groupName[LabelType.Gift2] = '礼盒';
groupName[LabelType.IceCream] = '冰淇淋';
let currentLv;
currentLv = groups[0];
let data: any = {};
const datastr = localStorage.getItem('data');
let data = datastr ? JSON.parse(datastr) : {};
;
const currentLvstr = localStorage.getItem('currentLv');
currentLv = currentLvstr ? currentLvstr : groups[0];
let that: StartScene;
const MAX = 3;
......@@ -42,17 +46,20 @@ export const addItem = async (type) => {
data[type] = MAX;
add = false;
}
localStorage.setItem('data', JSON.stringify(data));
await updateLevelView(add);
}
export const clearLevel = () => {
data[currentLv] = 0;
localStorage.setItem('data', JSON.stringify(data));
updateLevelView(false);
}
export const nextLevel = () => {
const i = groups.indexOf(currentLv);
currentLv = groups[i + 1];
localStorage.setItem('currentLv', currentLv);
updateLevelView(false);
}
......@@ -62,9 +69,10 @@ export const getCurrentName = () => { return groupName[currentLv] }
const updateLevelView = async (add) => {
hideAllGroup();
that['awardDisabled'].visible=that['award'].visible = !isAllLevelPass();
that[currentLv].visible = true;
that['condition'].text = `本轮需获3个${groupName[currentLv]}`
if (!that['condition'].filters || that['condition'].filters.length < 1) {
var color: number = 0x1ec9bf; /// 光晕的颜色,十六进制,不包含透明度
var alpha: number = 1; /// 光晕的颜色透明度,是对 color 参数的透明度设定。有效值为 0.0 到 1.0。例如,0.8 设置透明度值为 80%。
......@@ -130,8 +138,8 @@ const setProgress = (type, progress, add) => {
}
if (target) {
target.scaleX = target.scaleY = 0;
egret.Tween.get(target).set({ scaleX: 0, scaleY: 0 }).to({ scaleX: 1, scaleY: 1 },500, egret.Ease.getElasticOut(1,0.3)).call(() => r())
}else r();
egret.Tween.get(target).set({ scaleX: 0, scaleY: 0 }).to({ scaleX: 1, scaleY: 1 }, 500, egret.Ease.getElasticOut(1, 0.3)).call(() => r())
} else r();
});
}
......
......@@ -127,7 +127,7 @@ export const playToast = (that, type, isLeft) => {
if (currentType == type) {
txt = `收集到一个${getCurrentName()}!`;
} else {
// txt = `再接再厉哦!`;
txt = `再接再厉哦!`;
}
}
}
......
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