diff --git a/assets/script/game/common/SingletonModuleComp.ts b/assets/script/game/common/SingletonModuleComp.ts index c65fced1..3bba3940 100644 --- a/assets/script/game/common/SingletonModuleComp.ts +++ b/assets/script/game/common/SingletonModuleComp.ts @@ -17,16 +17,12 @@ import { gameDataSync } from "./GameDataSync"; */ export interface GameDate{ gold:number, - heros:any, - fight_hero:number, timestamp?: number, // 用于比对本地与云端数据的最新状态 collection?: { talents: Partial>, player_level: number, player_exp: number, talent_points: number, - skills?: {uuid:0,count:0}, - friend?: {uuid:0,count:0}, } } export interface CloudData { @@ -64,8 +60,6 @@ export class SingletonModuleComp extends ecs.Comp { guides:any=[0,0,0,0,0] current_guide:number=0 - fight_hero: number = 5001; // 单个出战英雄 - heros:any= [5001] collection: { talents: Partial>; @@ -239,14 +233,6 @@ export class SingletonModuleComp extends ecs.Comp { if (data.gold !== undefined) { this.vmdata.gold = data.gold; } - // 同步英雄 - if (data.heros && Array.isArray(data.heros)) { - this.heros = data.heros; - } - // 同步出战英雄 - if (data.fight_hero !== undefined) { - this.fight_hero = data.fight_hero; - } // 恢复收集记录 if (data.collection) { const remoteCol = data.collection; @@ -267,8 +253,6 @@ export class SingletonModuleComp extends ecs.Comp { getGameDate(){ let data: GameDate = { gold: this.vmdata.gold, - heros: this.heros, - fight_hero: this.fight_hero, collection: this.collection, timestamp: Date.now() // 每次获取当前数据结构时都附带最新的时间戳 }; diff --git a/assets/script/game/wx_clound_client_api/USAGE.md b/assets/script/game/wx_clound_client_api/USAGE.md index c09da119..51479787 100644 --- a/assets/script/game/wx_clound_client_api/USAGE.md +++ b/assets/script/game/wx_clound_client_api/USAGE.md @@ -20,7 +20,7 @@ if (loginResult.result.code === 200) { const userData = loginResult.result.data; console.log("用户ID:", userData.user_id); console.log("金币:", userData.data.gold); - console.log("出战英雄:", userData.fight_heros); + console.log("用户金币:", userData.gold); } ```