Commit 01d7612a authored by spc's avatar spc

add new code

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