Commit 01d7612a authored by spc's avatar spc

add new code

parent abeb9828
......@@ -2,7 +2,7 @@ const resCanvasListCsd = {
'63cb446e-1158-4a94-bf0c-c19ecc7d2cc6': {
name: 'openTexture',
ext: '.png',
url: 'https://yun.duiba.com.cn/spark/assets/openTexture.4558fad0aadb7003efd6b71716816a93ad181283.png',
url: 'https://yun.duiba.com.cn/spark/assets/openTexture__.b7037af9b8c768386bbe994c40e5331fbd8d4e8a.png',
uuid: '63cb446e-1158-4a94-bf0c-c19ecc7d2cc6'
},
'bdb3cbec-1af5-49e9-89ba-2c2ecd90f760': {
......
......@@ -98,7 +98,6 @@ export class Main {
FYGE.GlobalLoader.loadImage(
(s, image) => {
if (s) {
console.log('ssss', image)
setTimeout(() => {
FYGE.createTextureSheet(new FYGE.BaseTexture(image), lottieTexture);
resolve('complete')
......@@ -160,9 +159,11 @@ export class Main {
await this.loadImageTexturesCsd01(resCanvasList)
await this.loadImageTexturesCsd02(resCanvasList)
// changeScene(OpenAni)
console.log(22222222222222222222)
changeScene(OpenAni)
sendTbNet(TbNetName.onload, {})
// changeScene(CsdScene)
changeScene(XxlScene)
// changeScene(XxlScene)
})
await InitLottie.initLottieList(resLottieList);
......
......@@ -85,7 +85,10 @@ export enum TbNetName {
getPrizeInfo = "mine.getPrizeInfo",
//查看奖品
seePrize = "mine.seePrize"
seePrize = "mine.seePrize",
// 开始加载
onload = "mine.animationOnloaded"
}
//返回数据类型,到时再调整
......
......@@ -649,6 +649,9 @@ export class XxlScene extends Scene {
updateScore(userGetScore: number) {
this.userScore += userGetScore
if (this.userScore > this.robotScore) {
this.updateFakeScore(this.robot.getScore(this.userScore, this.timeNum))
}
if (this.level < 2 && this.userScore >= 1000 && this.userScore < 2000) {
this.level = 2
this.llevelText.text = "第" + this.level + "关"
......
......@@ -116,6 +116,7 @@
class="homepage_pagecanvas"
onBackPage="backToPage"
gameType="{{ gameType }}"
onAnimationLoadOver="onAnimationLoadOver"
>
</pagecanvas>
......
......@@ -38,17 +38,20 @@ Component({
console.warn('gameType', this.props.gameType)
if (this.props.gameType !== prevProps.gameType) {
this.setData({ gameType: this.props.gameType })
// 切换游戏场景
if (!this.main) return
this.main.changeGameSence(this.props.gameType)
// 存储本地 用户玩游戏的信息
if (this.props.gameType === 1) {
// 切换游戏场景
if (!this.main) return
this.main.changeGameSence(this.props.gameType)
my.setStorage({
key: `YD11_firstInGameCsd_${app.activityId}_${app.openId}`,
data: 1
});
app.isNewUser_csd = false
} else if (this.props.gameType === 2) {
// 切换游戏场景
if (!this.main) return
this.main.changeGameSence(this.props.gameType)
my.setStorage({
key: `YD11_firstInGameCsd_${app.activityId}_${app.openId}`,
data: 1
......@@ -124,12 +127,19 @@ Component({
// 游戏结束开奖 -- 提前
this.seePrize()
break;
case 'mine.animationOnloaded':
// 開場動畫結束
this.openAnimationOver()
break;
default:
console.warn('监听时间名 没有对应处理函数')
break;
}
},
// 開場動畫結束
openAnimationOver() {
this.props.onAnimationLoadOver()
},
// 从游戏中返回
back () {
this.props.onBackPage()
......
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