Compare commits

1 Commits
v2 ... main

Author SHA1 Message Date
c3b80943c2 支持上传logo 2026-05-19 14:17:46 +08:00
3 changed files with 26 additions and 1 deletions

View File

@@ -8418,7 +8418,7 @@
},
"_type": 0,
"_fillType": 0,
"_sizeMode": 1,
"_sizeMode": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
@@ -12196,6 +12196,12 @@
"game_name": {
"__id__": 354
},
"game_logo": {
"__id__": 351
},
"game_logo_bg": {
"__id__": 345
},
"_id": ""
},
{

View File

@@ -40,6 +40,12 @@ export class PageMain extends BaseView {
/** 游戏名 */
@property(Node)
game_name: Node = null;
/** 奖励icon */
@property(Sprite)
game_logo: Sprite = null!;
/** 奖励icon */
@property(Sprite)
game_logo_bg: Sprite = null!;
/** 是否可以开始游戏 */
private _canStart = true;
@@ -52,6 +58,15 @@ export class PageMain extends BaseView {
this.lab_remain.string = "CHANCE:<color=#ff5656>" + USERDATA.point.toString() + "</color>"
this.initRw()
this.startFloatingAnimation()
// 加载配置的logo
if (USERDATA.logo && this.game_logo) {
Tools.remoteLoadSprite(USERDATA.logo, this.game_logo)
}
if (USERDATA.logo_back && this.game_logo_bg) {
Tools.remoteLoadSprite(USERDATA.logo_back, this.game_logo_bg)
}
}
// 界面关闭时的相关逻辑写在这(已经关闭的界面不会触发onHide)

View File

@@ -13,6 +13,10 @@ class UserData {
/** 游戏描述 */
public description : string = "";
/* 游戏logo */
public logo : string = "";
public logo_back : string = "";
private constructor(){}
static get Instance(){
if(UserData.instance == null){