feat: migrate platform login scenes and native login flows

This commit is contained in:
2026-09-06 09:06:00 +08:00
parent f2a948f059
commit 695d3be25c
140 changed files with 7599 additions and 4397 deletions
@@ -0,0 +1,9 @@
{
"ver": "1.2.0",
"importer": "directory",
"imported": true,
"uuid": "aea92450-9c09-40ed-8a4d-5cced7a56b3b",
"files": [],
"subMetas": {},
"userData": {}
}
@@ -0,0 +1,9 @@
{
"ver": "1.2.0",
"importer": "directory",
"imported": true,
"uuid": "c1b8189d-1134-4ff3-9426-d2668fd9ab6f",
"files": [],
"subMetas": {},
"userData": {}
}
@@ -2,7 +2,7 @@
"ver": "4.0.24",
"importer": "typescript",
"imported": true,
"uuid": "2eb9409f-115d-4a7d-bdc4-30a333b57a28",
"uuid": "0693ece5-bed1-4b21-8ae7-7393c2eee8a7",
"files": [],
"subMetas": {},
"userData": {}
@@ -2,7 +2,7 @@
"ver": "4.0.24",
"importer": "typescript",
"imported": true,
"uuid": "d8981b12-16b5-49a7-95d6-a51eb735462a",
"uuid": "4deb8dec-916d-4dda-b709-ac5f38fa0253",
"files": [],
"subMetas": {},
"userData": {}
@@ -70,7 +70,7 @@ function sample(random: () => number, key: string): number {
return sampleLocalRandom(random, (reason, cause) => wrap(key, 'random', reason, cause));
}
function generate(random: () => number, key: string): LoginAccountIdentity {
export function generate(random: () => number, key: string): LoginAccountIdentity {
const id = Math.floor(sample(random, key) * 100000);
const avatar = AVATARS[Math.floor(sample(random, key) * AVATARS.length)]!;
const sex = Math.floor(sample(random, key) * 2) + 1;
@@ -0,0 +1,9 @@
{
"ver": "4.0.24",
"importer": "typescript",
"imported": true,
"uuid": "bb7c9b58-c08f-4dc9-b8d1-57c2b20f9c28",
"files": [],
"subMetas": {},
"userData": {}
}
@@ -0,0 +1,9 @@
{
"ver": "1.2.0",
"importer": "directory",
"imported": true,
"uuid": "8499ef07-6051-4d8f-aca6-11996e448b7f",
"files": [],
"subMetas": {},
"userData": {}
}
@@ -0,0 +1,169 @@
import type { LoginAccountIdentity, DeviceLoginMode } from '../../protocol/contracts/login-contract.ts';
import type { LoginPolicy } from '../../presentation/login-policy.ts';
import { generate } from '../local/visitor-account.ts';
import { readPhoneCode } from './phone-code.ts';
export interface LoginNativeSettings {
accreditlogin(provider: number): void;
getcompareCode(): number | string;
}
interface Options {
storage: {getItem(key:string):string|null;setItem(key:string,value:string):void};
settings?:LoginNativeSettings; random():number; now():number;
gameid:string|number;agentid:string|number;policy:LoginPolicy;
submit(account:LoginAccountIdentity,device:DeviceLoginMode):void;tip(message:string):void;
}
/** MD5 is the legacy nickname derivation, not a security primitive. */
export function nicknameHash(input:string):string {
const bytes=Array.from(new TextEncoder().encode(input));const bitLength=bytes.length*8;
bytes.push(128);while(bytes.length%64!==56)bytes.push(0);
for(let i=0;i<8;i++)bytes.push(i<4?(bitLength>>>(8*i))&255:0);
const shifts=[7,12,17,22,5,9,14,20,4,11,16,23,6,10,15,21];
let state=[0x67452301,0xefcdab89,0x98badcfe,0x10325476];
for(let offset=0;offset<bytes.length;offset+=64){
const words=Array.from({length:16},(_,j)=>bytes[offset+j*4]|bytes[offset+j*4+1]<<8|bytes[offset+j*4+2]<<16|bytes[offset+j*4+3]<<24);
let [a,b,c,d]=state;
for(let i=0;i<64;i++){
const round=Math.floor(i/16);let f:number,g:number;
if(round===0){f=(b&c)|(~b&d);g=i;}else if(round===1){f=(d&b)|(~d&c);g=(5*i+1)%16;}
else if(round===2){f=b^c^d;g=(3*i+5)%16;}else{f=c^(b|~d);g=(7*i)%16;}
const sum=(a+f+Math.floor(Math.abs(Math.sin(i+1))*4294967296)+words[g])|0;
const shift=shifts[round*4+i%4];const next=(b+((sum<<shift)|(sum>>>(32-shift))))|0;
a=d;d=c;c=b;b=next;
}
state=state.map((v,i)=>(v+[a,b,c,d][i])|0);
}
return state.map(v=>[0,8,16,24].map(s=>((v>>>s)&255).toString(16).padStart(2,'0')).join('')).join('');
}
function record(value:unknown):Record<string,unknown>{
if(typeof value==='string')value=JSON.parse(value);
if(!value||typeof value!=='object'||Array.isArray(value))throw Error('Invalid sharelogin account');
return value as Record<string,unknown>;
}
function accountFrom(value:unknown):LoginAccountIdentity {
const data=record(value);
for(const field of ['openid','headimgurl','nickname','city','Province'])if(typeof data[field]!=='string')throw Error(`Invalid sharelogin.${field}`);
if(typeof data.unionid!=='string'&&typeof data.unionid!=='number')throw Error('Invalid sharelogin.unionid');
const sex=data.sex?data.sex:1; // Func.sharelogin explicitly owns this default.
if(typeof sex!=='number'||!Number.isFinite(sex))throw Error('Invalid sharelogin.sex');
if(!data.nickname&&!data.headimgurl)throw Error('授权失败,请重新授权!');
return {openid:data.openid as string,avatar:data.headimgurl as string,nickname:data.nickname as string,
city:data.city as string,province:data.Province as string,unionid:data.unionid as string|number,sex};
}
/** Exact native/cached account boundary; UI never invents account or server fields. */
/** 账户统一入口:协议确认、缓存选择、原生授权及提交模式均由此处管理。 */
export class LoginAccounts {
readonly versionState:0|1;
private hiddenClicks=0;
/** 每次启动默认同意;按钮、缓存登录及原生回调读取同一份状态。 */
private agreementAccepted=true;
get agreed():boolean{return this.agreementAccepted;}
setAgreement(accepted:boolean):void{
if(accepted&&!this.agreementAccepted)this.options.tip('');
this.agreementAccepted=accepted;
}
/** 未同意时只提示,不调用授权、不写缓存、不提交请求。 */
requireAgreement():boolean{
if(this.agreementAccepted)return true;
this.options.tip('未同意协议');return false;
}
constructor(private readonly options:Options){
// Browser source explicitly uses the legacy getVersionState default of zero.
const state=options.settings?Number(options.settings.getcompareCode()):0;
if(state!==0&&state!==1)throw Error('Invalid getcompareCode result');this.versionState=state;
}
private read(key:string,cookie:boolean):Record<string,unknown>|null {
if(cookie&&this.versionState===0){
const expiry=this.options.storage.getItem('tsgame_validtime');
if(expiry===null)return null;
if(!Number.isFinite(Number(expiry)))throw Error('Invalid tsgame_validtime');
if(this.options.now()>=Number(expiry))return null;
}
const raw=this.options.storage.getItem(key);return raw===null?null:record(raw);
}
private save(account:LoginAccountIdentity,key:string,telphone?:string){
const data={openid:account.openid,headimgurl:account.avatar,nickname:account.nickname,sex:account.sex,
city:account.city,Province:account.province,unionid:account.unionid,...(telphone===undefined?{}:{telphone})};
this.options.storage.setItem('tsgame_validtime',String(this.options.now()+48*60*60*1000));
this.options.storage.setItem(key,JSON.stringify(data));
}
/** 保留原工程缓存优先级,游客开关先于手机模式判断。 */
cached():LoginAccountIdentity|null {
if(this.versionState!==0)return null;
const policy=this.options.policy;
const data=this.read(policy.showVisitor?'tsgame_visitorinfo':policy.deviceLogin?'tsgame_devicePlayer':'tsgame_wxinfo',true);
return data===null?null:accountFrom(data);
}
autoLogin():void {
if(!this.requireAgreement())return;
const account=this.cached();if(account===null)throw Error('No cached login');
// showVisitor selects the visitor cache above, even when the phone button is enabled.
if(!this.options.policy.showVisitor&&this.options.policy.deviceLogin){
const data=this.read('tsgame_devicePlayer',true)!;
if(typeof data.telphone!=='string')throw Error('Cached device account missing telphone');
this.options.submit(account,{enabled:true,telphone:data.telphone});
}else this.options.submit(account,{enabled:false});
}
authorize(provider:'wechat'|'qq'):void {
if(!this.requireAgreement())return;
if(!this.options.settings){this.options.tip('当前宿主未提供原生登录授权接口');return;}
if(provider==='wechat')this.options.storage.setItem(`tsgame_playerid_${this.options.gameid}${this.options.agentid}`,'');
this.options.settings.accreditlogin(provider==='wechat'?2:1);
}
acceptNative(data:unknown,channel:'global'|'bridge'):void {
if(!this.requireAgreement())return;
const account=accountFrom(data);
this.save(account,channel==='global'&&this.options.policy.showVisitor?'tsgame_visitorinfo':'tsgame_wxinfo');
this.options.submit(account,{enabled:false});
}
/** 仅本次手机登录要求 tel,不能依据按钮显示配置要求游客响应携带手机号。 */
loginSucceeded(value:unknown,mode:DeviceLoginMode):void {
const data=record(value);
if(data.state!==0)throw Error('Cannot cache an unsuccessful login');
if(typeof data.playerid!=='string'&&(typeof data.playerid!=='number'||!Number.isFinite(data.playerid)))throw Error('Invalid login playerid');
// Button availability is not the authentication mode of this request.
if(mode.enabled){
if(typeof data.tel!=='string')throw Error('Device login response missing tel');
const account=accountFrom({...data,headimgurl:data.avatar,Province:data.province});
this.save(account,'tsgame_devicePlayer',data.tel);
this.options.storage.setItem('tsgame_dLogin','1');
}
this.options.storage.setItem(`tsgame_playerid_${this.options.gameid}${this.options.agentid}`,String(data.playerid));
}
visitor():void {
if(!this.requireAgreement())return;
const cached=this.read('tsgame_visitorinfo',false);
const account=cached===null?generate(this.options.random,'tsgame_visitorinfo'):accountFrom(cached);
this.save(account,this.options.policy.showVisitor?'tsgame_visitorinfo':'tsgame_wxinfo');
this.options.submit(account,{enabled:false});
}
hiddenFirst():void{this.hiddenClicks++;}
phonePanelState(){return readPhoneCode(this.options.storage.getItem('sgame_phoneCode'),this.options.now());}
hiddenSecond():void{if(this.hiddenClicks>=5&&this.options.policy.hiddenVisitor){this.hiddenClicks=0;this.visitor();}}
private deviceAccount(phone?:string):LoginAccountIdentity {
const cached=this.read('tsgame_devicePlayer',true);if(cached)return accountFrom(cached);
let unionid:string;
if(phone!==undefined)unionid=`phone_${phone}`;
else {
const info=this.read('tsgame_phoneInfo1',false);
if(info&&typeof info.PhoneIMEI==='string'&&info.PhoneIMEI)unionid=info.PhoneIMEI;
else {
const sets=['0123456789','qwertyuioplkjhgfdsazxcvbnm','QWERTYUIOPLKJHGFDSAZXCVBNM'];
unionid=Array.from({length:25},()=>{const chars=sets[Math.round(this.options.random()*2)];return chars[Math.ceil(this.options.random()*100000000)%chars.length];}).join('');
this.options.storage.setItem('tsgame_phoneInfo1',JSON.stringify({...info,PhoneIMEI:unionid}));
}
}
const {avatarUrl,avatarRange}=this.options.policy;
return {openid:unionid,unionid,nickname:`User_${nicknameHash(unionid).slice(0,6)}`,
avatar:avatarUrl?`${avatarUrl}${avatarRange[0]+Math.round(this.options.random()*(avatarRange[1]-avatarRange[0]))}.jpg`:'',
sex:Math.floor(this.options.random()*2)+1,city:'China',province:phone===undefined?'HongKong':'ShangHai'};
}
device():void{if(!this.requireAgreement())return;this.options.submit(this.deviceAccount(),{enabled:false});}
phone(phone:string,code:string):void {
if(!this.requireAgreement())return;
if(!phone||!code){this.options.tip('手机号与验证码均不能为空!');return;}
this.options.submit(this.deviceAccount(phone),{enabled:true,telphone:phone,smmcode:code});
}
}
@@ -0,0 +1,9 @@
{
"ver": "4.0.24",
"importer": "typescript",
"imported": true,
"uuid": "57d7618f-3e88-4036-83de-96a6e63be657",
"files": [],
"subMetas": {},
"userData": {}
}
@@ -0,0 +1,9 @@
{
"ver": "4.0.24",
"importer": "typescript",
"imported": true,
"uuid": "27e9345c-5f75-4829-be9f-174141dec6e6",
"files": [],
"subMetas": {},
"userData": {}
}
@@ -0,0 +1,9 @@
{
"ver": "4.0.24",
"importer": "typescript",
"imported": true,
"uuid": "df3fb4b3-bb92-40f7-b661-05a158dec617",
"files": [],
"subMetas": {},
"userData": {}
}
@@ -0,0 +1,9 @@
/** Logic.readPhoneCode: sgame_phoneCode owns the phone number and 30-second expiry. */
export function readPhoneCode(raw:string|null,now:number):{phoneNumber:string;restTime:number}|null {
if(raw===null)return null;
const data=JSON.parse(raw);
if(!data||typeof data!=='object'||typeof data.phoneNumber!=='string')throw Error('Invalid phoneCode.phoneNumber');
if(!Object.prototype.hasOwnProperty.call(data,'codeTime')||!['string','number'].includes(typeof data.codeTime)||!Number.isFinite(Number(data.codeTime)))throw Error('Invalid phoneCode.codeTime');
const elapsed=now-Number(data.codeTime);
return {phoneNumber:data.phoneNumber,restTime:elapsed>30000?0:Math.trunc(30-elapsed/1000)};
}
@@ -0,0 +1,9 @@
{
"ver": "4.0.24",
"importer": "typescript",
"imported": true,
"uuid": "bb46066c-73af-4603-9f7a-5579a2ad030b",
"files": [],
"subMetas": {},
"userData": {}
}
@@ -0,0 +1,9 @@
{
"ver": "4.0.24",
"importer": "typescript",
"imported": true,
"uuid": "588b5341-c0f6-4eef-bf31-b47c815db2b0",
"files": [],
"subMetas": {},
"userData": {}
}
@@ -63,8 +63,9 @@ export function assertLocalStartupContext(context: LocalStartupContext): void {
if (!startupConfig.useLocalServer) fail('useLocalServer', 'source must be true');
if (config.mode !== 'debug') fail('mode', 'must be debug');
if (config.isDebugger !== true) fail('isDebugger', 'must be true');
if (config.source !== 'remote') fail('source', 'must be remote');
if (config.gameserver !== startupConfig.gameserver) fail('gameserver', 'must equal startupConfig remote entry');
if (config.source !== startupConfig.configSource) fail('source', 'must equal startupConfig.configSource');
const configEntry = startupConfig.configSource === 'local' ? startupConfig.localConfigResource : startupConfig.gameserver;
if (config.gameserver !== configEntry) fail('gameserver', 'must equal startupConfig selected entry');
if (!config.remoteConfig || typeof config.remoteConfig.getValue !== 'function') fail('remoteConfig', 'must provide memory view');
if (!config.rawConfig || config.rawConfig !== config.remoteConfig.raw) fail('rawConfig', 'must share remoteConfig.raw');
@@ -0,0 +1,9 @@
{
"ver": "4.0.24",
"importer": "typescript",
"imported": true,
"uuid": "1d920343-a60b-4b40-8eba-f29b4a7d53fa",
"files": [],
"subMetas": {},
"userData": {}
}
@@ -13,6 +13,10 @@ export interface DebugAccount {
export interface StartupConfig {
readonly mode: RuntimeMode;
/** 配置内容来源;local 仅允许 debug,独立于 WebSocket 服务器选择。 */
readonly configSource: 'remote' | 'local';
/** resources 下的 txt 路径,不含扩展名。 */
readonly localConfigResource: string;
readonly gameserver: string;
readonly useLocalServer: boolean;
readonly localServers: readonly string[];
@@ -21,7 +25,10 @@ export interface StartupConfig {
/** 唯一发布配置入口;mode 与服务器选择互相独立。 */
export const STARTUP_CONFIG: Readonly<StartupConfig> = Object.freeze({
mode: 'debug',
gameserver: 'https://tsgames.daoqi88.cn/config/update_jsonv2.txt',
// 开发时改为 local,编辑 assets/resources/dev-config/update_jsonv2.txt 后重新预览。
configSource: 'local',
localConfigResource: 'dev-config/update_jsonv2',
gameserver: 'https://tsgames.daoqi88.cn/config_test/update_jsonv2.txt',
useLocalServer: true,
localServers: Object.freeze(['ws://127.0.0.1:3088']),
});
@@ -46,6 +53,11 @@ export function validateLocalServer(value: string, field = 'localServers'): void
export function validateStartupConfig(source: Readonly<StartupConfig>): Readonly<StartupConfig> {
if (!source || typeof source !== 'object') invalid('source', 'must be an object');
const mode = resolveRuntimeMode(source.mode);
if (source.configSource !== 'remote' && source.configSource !== 'local') invalid('configSource', 'must be remote or local');
if (source.configSource === 'local' && mode !== 'debug') invalid('configSource', 'local is only allowed in debug mode');
if (typeof source.localConfigResource !== 'string' || !/^[a-zA-Z0-9_-]+(?:\/[a-zA-Z0-9_-]+)*$/.test(source.localConfigResource)) {
invalid('localConfigResource', 'must be a resources path without extension or traversal');
}
if (typeof source.useLocalServer !== 'boolean') invalid('useLocalServer', 'must be boolean');
if (typeof source.gameserver !== 'string' || source.gameserver.trim() !== source.gameserver) invalid('gameserver', 'must be http(s) URL');
let url: URL;
@@ -53,7 +65,7 @@ export function validateStartupConfig(source: Readonly<StartupConfig>): Readonly
if (url.protocol !== 'http:' && url.protocol !== 'https:') invalid('gameserver', 'must be http(s) URL');
if (!Array.isArray(source.localServers) || source.localServers.length === 0) invalid('localServers', 'must be a nonempty array');
for (let index = 0; index < source.localServers.length; index++) validateLocalServer(source.localServers[index], 'localServers[' + index + ']');
return Object.freeze({mode, gameserver:source.gameserver, useLocalServer:source.useLocalServer, localServers:Object.freeze([...source.localServers])});
return Object.freeze({mode, configSource:source.configSource, localConfigResource:source.localConfigResource, gameserver:source.gameserver, useLocalServer:source.useLocalServer, localServers:Object.freeze([...source.localServers])});
}
/** 忠实旧 min_replaceAll 链:- → /,# → :,再包成 http://...txt。 */
@@ -51,29 +51,52 @@ function validateHierarchy(scope: ConfigObject, depth: number): void {
for (const entry of list) validateHierarchy(requireObject(entry, listName), depth + 1);
}
/** Preserve first loose identity match, truthy overrides and whole-object replacement. */
/**
* Port of Game_Surface_3/12_Logic.js get_paravalue. Only GameData globals are
* replaced with the resolved identity argument; lookup order and truthiness stay exact.
* createRemoteConfig validates the downloaded JSON before exposing this reader.
*/
export function get_paravalue(
o_config: { readonly data?: Readonly<ConfigObject> | null },
paraname: string,
identity: Readonly<ChannelIdentity>,
): unknown {
const {agentid, gameid, channelid, marketid} = identity;
let paravalue: unknown = null;
const do_get_para = (arylist: unknown, keyname: string, keyvalue: string | number): ConfigObject | null => {
if (arylist && keyname && keyvalue) {
const list = arylist as ConfigObject[];
for (let i = 0; i < list.length; i++) {
if (list[i][keyname] == keyvalue) {
if (list[i][paraname]) paravalue = list[i][paraname];
return list[i];
}
}
}
return null;
};
if (!o_config.data) return paravalue;
if (o_config.data[paraname]) paravalue = o_config.data[paraname];
const _o_agent = do_get_para(o_config.data.agentlist, 'agentid', agentid);
if (!_o_agent) return paravalue;
const _o_game = do_get_para(_o_agent.gamelist, 'gameid', gameid);
if (!_o_game) return paravalue;
const _o_channel = do_get_para(_o_game.channellist, 'channelid', channelid);
if (!_o_channel) return paravalue;
const _o_market = do_get_para(_o_channel.marketlist, 'marketid', marketid);
if (!_o_market) return paravalue;
return paravalue;
}
/** All consumers share get_paravalue; no separate hierarchy or override rules. */
export function createRemoteConfig(input: unknown, identity: Readonly<ChannelIdentity>): RemoteConfig {
const raw = requireObject(input, 'root');
validateHierarchy(raw, 0);
const scopes = [raw];
let scope = raw;
for (const [listName, key] of SCOPES) {
const list = scope[listName] as ConfigObject[] | undefined;
// Legacy do_get_para skips any falsy identity, including numeric marketid=0.
if (!list || !identity[key]) break;
const match = list.find(entry => entry[key] == identity[key]);
if (!match) break;
scopes.push(match);
scope = match;
}
const wrapper = {data: raw};
return Object.freeze({
raw,
getValue(name: string): unknown {
let value: unknown = null;
for (const current of scopes) {
if (Object.prototype.hasOwnProperty.call(current, name) && current[name]) value = current[name];
}
return value;
return get_paravalue(wrapper, name, identity);
},
});
}
@@ -32,7 +32,8 @@ export interface RuntimeConfig {
readonly isDebugger: boolean;
readonly identity: Readonly<ChannelIdentity>;
readonly servers: readonly string[];
readonly source: 'remote';
readonly source: 'remote' | 'local';
/** 实际读取入口:remote 为最终 URL,local 为 resources 资源路径。 */
readonly gameserver: string;
readonly rawConfig: RemoteConfig['raw'];
readonly remoteConfig: RemoteConfig;
@@ -44,6 +45,8 @@ export interface ResolveRuntimeConfigOptions {
readonly win: NativeHost;
readonly search: string;
readonly fetcher: ConfigFetcher;
/** 由引擎层注入项目 txt 读取器;仅 local 模式需要,缺失直接报错。 */
readonly localFetcher?: ConfigFetcher;
readonly cacheBust?: () => string;
}
@@ -78,17 +81,21 @@ export async function resolveRuntimeConfig(
const startupConfig = validateStartupConfig(options.startupConfig === undefined ? STARTUP_CONFIG : options.startupConfig);
const identity = resolveHostIdentity(options);
const gameserver = resolveGameServer({
// 先选择唯一来源;本地模式不读取或应用宿主的远程 gameconfig 覆盖。
const local = startupConfig.configSource === 'local';
const gameserver = local ? startupConfig.localConfigResource : resolveGameServer({
configured: startupConfig.gameserver,
injectedGameConfig: resolveInjectedGameConfig(options),
});
const fetcher = local ? options.localFetcher : options.fetcher;
if (!fetcher) throw new ConfigFetchError('本地配置缺少 localFetcher');
let raw: unknown;
try {
raw = await options.fetcher.fetch(gameserver, options.cacheBust);
raw = await fetcher.fetch(gameserver, options.cacheBust);
} catch (error) {
if (error instanceof ConfigFetchError || error instanceof ConfigParseError) throw error;
throw new ConfigFetchError(`远程配置抓取失败: ${gameserver}`);
throw new ConfigFetchError(`${local ? '本地配置读取失败' : '远程配置抓取失败'}: ${gameserver}`);
}
const remoteConfig = createRemoteConfig(raw, identity);
const servers = startupConfig.useLocalServer ? startupConfig.localServers : parseUrlServers(remoteConfig);
@@ -99,7 +106,7 @@ export async function resolveRuntimeConfig(
isDebugger: startupConfig.mode === 'debug',
identity,
servers,
source: 'remote',
source: startupConfig.configSource,
gameserver,
rawConfig: remoteConfig.raw,
remoteConfig,
@@ -0,0 +1,9 @@
{
"ver": "4.0.24",
"importer": "typescript",
"imported": true,
"uuid": "4e90f0c8-b271-40a4-9909-68aa8f7d5974",
"files": [],
"subMetas": {},
"userData": {}
}
@@ -8,8 +8,9 @@ export const DEFAULT_LAUNCH_WAIT_TIME_MS = 10;
* gameid 每子游戏固定写死;agentid/channelid/marketid/version 为默认,运行期由 query/native/profile 覆盖。
*/
export const BUILD_IDENTITY: ChannelIdentity = {
agentid: 'veRa0qrBf0df2K1G4de2tgfmVxB2jxpv',
channelid: 'FtJf073aa0d6rI1xD8J1Y42fINTm0ziK',
// This game's entry in config_test/update_jsonv2.txt belongs to this agent/channel.
agentid: '1B2h0ccl205c390Y28m1Ajdplkuu4wgy',
channelid: 'aouv0LotK0pYyQ0Pdrx0CsdcaezfzrcG',
gameid: 'J9r4022t80pxlb01zOK76DN1WD4QewFl',
marketid: 4,
version: 1, // 数字 versionCode(联调时改成本地服要求的版本号)
@@ -0,0 +1,9 @@
{
"ver": "4.0.24",
"importer": "typescript",
"imported": true,
"uuid": "613b0457-be57-44e3-a1fb-e5d086b69468",
"files": [],
"subMetas": {},
"userData": {}
}
@@ -0,0 +1,9 @@
{
"ver": "4.0.24",
"importer": "typescript",
"imported": true,
"uuid": "4098ba4c-c444-459f-9427-0412f1a15bb6",
"files": [],
"subMetas": {},
"userData": {}
}
@@ -0,0 +1,9 @@
{
"ver": "4.0.24",
"importer": "typescript",
"imported": true,
"uuid": "1a6fd8e5-5d0c-4fbb-a035-ef3a4f90badd",
"files": [],
"subMetas": {},
"userData": {}
}
@@ -0,0 +1,9 @@
{
"ver": "4.0.24",
"importer": "typescript",
"imported": true,
"uuid": "92bf4247-2b4b-460d-8992-8922baf78df2",
"files": [],
"subMetas": {},
"userData": {}
}
@@ -0,0 +1,9 @@
{
"ver": "4.0.24",
"importer": "typescript",
"imported": true,
"uuid": "ac23132b-03ac-47c4-b6f8-93602c94f080",
"files": [],
"subMetas": {},
"userData": {}
}
@@ -0,0 +1,9 @@
{
"ver": "4.0.24",
"importer": "typescript",
"imported": true,
"uuid": "3e0b81db-7986-47f4-9e23-fbc9b47d8a36",
"files": [],
"subMetas": {},
"userData": {}
}
@@ -0,0 +1,9 @@
{
"ver": "4.0.24",
"importer": "typescript",
"imported": true,
"uuid": "9f495e9b-65ae-4b3e-b44c-9c9a91f6679f",
"files": [],
"subMetas": {},
"userData": {}
}
@@ -0,0 +1,9 @@
{
"ver": "4.0.24",
"importer": "typescript",
"imported": true,
"uuid": "4f5169b6-e140-4a3a-9eed-e155fecf24df",
"files": [],
"subMetas": {},
"userData": {}
}
@@ -0,0 +1,9 @@
{
"ver": "4.0.24",
"importer": "typescript",
"imported": true,
"uuid": "3b11f970-2e0d-4784-8d65-c0fcc5e4ac6a",
"files": [],
"subMetas": {},
"userData": {}
}
@@ -0,0 +1,9 @@
{
"ver": "4.0.24",
"importer": "typescript",
"imported": true,
"uuid": "68da9cca-3c8e-400b-ba7e-539b49994ed4",
"files": [],
"subMetas": {},
"userData": {}
}
@@ -0,0 +1,9 @@
{
"ver": "4.0.24",
"importer": "typescript",
"imported": true,
"uuid": "8eb5d9a1-cfd3-4df4-b311-c67cb7db4423",
"files": [],
"subMetas": {},
"userData": {}
}
@@ -0,0 +1,9 @@
{
"ver": "1.2.0",
"importer": "directory",
"imported": true,
"uuid": "717f5c0e-b085-47f8-879c-1b605e4fc773",
"files": [],
"subMetas": {},
"userData": {}
}
@@ -0,0 +1,9 @@
{
"ver": "4.0.24",
"importer": "typescript",
"imported": true,
"uuid": "8650f2a7-9471-4a3e-bec9-0aecf6405cdb",
"files": [],
"subMetas": {},
"userData": {}
}
@@ -0,0 +1,42 @@
import type { RemoteConfig } from '../config/remote-config.ts';
/** Defaults owned here reproduce 04_Data.js and Game_Surface_3 Debugger. */
const LOGIN_DEFAULTS = Object.freeze({ deviceLogin:0, showVisitor:0, qqLogin:0,
avatarUrl:'https://projectimage.tscce.cn/image_132/', avatarRange:[100,10000] as readonly number[],
hiddenVisitor:true });
export interface LoginPolicy {
deviceLogin:boolean; showVisitor:boolean; qqLogin:boolean; hiddenVisitor:boolean;
avatarUrl:string; avatarRange:readonly number[];
}
function flag(value:unknown, name:string):boolean {
if (![0,1,false,true].includes(value as number)) throw Error(`Invalid login config ${name}`);
return Boolean(value);
}
export function resolveLoginPolicy(remote:RemoteConfig):LoginPolicy {
const hallValue=remote.getValue('hall_config');
if (hallValue != null && (typeof hallValue!=='object' || Array.isArray(hallValue))) throw Error('Invalid hall_config');
const hall=hallValue as Record<string,unknown> | null;
// Legacy hall_config merge precedes hallConfigName top-level overrides.
const hallField=(name:'showVisitor'|'qqLogin')=> {
const override=remote.getValue(name);
if(override!=null) return override;
return hall && Object.prototype.hasOwnProperty.call(hall,name)?hall[name]:LOGIN_DEFAULTS[name];
};
const sourceField=(name:'deviceLogin'|'avatarUrl'|'avatarRange')=> {
const value=remote.getValue(name);return value==null?LOGIN_DEFAULTS[name]:value;
};
const avatarUrl=sourceField('avatarUrl'),range=sourceField('avatarRange');
if(typeof avatarUrl!=='string')throw Error('Invalid login config avatarUrl');
if(!Array.isArray(range)||range.length!==2||range.some(v=>!Number.isInteger(v))||range[1]<=range[0])throw Error('Invalid login config avatarRange');
return Object.freeze({deviceLogin:flag(sourceField('deviceLogin'),'deviceLogin'),
showVisitor:flag(hallField('showVisitor'),'showVisitor'),qqLogin:flag(hallField('qqLogin'),'qqLogin'),
hiddenVisitor:LOGIN_DEFAULTS.hiddenVisitor,avatarUrl,avatarRange:Object.freeze([...range])});
}
/** Assignment order is significant: JumpWxAuth applies showVisitor/QQ after cache hiding. */
export function loginButtons(policy:LoginPolicy, versionState:0|1, cached:boolean) {
const account=versionState===0&&cached;
let wechat=!policy.deviceLogin&&!account;
let visitor=!account;
if(versionState===0){visitor=false;if(policy.showVisitor){wechat=false;visitor=true;}}
return {wechat,visitor,phone:policy.deviceLogin&&!account,quick:false,qq:policy.qqLogin,account};
}
@@ -0,0 +1,9 @@
{
"ver": "4.0.24",
"importer": "typescript",
"imported": true,
"uuid": "fe78702a-5e02-4006-844c-15123d950d80",
"files": [],
"subMetas": {},
"userData": {}
}
@@ -0,0 +1,9 @@
{
"ver": "4.0.24",
"importer": "typescript",
"imported": true,
"uuid": "093506bf-570f-47f8-9f4d-0a87d78cba2e",
"files": [],
"subMetas": {},
"userData": {}
}
@@ -0,0 +1,9 @@
{
"ver": "4.0.24",
"importer": "typescript",
"imported": true,
"uuid": "024324ab-1239-4568-9b72-5f957e32ba15",
"files": [],
"subMetas": {},
"userData": {}
}
@@ -0,0 +1,9 @@
{
"ver": "4.0.24",
"importer": "typescript",
"imported": true,
"uuid": "e6f7adfb-42be-43ed-a658-73aac741e2f2",
"files": [],
"subMetas": {},
"userData": {}
}
@@ -0,0 +1,9 @@
{
"ver": "1.2.0",
"importer": "directory",
"imported": true,
"uuid": "65fb20da-5c43-4171-a53a-66ae24890751",
"files": [],
"subMetas": {},
"userData": {}
}
@@ -0,0 +1,9 @@
{
"ver": "4.0.24",
"importer": "typescript",
"imported": true,
"uuid": "0b2dae51-cba0-4d30-95f6-a6ca50bc2f83",
"files": [],
"subMetas": {},
"userData": {}
}
@@ -42,7 +42,7 @@ export interface LoginAccountIdentity {
export type DeviceLoginMode =
| { readonly enabled: false }
| { readonly enabled: true; readonly telphone: string };
| { readonly enabled: true; readonly telphone: string; readonly smmcode?: string };
export type LoginPlayerIdMode =
| { readonly enabled: false }
@@ -112,7 +112,11 @@ export function buildLoginRequest(
const deviceLogin = requireRecord(deviceRecord.deviceLogin, '$.device.deviceLogin');
if (requireBoolean(deviceLogin.enabled, '$.device.deviceLogin.enabled')) {
data.telphone = requireString(deviceLogin.telphone, '$.device.deviceLogin.telphone');
data.telphoneAuto = true;
// Explicit phone verification (sharelogin) differs from cached device login.
if (hasOwn(deviceLogin, 'smmcode')) {
data.smmcode = requireString(deviceLogin.smmcode, '$.device.deviceLogin.smmcode');
data.telphoneAuto = false;
} else data.telphoneAuto = true;
}
const loginPlayerId = requireRecord(deviceRecord.loginPlayerId, '$.device.loginPlayerId');
@@ -0,0 +1,9 @@
{
"ver": "4.0.24",
"importer": "typescript",
"imported": true,
"uuid": "e473d40d-15cb-4ba0-a9dd-2aee7db34288",
"files": [],
"subMetas": {},
"userData": {}
}
@@ -0,0 +1,9 @@
{
"ver": "4.0.24",
"importer": "typescript",
"imported": true,
"uuid": "c39d248f-79e2-4e7e-935c-8640d7ba2c1d",
"files": [],
"subMetas": {},
"userData": {}
}
@@ -0,0 +1,9 @@
{
"ver": "4.0.24",
"importer": "typescript",
"imported": true,
"uuid": "464618de-1031-4d9d-b47a-5abfc3884b2a",
"files": [],
"subMetas": {},
"userData": {}
}
@@ -0,0 +1,9 @@
{
"ver": "4.0.24",
"importer": "typescript",
"imported": true,
"uuid": "396594e0-d025-4f59-8f09-55f5563149fc",
"files": [],
"subMetas": {},
"userData": {}
}
@@ -0,0 +1,9 @@
{
"ver": "4.0.24",
"importer": "typescript",
"imported": true,
"uuid": "bc28a4de-e56a-4ff3-9793-4a358b7f40e1",
"files": [],
"subMetas": {},
"userData": {}
}
@@ -0,0 +1,9 @@
{
"ver": "1.2.0",
"importer": "directory",
"imported": true,
"uuid": "d8033485-9f99-48f1-8c69-80173036f33c",
"files": [],
"subMetas": {},
"userData": {}
}
@@ -0,0 +1,9 @@
{
"ver": "4.0.24",
"importer": "typescript",
"imported": true,
"uuid": "7e0c41b9-1036-46cd-9401-98c4ae86794e",
"files": [],
"subMetas": {},
"userData": {}
}
@@ -0,0 +1,9 @@
{
"ver": "4.0.24",
"importer": "typescript",
"imported": true,
"uuid": "f657f863-7e72-4697-827c-11240096d8be",
"files": [],
"subMetas": {},
"userData": {}
}
@@ -0,0 +1,9 @@
{
"ver": "4.0.24",
"importer": "typescript",
"imported": true,
"uuid": "3ad6eade-cc0c-4971-bdfb-453f0016df2c",
"files": [],
"subMetas": {},
"userData": {}
}
@@ -0,0 +1,9 @@
{
"ver": "4.0.24",
"importer": "typescript",
"imported": true,
"uuid": "bd3872ba-100e-4b2a-838f-2098366df9fb",
"files": [],
"subMetas": {},
"userData": {}
}
@@ -0,0 +1,9 @@
{
"ver": "4.0.24",
"importer": "typescript",
"imported": true,
"uuid": "03a2c16b-b059-4ef9-8c26-3fe3a9761720",
"files": [],
"subMetas": {},
"userData": {}
}
@@ -0,0 +1,9 @@
{
"ver": "4.0.24",
"importer": "typescript",
"imported": true,
"uuid": "a61c62b7-e973-4fb6-97be-69db3ed6fd90",
"files": [],
"subMetas": {},
"userData": {}
}
@@ -0,0 +1,9 @@
{
"ver": "4.0.24",
"importer": "typescript",
"imported": true,
"uuid": "5e7d1166-152b-4697-a882-032da5c60f10",
"files": [],
"subMetas": {},
"userData": {}
}
@@ -0,0 +1,9 @@
{
"ver": "1.2.0",
"importer": "directory",
"imported": true,
"uuid": "f6eae679-99d7-45f3-b301-319b961625f1",
"files": [],
"subMetas": {},
"userData": {}
}
@@ -0,0 +1,9 @@
{
"ver": "4.0.24",
"importer": "typescript",
"imported": true,
"uuid": "650981bd-d942-4bb9-8e68-3efb07dda4dd",
"files": [],
"subMetas": {},
"userData": {}
}
@@ -0,0 +1,9 @@
{
"ver": "1.2.0",
"importer": "directory",
"imported": true,
"uuid": "f1d3ef88-5577-4be2-853b-27900231ff29",
"files": [],
"subMetas": {},
"userData": {}
}
@@ -0,0 +1,9 @@
{
"ver": "4.0.24",
"importer": "typescript",
"imported": true,
"uuid": "754c5d58-de20-4a2d-9a62-406126c1cf93",
"files": [],
"subMetas": {},
"userData": {}
}
@@ -0,0 +1,9 @@
{
"ver": "1.2.0",
"importer": "directory",
"imported": true,
"uuid": "2ade8276-e1d3-46ca-9c77-46b3c5f71413",
"files": [],
"subMetas": {},
"userData": {}
}
@@ -0,0 +1,86 @@
[
{
"__type__": "cc.AnimationClip",
"_name": "LoginLoading",
"_objFlags": 0,
"__editorExtras__": {},
"_native": "",
"sample": 3,
"speed": 1,
"wrapMode": 2,
"enableTrsBlending": false,
"_duration": 1,
"_hash": 0,
"_tracks": [
{
"__id__": 1
}
],
"_exoticAnimation": null,
"_events": [],
"_embeddedPlayers": [],
"_additiveSettings": {
"__id__": 6
},
"_auxiliaryCurveEntries": []
},
{
"__type__": "cc.animation.ObjectTrack",
"_binding": {
"__type__": "cc.animation.TrackBinding",
"path": {
"__id__": 2
},
"proxy": null
},
"_channel": {
"__id__": 4
}
},
{
"__type__": "cc.animation.TrackPath",
"_paths": [
{
"__id__": 3
},
"spriteFrame"
]
},
{
"__type__": "cc.animation.ComponentPath",
"component": "cc.Sprite"
},
{
"__type__": "cc.animation.Channel",
"_curve": {
"__id__": 5
}
},
{
"__type__": "cc.ObjectCurve",
"_times": [
0,
0.3333333333333333,
0.6666666666666666
],
"_values": [
{
"__uuid__": "41c0f42d-631a-4a3f-abf1-a36ed787e563@f9941",
"__expectedType__": "cc.SpriteFrame"
},
{
"__uuid__": "bb80821b-0b3f-460e-a74a-1b1a7eaad560@f9941",
"__expectedType__": "cc.SpriteFrame"
},
{
"__uuid__": "b39af9d6-4d70-43ca-a312-f993de9f961c@f9941",
"__expectedType__": "cc.SpriteFrame"
}
]
},
{
"__type__": "cc.AnimationClipAdditiveSettings",
"enabled": false,
"refClip": null
}
]
@@ -0,0 +1,13 @@
{
"ver": "2.0.4",
"importer": "animation-clip",
"imported": true,
"uuid": "d7f4b280-dc40-47c7-bfe5-9421350459fe",
"files": [
".bin"
],
"subMetas": {},
"userData": {
"name": "LoginLoading"
}
}
File diff suppressed because it is too large Load Diff
@@ -25,14 +25,14 @@
"_active": true,
"_components": [
{
"__id__": 40
"__id__": 50
},
{
"__id__": 42
"__id__": 52
}
],
"_prefab": {
"__id__": 44
"__id__": 54
},
"_lpos": {
"__type__": "cc.Vec3",
@@ -61,7 +61,7 @@
"y": 0,
"z": 0
},
"_id": "acrZGZbf1NerIwhXMce5C9"
"_id": ""
},
{
"__type__": "cc.Node",
@@ -79,23 +79,23 @@
"__id__": 11
},
{
"__id__": 19
},
{
"__id__": 27
}
],
"_active": true,
"_components": [
{
"__id__": 35
"__id__": 21
},
{
"__id__": 37
}
],
"_active": true,
"_components": [
{
"__id__": 45
},
{
"__id__": 47
}
],
"_prefab": {
"__id__": 39
"__id__": 49
},
"_lpos": {
"__type__": "cc.Vec3",
@@ -124,7 +124,7 @@
"y": 0,
"z": 0
},
"_id": "e6VeYSc7NPirZdAaN4p44e"
"_id": ""
},
{
"__type__": "cc.Node",
@@ -177,7 +177,7 @@
"y": 0,
"z": 0
},
"_id": "f1pHSoD4dILLRVFTIObRtT"
"_id": ""
},
{
"__type__": "cc.UITransform",
@@ -201,7 +201,7 @@
"x": 0.5,
"y": 0.5
},
"_id": "a9XLkwiTVFH68tpCqSosju"
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
@@ -246,7 +246,7 @@
"_isTrimmedMode": true,
"_useGrayscale": false,
"_atlas": null,
"_id": "15y0dNzphPKaTgoMZ3YkkU"
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
@@ -282,7 +282,7 @@
"_originalHeight": 0,
"_alignMode": 2,
"_lockFlags": 0,
"_id": "8b8p/boZJEqocxUC1G22sv"
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
@@ -320,10 +320,13 @@
},
{
"__id__": 16
},
{
"__id__": 18
}
],
"_prefab": {
"__id__": 18
"__id__": 20
},
"_lpos": {
"__type__": "cc.Vec3",
@@ -352,7 +355,7 @@
"y": 0,
"z": 0
},
"_id": "03KAkUqStGDaHp3GFOQbYR"
"_id": ""
},
{
"__type__": "cc.UITransform",
@@ -376,7 +379,7 @@
"x": 0.5,
"y": 0.5
},
"_id": "feVdaeICBA07uZAmLtAU07"
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
@@ -421,7 +424,7 @@
"_isTrimmedMode": true,
"_useGrayscale": false,
"_atlas": null,
"_id": "b6GW+6L8VHILl5D4tnXajn"
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
@@ -457,12 +460,30 @@
"_originalHeight": 0,
"_alignMode": 2,
"_lockFlags": 0,
"_id": "5dO4+lWM1I74eFWhnD+bgo"
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "MW2xRLaeE9itOcgHj0p+dQ"
},
{
"__type__": "cc.BlockInputEvents",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 11
},
"_enabled": true,
"__prefab": {
"__id__": 19
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "4fv3LfgR5DPIoVUfROUOzr"
},
{
"__type__": "cc.PrefabInfo",
"root": {
@@ -478,32 +499,39 @@
},
{
"__type__": "cc.Node",
"_name": "协议内容",
"_name": "协议滚动",
"_objFlags": 0,
"__editorExtras__": {},
"_parent": {
"__id__": 2
},
"_children": [],
"_children": [
{
"__id__": 22
}
],
"_active": true,
"_components": [
{
"__id__": 20
"__id__": 28
},
{
"__id__": 22
"__id__": 30
},
{
"__id__": 24
"__id__": 32
},
{
"__id__": 34
}
],
"_prefab": {
"__id__": 26
"__id__": 36
},
"_lpos": {
"__type__": "cc.Vec3",
"x": -5.5,
"y": -208.5,
"y": -5,
"z": 0
},
"_lrot": {
@@ -527,7 +555,57 @@
"y": 0,
"z": 0
},
"_id": "fcOwSwvSpMlaZQPDjbA1f7"
"_id": ""
},
{
"__type__": "cc.Node",
"_name": "协议内容",
"_objFlags": 0,
"__editorExtras__": {},
"_parent": {
"__id__": 21
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 23
},
{
"__id__": 25
}
],
"_prefab": {
"__id__": 27
},
"_lpos": {
"__type__": "cc.Vec3",
"x": 0,
"y": -203.5,
"z": 0
},
"_lrot": {
"__type__": "cc.Quat",
"x": 0,
"y": 0,
"z": 0,
"w": 1
},
"_lscale": {
"__type__": "cc.Vec3",
"x": 1,
"y": 1,
"z": 1
},
"_mobility": 0,
"_layer": 33554432,
"_euler": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_id": ""
},
{
"__type__": "cc.UITransform",
@@ -535,11 +613,11 @@
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 19
"__id__": 22
},
"_enabled": true,
"__prefab": {
"__id__": 21
"__id__": 24
},
"_contentSize": {
"__type__": "cc.Size",
@@ -551,7 +629,7 @@
"x": 0.5,
"y": 0.5
},
"_id": "e4LJQjJ6FE6LjQy5yIP382"
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
@@ -563,11 +641,11 @@
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 19
"__id__": 22
},
"_enabled": true,
"__prefab": {
"__id__": 23
"__id__": 26
},
"_customMaterial": null,
"_srcBlendFactor": 2,
@@ -596,48 +674,12 @@
"_isTrimmedMode": true,
"_useGrayscale": false,
"_atlas": null,
"_id": "bfkfehGNlIxp/fTJn+oOTB"
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "1jOdeOrfg2vu2QJl+s+VeA"
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 19
},
"_enabled": true,
"__prefab": {
"__id__": 25
},
"_alignFlags": 16,
"_target": null,
"_left": 0,
"_right": 0,
"_top": 0,
"_bottom": 0,
"_horizontalCenter": -5.5,
"_verticalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 0,
"_originalHeight": 0,
"_alignMode": 2,
"_lockFlags": 0,
"_id": "32AaRKNa5IUaPeF5jIfKTl"
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "D1Qfc6QTWy0vKDGsx+qLQg"
},
{
"__type__": "cc.PrefabInfo",
"root": {
@@ -651,6 +693,146 @@
"targetOverrides": null,
"nestedPrefabInstanceRoots": null
},
{
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 21
},
"_enabled": true,
"__prefab": {
"__id__": 29
},
"_contentSize": {
"__type__": "cc.Size",
"width": 729,
"height": 590
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "0bFbdo0btAnLpeg5XLVeih"
},
{
"__type__": "cc.Mask",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 21
},
"_enabled": true,
"__prefab": {
"__id__": 31
},
"_type": 0,
"_inverted": false,
"_segments": 64,
"_alphaThreshold": 0.1,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "8bWDB4GxZEjZGyBHlWT8Ry"
},
{
"__type__": "cc.Graphics",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 21
},
"_enabled": true,
"__prefab": {
"__id__": 33
},
"_customMaterial": null,
"_srcBlendFactor": 2,
"_dstBlendFactor": 4,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_lineWidth": 1,
"_strokeColor": {
"__type__": "cc.Color",
"r": 0,
"g": 0,
"b": 0,
"a": 255
},
"_lineJoin": 2,
"_lineCap": 0,
"_fillColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 0
},
"_miterLimit": 10,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "d5mkJTZEZFOru7Ifoe3YX/"
},
{
"__type__": "cc.ScrollView",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 21
},
"_enabled": true,
"__prefab": {
"__id__": 35
},
"bounceDuration": 1,
"brake": 0.5,
"elastic": true,
"inertia": true,
"horizontal": false,
"vertical": true,
"cancelInnerEvents": true,
"scrollEvents": [],
"_content": {
"__id__": 22
},
"_horizontalScrollBar": null,
"_verticalScrollBar": null,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "cfxheTMxVE45LJ6nYtvr4t"
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "edhlQTi55MNo1ZWcRw9+qA",
"instance": null,
"targetOverrides": null,
"nestedPrefabInstanceRoots": null
},
{
"__type__": "cc.Node",
"_name": "Spirit253",
@@ -663,17 +845,17 @@
"_active": true,
"_components": [
{
"__id__": 28
"__id__": 38
},
{
"__id__": 30
"__id__": 40
},
{
"__id__": 32
"__id__": 42
}
],
"_prefab": {
"__id__": 34
"__id__": 44
},
"_lpos": {
"__type__": "cc.Vec3",
@@ -702,7 +884,7 @@
"y": 0,
"z": 0
},
"_id": "770rm+dOJPVJdLQnhaoDaZ"
"_id": ""
},
{
"__type__": "cc.UITransform",
@@ -710,11 +892,11 @@
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 27
"__id__": 37
},
"_enabled": true,
"__prefab": {
"__id__": 29
"__id__": 39
},
"_contentSize": {
"__type__": "cc.Size",
@@ -726,7 +908,7 @@
"x": 0.5,
"y": 0.5
},
"_id": "02BeJasixOrpU3LpuhrkT+"
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
@@ -738,11 +920,11 @@
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 27
"__id__": 37
},
"_enabled": true,
"__prefab": {
"__id__": 31
"__id__": 41
},
"_customMaterial": null,
"_srcBlendFactor": 2,
@@ -771,7 +953,7 @@
"_isTrimmedMode": true,
"_useGrayscale": false,
"_atlas": null,
"_id": "f372YRc0pCR5LhJkRDp5mj"
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
@@ -783,11 +965,11 @@
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 27
"__id__": 37
},
"_enabled": true,
"__prefab": {
"__id__": 33
"__id__": 43
},
"_alignFlags": 16,
"_target": null,
@@ -807,7 +989,7 @@
"_originalHeight": 0,
"_alignMode": 2,
"_lockFlags": 0,
"_id": "46JhwhkSdK0KV8Lt3p+HOy"
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
@@ -836,7 +1018,7 @@
},
"_enabled": true,
"__prefab": {
"__id__": 36
"__id__": 46
},
"_contentSize": {
"__type__": "cc.Size",
@@ -848,7 +1030,7 @@
"x": 0.5,
"y": 0.5
},
"_id": "07nq/yMyxNHq4xU2y77PJH"
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
@@ -864,7 +1046,7 @@
},
"_enabled": true,
"__prefab": {
"__id__": 38
"__id__": 48
},
"_alignFlags": 45,
"_target": null,
@@ -884,7 +1066,7 @@
"_originalHeight": 0,
"_alignMode": 2,
"_lockFlags": 0,
"_id": "fdaBoOjw5KN4+Xi8tr/T8R"
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
@@ -913,7 +1095,7 @@
},
"_enabled": true,
"__prefab": {
"__id__": 41
"__id__": 51
},
"_contentSize": {
"__type__": "cc.Size",
@@ -925,7 +1107,7 @@
"x": 0.5,
"y": 0.5
},
"_id": "52OXNuOopHTL574Hc5gszK"
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
@@ -941,7 +1123,7 @@
},
"_enabled": true,
"__prefab": {
"__id__": 43
"__id__": 53
},
"_alignFlags": 45,
"_target": null,
@@ -961,7 +1143,7 @@
"_originalHeight": 0,
"_alignMode": 2,
"_lockFlags": 0,
"_id": "73lGoAY61JlYZxdhx3MnbQ"
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
@@ -977,7 +1159,6 @@
},
"fileId": "xSY2ymJa1y54ctanvQH+WQ",
"instance": null,
"targetOverrides": null,
"nestedPrefabInstanceRoots": null
"targetOverrides": null
}
]
]
@@ -76,9 +76,6 @@
},
{
"__id__": 29
},
{
"__id__": 37
}
],
"_active": true,
@@ -687,21 +684,25 @@
"_parent": {
"__id__": 2
},
"_children": [],
"_children": [
{
"__id__": 30
}
],
"_active": true,
"_components": [
{
"__id__": 30
"__id__": 38
},
{
"__id__": 32
"__id__": 40
},
{
"__id__": 34
"__id__": 42
}
],
"_prefab": {
"__id__": 36
"__id__": 44
},
"_lpos": {
"__type__": "cc.Vec3",
@@ -732,156 +733,34 @@
},
"_id": ""
},
{
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 29
},
"_enabled": true,
"__prefab": {
"__id__": 31
},
"_contentSize": {
"__type__": "cc.Size",
"width": 208,
"height": 59
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "t4s+2kLm2F//czXxT9Xo8A"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 29
},
"_enabled": true,
"__prefab": {
"__id__": 33
},
"_customMaterial": null,
"_srcBlendFactor": 2,
"_dstBlendFactor": 4,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_spriteFrame": {
"__uuid__": "d313aa40-9397-4b44-8100-65ea389233f3@f9941",
"__expectedType__": "cc.SpriteFrame"
},
"_type": 0,
"_fillType": 0,
"_sizeMode": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_useGrayscale": false,
"_atlas": null,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "/rrApudp/UA/nOAEHDamNA"
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 29
},
"_enabled": true,
"__prefab": {
"__id__": 35
},
"_alignFlags": 16,
"_target": null,
"_left": 0,
"_right": 0,
"_top": 0,
"_bottom": 0,
"_horizontalCenter": 671.37,
"_verticalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 0,
"_originalHeight": 0,
"_alignMode": 2,
"_lockFlags": 0,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "v+C5/D9J96sTVhcAhSrUng"
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "QQkO56LzjjkpTd+xNv6zcA",
"instance": null,
"targetOverrides": null,
"nestedPrefabInstanceRoots": null
},
{
"__type__": "cc.Node",
"_name": "Spirit3104",
"_objFlags": 0,
"__editorExtras__": {},
"_parent": {
"__id__": 2
"__id__": 29
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 38
"__id__": 31
},
{
"__id__": 40
"__id__": 33
},
{
"__id__": 42
"__id__": 35
}
],
"_prefab": {
"__id__": 44
"__id__": 37
},
"_lpos": {
"__type__": "cc.Vec3",
"x": 671.87,
"y": 311.5,
"x": 0,
"y": 0,
"z": 0
},
"_lrot": {
@@ -913,16 +792,16 @@
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 37
"__id__": 30
},
"_enabled": true,
"__prefab": {
"__id__": 39
"__id__": 32
},
"_contentSize": {
"__type__": "cc.Size",
"width": 63.005419342885375,
"height": 17.64
"width": 81.03130596899703,
"height": 22.680000000000003
},
"_anchorPoint": {
"__type__": "cc.Vec2",
@@ -941,11 +820,11 @@
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 37
"__id__": 30
},
"_enabled": true,
"__prefab": {
"__id__": 41
"__id__": 34
},
"_customMaterial": null,
"_srcBlendFactor": 2,
@@ -960,10 +839,10 @@
"_string": "Spirit3104",
"_horizontalAlign": 1,
"_verticalAlign": 1,
"_actualFontSize": 14.758333333333333,
"_fontSize": 14,
"_actualFontSize": 18.975,
"_fontSize": 18,
"_fontFamily": "Arial",
"_lineHeight": 14,
"_lineHeight": 18,
"_overflow": 0,
"_enableWrapText": true,
"_font": null,
@@ -1009,19 +888,19 @@
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 37
"__id__": 30
},
"_enabled": true,
"__prefab": {
"__id__": 43
"__id__": 36
},
"_alignFlags": 16,
"_alignFlags": 18,
"_target": null,
"_left": 0,
"_right": 0,
"_top": 0,
"_bottom": 0,
"_horizontalCenter": 671.87,
"_left": 63.484347015501484,
"_right": 63.484347015501484,
"_top": 18.159999999999997,
"_bottom": 18.159999999999997,
"_horizontalCenter": 0,
"_verticalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
@@ -1029,8 +908,8 @@
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 0,
"_originalHeight": 0,
"_originalWidth": 81.03130596899703,
"_originalHeight": 22.680000000000003,
"_alignMode": 2,
"_lockFlags": 0,
"_id": ""
@@ -1052,6 +931,128 @@
"targetOverrides": null,
"nestedPrefabInstanceRoots": null
},
{
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 29
},
"_enabled": true,
"__prefab": {
"__id__": 39
},
"_contentSize": {
"__type__": "cc.Size",
"width": 208,
"height": 59
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "t4s+2kLm2F//czXxT9Xo8A"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 29
},
"_enabled": true,
"__prefab": {
"__id__": 41
},
"_customMaterial": null,
"_srcBlendFactor": 2,
"_dstBlendFactor": 4,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_spriteFrame": {
"__uuid__": "d313aa40-9397-4b44-8100-65ea389233f3@f9941",
"__expectedType__": "cc.SpriteFrame"
},
"_type": 0,
"_fillType": 0,
"_sizeMode": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_useGrayscale": false,
"_atlas": null,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "/rrApudp/UA/nOAEHDamNA"
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 29
},
"_enabled": true,
"__prefab": {
"__id__": 43
},
"_alignFlags": 16,
"_target": null,
"_left": 0,
"_right": 0,
"_top": 0,
"_bottom": 0,
"_horizontalCenter": 671.37,
"_verticalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 0,
"_originalHeight": 0,
"_alignMode": 2,
"_lockFlags": 0,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "v+C5/D9J96sTVhcAhSrUng"
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "QQkO56LzjjkpTd+xNv6zcA",
"instance": null,
"targetOverrides": null,
"nestedPrefabInstanceRoots": null
},
{
"__type__": "cc.UITransform",
"_name": "",