模板更新,增加分享

This commit is contained in:
YZ\249929363 2024-07-10 18:20:03 +08:00
parent 0dcdfc9136
commit 0444e975d9
61 changed files with 16666 additions and 3060 deletions

View File

@ -15,8 +15,8 @@ export default class NewClass extends cc.Component {
start () { start () {
window.initMgr(); window.initMgr();
cc.fx.GameConfig.init(this.localTest); cc.fx.GameConfig.init(true);
cc.fx.AudioManager.Instance.init(); // cc.fx.AudioManager.Instance.init();
this.testVersion.string = this.clientTestVersion; this.testVersion.string = this.clientTestVersion;
} }

File diff suppressed because it is too large Load Diff

View File

@ -2,14 +2,20 @@
const {ccclass, property} = cc._decorator; const {ccclass, property} = cc._decorator;
import CryptoJS = require('./crypto-js.min.js'); //引用AES源码js import CryptoJS = require('./crypto-js.min.js'); //引用AES源码js
const BASE_URL = "http://api.sparkus.cn"; const BASE_URL = "https://api.sparkus.cn";
//只负责网络接口 次类只负责和后端交互,不负责处理数据 数据处理在GameTool //只负责网络接口 次类只负责和后端交互,不负责处理数据 数据处理在GameTool
@ccclass @ccclass
export default class HttpUtil extends cc.Component { export default class HttpUtil extends cc.Component {
static async getShareInfo(shareUrl: string): Promise<any> {
console.log("设置分享链接:",shareUrl);
const time = Math.floor((new Date().getTime()) / 1000)
const url = HttpUtil.apiSign(`/api/share/cfg?gameId=${config.gameId}&time=${time}&url=${shareUrl}`,{})
return this.post(url,null,null);
}
//排行榜 //排行榜
static async rankData(type,callback,data): Promise<any> { static async rankData(type,callback,data): Promise<any> {
const time = Math.floor((new Date().getTime()) / 1000) const time = Math.floor((new Date().getTime()) / 1000)
const url = apiSign(`/api/get/rank/data?gameId=${config.gameId}&dataType=${type}&time=${time}`, data) const url = HttpUtil.apiSign(`/api/get/rank/data?gameId=${config.gameId}&dataType=${type}&time=${time}`, data)
this.post(url,data,callback); this.post(url,data,callback);
} }
@ -20,7 +26,7 @@ export default class HttpUtil extends cc.Component {
//暂时用不到 //暂时用不到
static async getUserRecord(data,callback): Promise<any> { static async getUserRecord(data,callback): Promise<any> {
const time = Math.floor((new Date().getTime()) / 1000) const time = Math.floor((new Date().getTime()) / 1000)
const url = apiSign(`/api/get/user/data?gameId=${config.gameId}&time=${time}`, data) const url = HttpUtil.apiSign(`/api/get/user/data?gameId=${config.gameId}&time=${time}`, data)
this.post(url,data,callback); this.post(url,data,callback);
} }
static async post(url, data, callback) { static async post(url, data, callback) {
@ -53,6 +59,30 @@ export default class HttpUtil extends cc.Component {
return null; return null;
} }
} }
/**
*
* @param url {string}
* @param params {object}
*/
static apiSign(url: string, params = {}) {
let convertUrl = url.trim()
if (convertUrl.indexOf('?') === -1) {
convertUrl += '?'
}
// 传入参数转换拼接字符串
let postStr = getQueryString(params)
const signedStr = genSignStr(convertUrl, postStr)
const encryptStr = `sign=${signedStr}`
let encryptSignStr = fxCry.encryptByDES(encryptStr, config.secretKey)
encryptSignStr = encodeURIComponent(encryptSignStr)
return `${urlencode(convertUrl)}&_p=${encryptSignStr}`
}
} }
function responseHandler(response: { data: any }) { function responseHandler(response: { data: any }) {
@ -61,8 +91,8 @@ function responseHandler(response: { data: any }) {
// 响应拦截器 // 响应拦截器
// Rq.interceptors.response.use(responseHandler) // Rq.interceptors.response.use(responseHandler)
const config = { const config = {
gameId: "100009", gameId: "100010",
secretKey: "CMNhOzBA", secretKey: "wozrGKsL",
EK:"hui231%1" EK:"hui231%1"
}; };
@ -195,27 +225,5 @@ function urlencode(url: string): string {
return `${baseUrl}?${params.toString()}`; return `${baseUrl}?${params.toString()}`;
} }
/**
*
* @param url {string}
* @param params {object}
*/
function apiSign(url: string, params = {}) {
let convertUrl = url.trim()
if (convertUrl.indexOf('?') === -1) {
convertUrl += '?'
}
// 传入参数转换拼接字符串
let postStr = getQueryString(params)
const signedStr = genSignStr(convertUrl, postStr)
const encryptStr = `sign=${signedStr}`
let encryptSignStr = fxCry.encryptByDES(encryptStr, config.secretKey)
encryptSignStr = encodeURIComponent(encryptSignStr)
return `${urlencode(convertUrl)}&_p=${encryptSignStr}`
}

View File

@ -1,17 +1,19 @@
import { GameConfig } from "../Config/GameConfig"; import { GameConfig } from "../Config/GameConfig";
import HttpUtil from "../Crypto/HttpUtil"; import HttpUtil from "../Crypto/HttpUtil";
import { AudioManager } from "../Music/AudioManager"; import AudioManager from "../Music/AudioManager";
import { Notifications } from "../Notification/Notification"; import { Notifications } from "../Notification/Notification";
import { StorageMessage } from "../Storage/Storage"; import { StorageMessage } from "../Storage/Storage";
import { GameTool } from "../Tool/GameTool"; import { GameTool } from "../Tool/GameTool";
window.initMgr = function() { window.initMgr = function() {
if(cc.fx) if(cc.fx)
{ {
return; return;
} }
cc.fx = {}; cc.fx = {};
console.log("初始化"); console.log("1初始化");
//基础状态信息 //基础状态信息
cc.fx.StateInfo = { cc.fx.StateInfo = {
debugMode: true, debugMode: true,
@ -22,6 +24,7 @@ window.initMgr = function() {
//应用系统信息 //应用系统信息
//配置文件 //配置文件
cc.fx.GameConfig = GameConfig; cc.fx.GameConfig = GameConfig;
cc.fx.HttpUtil = HttpUtil; cc.fx.HttpUtil = HttpUtil;
cc.fx.GameTool = GameTool; cc.fx.GameTool = GameTool;
@ -71,31 +74,46 @@ window.initMgr = function() {
All : "all", //不区分 All : "all", //不区分
}; };
//用于存储消息的ID
cc.fx.storageType = cc.Enum({
storageTypeCustom: 1000101, //用于存储关卡等级
});
//用于存储提示语 按照步骤提示
cc.fx.tipType = cc.Enum({
tipOne: '神农氏回到家中,开始整理今天收集来的物品。当他第一次拿出或说出一种植物时,请告诉他这是新植物。',
tipTwo: '如果他拿出或说出的植物你今天看到过,请告诉他上次是看到的;如果你听他说过,则请告诉他上次是听到的。', //用于存储关卡等级
tipErrNew: '这是这局游戏第一次出现{植物}',
tipErrOld: '{植物}刚才出现过呢',
tipErrHear: '上次遇到{植物}时,似乎不是听到的吧',
tipErrSee: '上次遇到{植物}时,似乎不是看到的吧',
tipErrLast: '之前确实看到过{植物},但最近一次似乎不是看到的呢',
});
//暂时不用 //暂时不用
cc.fx.clickStatEventType = { // cc.fx.clickStatEventType = {
clickStatEventTypeVideoAD : 20173201,//视频播放完成 // clickStatEventTypeVideoAD : 20173201,//视频播放完成
clickStatEventTypeClickAdVideo : 20173202,//视频播放为完成 // clickStatEventTypeClickAdVideo : 20173202,//视频播放为完成
clickStatEventTypeBannerAD : 20173203,//banner播放为完成 // clickStatEventTypeBannerAD : 20173203,//banner播放为完成
clickStatEventTypeUserFrom : 99990001,//用户来源 // clickStatEventTypeUserFrom : 99990001,//用户来源
clickStatEventTypeShare : 99990002,//用户分享 // clickStatEventTypeShare : 99990002,//用户分享
clickStatEventTypeClickAdBtn : 99990007,//点击分流icon // clickStatEventTypeClickAdBtn : 99990007,//点击分流icon
clickStatEventTypeBannerAD2 : 67890033, // banner广告干预 // clickStatEventTypeBannerAD2 : 67890033, // banner广告干预
clickStatEventTypeSubmitVersionInfo : 9999, //上报微信版本及基础库信息 // clickStatEventTypeSubmitVersionInfo : 9999, //上报微信版本及基础库信息
clickStatEventTypeClickFirstAd : 99990003, //分流icon显示 // clickStatEventTypeClickFirstAd : 99990003, //分流icon显示
clickStatEventTypeClickSecondAd : 99990004, //玩家点击分流按钮 // clickStatEventTypeClickSecondAd : 99990004, //玩家点击分流按钮
clickStatEventTypeWxLoginStart : 10001,//微信登录开始 // clickStatEventTypeWxLoginStart : 10001,//微信登录开始
clickStatEventTypeWxLoginSuccess : 10002,//微信登录成功 // clickStatEventTypeWxLoginSuccess : 10002,//微信登录成功
clickStatEventTypeWxLoginFailed : 10003,//微信登录失败 // clickStatEventTypeWxLoginFailed : 10003,//微信登录失败
clickStatEventTypeAuthorizationStart : 10003,//授权开始 // clickStatEventTypeAuthorizationStart : 10003,//授权开始
clickStatEventTypeAuthorizationSuccess : 10004,//授权成功 // clickStatEventTypeAuthorizationSuccess : 10004,//授权成功
clickStatEventTypeAuthorizationFailed : 10005,//授权失败 // clickStatEventTypeAuthorizationFailed : 10005,//授权失败
clickStatEventTypeLoginSDKStart : 10007,//登录SDK开始 // clickStatEventTypeLoginSDKStart : 10007,//登录SDK开始
clickStatEventTypeLoginSDKSuccess : 10008,//登录SDK成功 // clickStatEventTypeLoginSDKSuccess : 10008,//登录SDK成功
clickStatEventTypeLoginSDKFailed : 10009,//登录SDK时失败 // clickStatEventTypeLoginSDKFailed : 10009,//登录SDK时失败
clickStatEventTypeTCP_Start : 10009,//TCP连接开始 // clickStatEventTypeTCP_Start : 10009,//TCP连接开始
clickStatEventTypeTCP_Success : 10010,//TCP连接成功 // clickStatEventTypeTCP_Success : 10010,//TCP连接成功
clickStatEventTypeTCP_Failed : 10011,//TCP连接失败 // clickStatEventTypeTCP_Failed : 10011,//TCP连接失败
}; // };
}; };

View File

@ -1,23 +1,64 @@
const { ccclass, property } = cc._decorator; const {ccclass, property} = cc._decorator;
@ccclass('AudioManager') @ccclass
export class AudioManager { export default class AudioManager extends cc.Component {
static _instance: any;
private static _instance : AudioManager = null;
//背景音乐 //背景音乐
@property(cc.AudioClip) @property(cc.AudioClip)
audioGameBgm0: cc.AudioClip = null; audioGameBgm0: cc.AudioClip = null;
//跳跃
@property(cc.AudioClip) @property(cc.AudioClip)
audioButtonClick: cc.AudioClip = null; baishao_audio: cc.AudioClip = null;
//落地上
@property(cc.AudioClip) @property(cc.AudioClip)
audioWarning: cc.AudioClip = null; cha_audio: cc.AudioClip = null;
//碰撞
@property(cc.AudioClip) @property(cc.AudioClip)
audioWin: cc.AudioClip = null; chixiaodou_audio: cc.AudioClip = null;
//落方块上 @property(cc.AudioClip)
danggui_audio: cc.AudioClip = null;
@property(cc.AudioClip)
danshen_audio: cc.AudioClip = null;
@property(cc.AudioClip)
dazao_audio: cc.AudioClip = null;
@property(cc.AudioClip)
gancao_audio: cc.AudioClip = null;
@property(cc.AudioClip)
ganjiang_audio: cc.AudioClip = null;
@property(cc.AudioClip)
gouqi_audio: cc.AudioClip = null;
@property(cc.AudioClip)
jingjie_audio: cc.AudioClip = null;
@property(cc.AudioClip)
jinju_audio: cc.AudioClip = null;
@property(cc.AudioClip)
lizhi_audio: cc.AudioClip = null;
@property(cc.AudioClip)
lizi_audio: cc.AudioClip = null;
@property(cc.AudioClip)
longyan_audio: cc.AudioClip = null;
@property(cc.AudioClip)
moli_audio: cc.AudioClip = null;
@property(cc.AudioClip)
muchai_audio: cc.AudioClip = null;
@property(cc.AudioClip)
mudan_audio: cc.AudioClip = null;
@property(cc.AudioClip)
mulan_audio: cc.AudioClip = null;
@property(cc.AudioClip)
pugongying_audio: cc.AudioClip = null;
@property(cc.AudioClip)
putao_audio: cc.AudioClip = null;
@property(cc.AudioClip)
renshen_audio: cc.AudioClip = null;
@property(cc.AudioClip)
taozi_audio: cc.AudioClip = null;
@property(cc.AudioClip)
zhuye_audio: cc.AudioClip = null;
@property(cc.AudioClip)
err: cc.AudioClip = null;
@property(cc.AudioClip)
yes: cc.AudioClip = null;
mAudioMap: {}; mAudioMap: {};
bgMusicVolume: number; bgMusicVolume: number;
@ -30,8 +71,20 @@ export class AudioManager {
rewardCount: number; rewardCount: number;
mMusicKey: any; mMusicKey: any;
static playWarning() { onLoad() {
throw new Error('Method not implemented.'); if (AudioManager._instance == null) {
AudioManager._instance = this;
cc.game.addPersistRootNode(this.node);
}
else {
return;
}
this.reward = false;
this.finish = false;
this.rewardCount = 0;
this.ctor();
this.preload();
} }
ctor () { ctor () {
@ -47,16 +100,19 @@ export class AudioManager {
this.mEffectSwitch = 1; this.mEffectSwitch = 1;
} }
play (audioSource, loop, callback, isBgMusic) { play (audioSource, loop, callback, isBgMusic) {
if (isBgMusic && !this.mMusicSwitch) return; // if (isBgMusic && !this.mMusicSwitch) return;
if (!isBgMusic && !this.mEffectSwitch) return; // if (!isBgMusic && !this.mEffectSwitch) return;
var volume = isBgMusic ? this.bgMusicVolume : this.effectMusicVolume; var volume = isBgMusic ? this.bgMusicVolume : this.effectMusicVolume;
if (cc.sys.isBrowser) { // if (cc.sys.isBrowser) {
if(audioSource == this.brickSound){ // if(audioSource == this.brickSound){
volume = 0.1; // volume = 0.1;
} // }
volume = 1; volume = 1;
var context = cc.audioEngine.play(audioSource, loop, volume); cc.audioEngine.setEffectsVolume(1);
cc.audioEngine.setMusicVolume(1);
var context = cc.audioEngine.playEffect(audioSource, loop);
if (callback){ if (callback){
cc.audioEngine.setFinishCallback(context, function(){ cc.audioEngine.setFinishCallback(context, function(){
callback.call(this); callback.call(this);
@ -66,9 +122,9 @@ export class AudioManager {
this.mAudioMap[audioSource] = context; this.mAudioMap[audioSource] = context;
return audioSource; return audioSource;
} else { // } else {
return audioSource; // return audioSource;
} // }
} }
save () { save () {
@ -76,22 +132,15 @@ export class AudioManager {
// cc.wwx.Storage.setItem(cc.wwx.Storage.Key_Setting_Effect_Volume, this.mEffectSwitch); // cc.wwx.Storage.setItem(cc.wwx.Storage.Key_Setting_Effect_Volume, this.mEffectSwitch);
} }
static get Instance() // static get Instance()
{ // {
if (this._instance == null) // if (this._instance == null)
{ // {
this._instance = new AudioManager(); // this._instance = new AudioManager();
} // }
return this._instance; // return this._instance;
} // }
public init() {
this.reward = false;
this.finish = false;
this.rewardCount = 0;
this.ctor();
this.preload();
}
preload () { preload () {
if (!(cc.sys.platform === cc.sys.WECHAT_GAME)) { return; } if (!(cc.sys.platform === cc.sys.WECHAT_GAME)) { return; }
@ -121,7 +170,6 @@ export class AudioManager {
{ {
this.mMusicSwitch = 1-this.mMusicSwitch; this.mMusicSwitch = 1-this.mMusicSwitch;
// this.save(); // this.save();
} }
if(on) if(on)
{ {
@ -146,6 +194,12 @@ export class AudioManager {
onShow () { onShow () {
cc.audioEngine.resumeAll(); cc.audioEngine.resumeAll();
} }
//播放音效
playEffect(name,callback){
if(this[name])
return this.play(this[name], false,callback,this.mEffectSwitch);
}
playMusic (key, callback, loop) { playMusic (key, callback, loop) {
loop = typeof loop == 'undefined' || loop ? true : false; loop = typeof loop == 'undefined' || loop ? true : false;
this.stopMusic(); this.stopMusic();
@ -175,15 +229,6 @@ export class AudioManager {
} }
} }
// 炸弹、火箭爆炸音效
playWin () {
return this.play(this.audioWin, false,null,this.mEffectSwitch);
}
//激光音效
playWarning()
{
return this.play(this.audioWarning, false,null,this.mEffectSwitch);
}
/* /*
* *
@ -222,7 +267,7 @@ export class AudioManager {
* *
*/ */
playAudioButton () { playAudioButton () {
return this.play(this.audioButtonClick, false,null,this.mEffectSwitch); // return this.play(this.audioButtonClick, false,null,this.mEffectSwitch);
} }
}; };

View File

@ -12,10 +12,12 @@ export default class ItemRender extends cc.Component {
/**数据改变时调用 */ /**数据改变时调用 */
public dataChanged(){ public dataChanged(){
cc.fx.GameTool.subName(this.data.name,6); cc.fx.GameTool.subName(this.data.name,6);
this.node.getChildByName("rankLab").getComponent(cc.Label).string = this.data.rank + ""; this.node.getChildByName("rankLab").getComponent(cc.Label).string = this.data.rank + "";
this.node.getChildByName("nameLab").getComponent(cc.Label).string = this.data.name + ""; this.node.getChildByName("nameLab").getComponent(cc.Label).string = this.data.name + "";
this.node.getChildByName("totalLab").getComponent(cc.Label).string = this.data.total + ""; this.node.getChildByName("totalLab").getComponent(cc.Label).string = this.data.total + "%";
let timeTemp = cc.fx.GameTool.getTimeShenNong(this.data.time);
this.node.getChildByName("timeLab").getComponent(cc.Label).string = timeTemp + "";
this.node.getChildByName("rank").getChildByName("one").active = false; this.node.getChildByName("rank").getChildByName("one").active = false;
this.node.getChildByName("rank").getChildByName("two").active = false; this.node.getChildByName("rank").getChildByName("two").active = false;
this.node.getChildByName("rank").getChildByName("three").active = false; this.node.getChildByName("rank").getChildByName("three").active = false;

View File

@ -0,0 +1,13 @@
{
"ver": "1.1.3",
"uuid": "bdc76845-baea-4381-911e-af437cccf839",
"importer": "folder",
"isBundle": false,
"bundleName": "",
"priority": 1,
"compressionType": {},
"optimizeHotUpdate": {},
"inlineSpriteFrames": {},
"isRemoteBundle": {},
"subMetas": {}
}

Binary file not shown.

View File

@ -0,0 +1,6 @@
{
"ver": "1.0.3",
"uuid": "b42c4fc1-4cd1-4b12-b206-930cea3d49ca",
"importer": "asset",
"subMetas": {}
}

View File

@ -0,0 +1,95 @@
var shareConfig = {
gameId: "100010",
shareLine: "zDLsruVI",
EK:"hui231%1"
};
// 定义微信配置数据的接口
interface IWeChatConfig {
appId: string;
timestamp: number;
nonceStr: string;
signature: string;
jsApiList: [];
}
// 微信操作类
export class WeChat {
static setShare(url) {
var urlTemp = this.removeQueryParams(url);
shareConfig.shareLine = urlTemp;
WeChat.getSignature(url);
}
static getResult(res){
if(res){
var data = res.data;
wx.config({
debug: false,
appId: data.appId,
timestamp: data.timestamp,
nonceStr: data.nonceStr,
signature: data.signature,
jsApiList: ['onMenuShareTimeline','updateAppMessageShareData', 'updateTimelineShareData', 'onMenuShareAppMessage']
});
wx.checkJsApi({
jsApiList: ['updateAppMessageShareData'], // 需要检测的JS接口列表所有JS接口列表见附录2,
success: function(res) {
setTimeout(() => {
WeChat.changeShare();
}, 100);
setTimeout(() => {
WeChat.changeShare();
}, 200);
}
});
}
}
static changeShare(){
wx.ready(() => {
wx.updateAppMessageShareData({
title: '记忆力认知测评', // 分享标题
desc: '你的认知灵活性和选择注意有问题吗', // 分享描述
link: shareConfig.shareLine, // 分享链接该链接域名或路径必须与当前页面对应的公众号JS安全域名一致
imgUrl: 'https://static.sparkus.cn/public/shennong.jpg', // 分享图标
success: function () {
// 设置成功
console.log("分享好友成功回调");
}
});
wx.updateTimelineShareData({
title: '记忆力认知测评', // 分享标题
link: shareConfig.shareLine, // 分享链接该链接域名或路径必须与当前页面对应的公众号JS安全域名一致
imgUrl: 'https://static.sparkus.cn/public/shennong.jpg', // 分享图标
success: function () {
// 设置成功
console.log("分享朋友圈成功回调");
}
})
});
}
static getSignature(url: string): Promise<IWeChatConfig> {
return new Promise((resolve) => {
WeChat.getShareInfo((encodeURIComponent(url)),WeChat.getResult);
});
}
static async getShareInfo(shareUrl: string, callback:Function): Promise<any> {
const time = Math.floor((new Date().getTime()) / 1000)
const url = cc.fx.HttpUtil.apiSign(`/api/share/cfg?gameId=${shareConfig.gameId}&time=${time}&url=${shareUrl}`,{})
return cc.fx.HttpUtil.get(url,callback)
}
static containsNanana(str) {
return /test/i.test(str);
}
static removeQueryParams(url) {
return url.replace(/\?.*$/, '');
}
}

View File

@ -0,0 +1,10 @@
{
"ver": "1.1.0",
"uuid": "7290c680-dfdc-4c59-9736-a614cc2a8bcf",
"importer": "typescript",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
"loadPluginInEditor": false,
"subMetas": {}
}

View File

@ -9,7 +9,7 @@ var GameTool = {
let name = "user_" + cc.fx.GameConfig.GM_INFO.gameId; let name = "user_" + cc.fx.GameConfig.GM_INFO.gameId;
var data = JSON.parse(localStorage.getItem(name)); var data = JSON.parse(localStorage.getItem(name));
if(data == "undifend" || data==null || data == ""){ if(data == "undifend" || data==null || data == ""){
let url = "http://api.sparkus.cn/api/user/auth/login?domain=hui32579WdYPsgYq&callback="+location.href; let url = "https://api.sparkus.cn/api/user/auth/login?domain=hui32579WdYPsgYq&callback="+location.href;
window.location.href = url; window.location.href = url;
} }
else{ else{
@ -33,7 +33,7 @@ var GameTool = {
"data": data "data": data
}; };
// console.log("上传数据:") console.log("上传数据:");
cc.fx.HttpUtil.uploadUserLogData(postData,function(){}) cc.fx.HttpUtil.uploadUserLogData(postData,function(){})
}, },
//上传排行榜 type为1 //上传排行榜 type为1
@ -43,8 +43,8 @@ var GameTool = {
"gameId":cc.fx.GameConfig.GM_INFO.gameId, "gameId":cc.fx.GameConfig.GM_INFO.gameId,
"userId":cc.fx.GameConfig.GM_INFO.userId, "userId":cc.fx.GameConfig.GM_INFO.userId,
"type":1, "type":1,
"reactionTime": data, "totleTimes": data.totleTimes,
"totalSunCount": cc.fx.GameConfig.GM_INFO.total, "accuracy": data.accuracy,
"success": cc.fx.GameConfig.GM_INFO.success "success": cc.fx.GameConfig.GM_INFO.success
}; };
cc.fx.HttpUtil.rankData(1,function(){},postData); cc.fx.HttpUtil.rankData(1,function(){},postData);
@ -64,6 +64,7 @@ var GameTool = {
//获取matchId 用于上传每次点击数据里面记录id方便查询 //获取matchId 用于上传每次点击数据里面记录id方便查询
getMatchId (){ getMatchId (){
let matchId = cc.sys.localStorage.getItem("matchId"); let matchId = cc.sys.localStorage.getItem("matchId");
let tempId = matchId;
if(matchId == "undifend" || matchId==null){ if(matchId == "undifend" || matchId==null){
matchId = this.setMatchId(); matchId = this.setMatchId();
} }
@ -72,15 +73,20 @@ var GameTool = {
matchId = this.setMatchId(); matchId = this.setMatchId();
} }
else{ else{
let char = parseInt(matchId[10]); let char = parseInt(tempId.substring(10,tempId.length));
if(this.level == 1){ if(cc.fx.GameConfig.GM_INFO.level == 1){
char += 1; char += 1;
matchId = tempId.slice(0, 10) + char + "";
if(this.containsNanana(matchId)) matchId = this.setMatchId();
cc.fx.GameConfig.GM_INFO.matchId = matchId;
cc.sys.localStorage.setItem("matchId",matchId);
} }
matchId = matchId.slice(0, 10) + char + "";
cc.fx.GameConfig.GM_INFO.matchId = matchId;
cc.sys.localStorage.setItem("matchId",matchId);
} }
} }
if(this.containsNanana(matchId) == true){
matchId = this.setMatchId();
}
return matchId; return matchId;
}, },
//检测matchId 如果有缓存以前的nanana数据清除 //检测matchId 如果有缓存以前的nanana数据清除
@ -152,7 +158,7 @@ var GameTool = {
let self = false; let self = false;
cc.fx.GameTool.setPic(target.selfNode.getChildByName("pic").getChildByName("icon"),target.selfData.pic); cc.fx.GameTool.setPic(target.selfNode.getChildByName("pic").getChildByName("icon"),target.selfData.pic);
for(let i=0;i<=target.listData.length-1;i++){ for(let i=0;i<=target.listData.length-1;i++){
rankData.push({rank:(i+1), name:target.listData[i].nickName, total:target.listData[i].totalSunCount, pic:target.listData[i].pic}); rankData.push({rank:(i+1), name:target.listData[i].nickName, total:target.listData[i].accuracy,time:target.listData[i].totleTimes, pic:target.listData[i].pic});
if(cc.fx.GameConfig.GM_INFO.userId == target.listData[i].userId){ if(cc.fx.GameConfig.GM_INFO.userId == target.listData[i].userId){
self = true; self = true;
target.rankNumber = i; target.rankNumber = i;
@ -165,7 +171,9 @@ var GameTool = {
} }
cc.fx.GameTool.subName(target.selfData.nickName,nameLength); cc.fx.GameTool.subName(target.selfData.nickName,nameLength);
target.selfNode.getChildByName("nameLab").getComponent(cc.Label).string = target.selfData.nickName; target.selfNode.getChildByName("nameLab").getComponent(cc.Label).string = target.selfData.nickName;
target.selfNode.getChildByName("totalLab").getComponent(cc.Label).string = target.selfData.totalSunCount; target.selfNode.getChildByName("totalLab").getComponent(cc.Label).string = target.selfData.accuracy + "%";
let timeTemp = cc.fx.GameTool.getTimeShenNong(target.selfData.totleTimes);
target.selfNode.getChildByName("timeLab").getComponent(cc.Label).string = timeTemp + "";
switch(target.selfNode.getChildByName("rankLab").getComponent(cc.Label).string){ switch(target.selfNode.getChildByName("rankLab").getComponent(cc.Label).string){
case "1": case "1":
target.selfNode.getChildByName("rank").getChildByName("one").active = true; target.selfNode.getChildByName("rank").getChildByName("one").active = true;
@ -176,7 +184,6 @@ var GameTool = {
case "3": case "3":
target.selfNode.getChildByName("rank").getChildByName("three").active = true; target.selfNode.getChildByName("rank").getChildByName("three").active = true;
break; break;
} }
// 大排行 // 大排行
if(nameLength == 6){ if(nameLength == 6){
@ -186,6 +193,121 @@ var GameTool = {
} }
}, },
getSeedRandom: function (min, max) {//包含min 不包含max
console.log("随机数:",cc.fx.GameConfig.GM_INFO.currSeed);
max = max || 1;
min = min || 0;
cc.fx.GameConfig.GM_INFO.currSeed = (cc.fx.GameConfig.GM_INFO.currSeed * 9301 + 49297) % 233280;
let rnd = cc.fx.GameConfig.GM_INFO.currSeed / 233280.0;
let tmp = min + rnd * (max - min);
return parseInt(tmp);
},
//获取关卡配置的那个关卡数
getCustom(type){
let custom = cc.fx.StorageMessage.getStorage(cc.fx.storageType.storageTypeCustom);
if(custom == "undifend" || custom==null || custom == ""){
this.setCustom();
}
else{
cc.fx.GameConfig.GM_INFO_SET("custom",custom[0]);
if(custom[0] != 0 || type == true){
custom.shift();
if(custom.length == 0){
this.setCustom();
}
else cc.fx.StorageMessage.setStorage(cc.fx.storageType.storageTypeCustom,custom);
}
}
},
//本地没有存储到配置,或者配置用完,重新创建配置
setCustom(){
let arrayLength = cc.fx.GameConfig.LEVEL_INFO.length;
let arrayList = [];
for(let i=1; i<arrayLength;i++){
arrayList.push(i);
}
arrayList.sort(() => Math.random() - 0.5);
arrayList.unshift(0)
cc.fx.GameConfig.GM_INFO_SET("custom",arrayList[0]);
cc.fx.StorageMessage.setStorage(cc.fx.storageType.storageTypeCustom,arrayList);
},
getFoodName(food){
var name = "葡萄";
switch(food){
case "baishao":
name = "白芍";
break;
case "jingjie":
name = "荆芥";
break;
case "renshen":
name = "人参";
break;
case "danshen":
name = "丹参";
break;
case "danggui":
name = "当归";
break;
case "gouqi":
name = "枸杞";
break;
case "mudan":
name = "牡丹";
break;
case "mulan":
name = "木兰";
break;
case "pugongying":
name = "蒲公英";
break;
case "moli":
name = "茉莉";
break;
case "jinju":
name = "金桔";
break;
case "dazao":
name = "大枣";
break;
case "lizi":
name = "李子";
break;
case "lizhi":
name = "荔枝";
break;
case "taozi":
name = "桃子";
break;
case "putao":
name = "葡萄";
break;
case "muchai":
name = "木柴";
break;
case "ganjiang":
name = "干姜";
break;
case "zhuye":
name = "竹叶";
break;
case "longyan":
name = "龙眼";
break;
case "chixiaodou":
name = "赤小豆";
break;
case "gancao":
name = "甘草";
break;
case "cha":
name = "茶";
break;
}
return name;
},
getSetScreenResolutionFlag: function () { getSetScreenResolutionFlag: function () {
let size = cc.winSize; let size = cc.winSize;
let width = size.width; let width = size.width;
@ -212,6 +334,25 @@ var GameTool = {
setGameInfo: function(pd){ setGameInfo: function(pd){
}, },
//打字机效果
typingAni(label,text,cb,target){
var self = target;
var html = '';
var arr = text.split('');
var len = arr.length;
var step = 0;
self.func = ()=>{
html += arr[step];
label.string = html;
if (++step == len) {
self.unschedule(self.func);
cb && cb();
}
}
self.schedule(self.func,0.1, cc.macro.REPEAT_FOREVER, 0)
},
//输入秒,返回需要展示时间格式 //输入秒,返回需要展示时间格式
getTimeMargin:(second) => { getTimeMargin:(second) => {
let total = 0; let total = 0;
@ -228,6 +369,22 @@ var GameTool = {
return m + ':' + miao return m + ':' + miao
}, },
//输入秒,返回需要展示时间格式
getTimeShenNong:(second) => {
second = parseInt(second/1000+"");
let total = 0;
total = second;
let min = 0;
if(total > 60){
min = parseInt((total / 60)+"");//计算整数分
}
let m = min + "'";
let afterMin = total - min * 60;//取得算出分后剩余的秒数
let miao = afterMin + "''";
return m + miao
},
//获取时间戳 //获取时间戳
getTime(){ getTime(){
const timestamp = new Date().getTime(); const timestamp = new Date().getTime();

View File

@ -15,7 +15,7 @@ var GameTool = {
var name = "user_" + cc.fx.GameConfig.GM_INFO.gameId; var name = "user_" + cc.fx.GameConfig.GM_INFO.gameId;
var data = JSON.parse(localStorage.getItem(name)); var data = JSON.parse(localStorage.getItem(name));
if (data == "undifend" || data == null || data == "") { if (data == "undifend" || data == null || data == "") {
var url = "http://api.sparkus.cn/api/user/auth/login?domain=hui32579WdYPsgYq&callback=" + location.href; var url = "https://api.sparkus.cn/api/user/auth/login?domain=hui32579WdYPsgYq&callback=" + location.href;
window.location.href = url; window.location.href = url;
} }
else { else {
@ -37,7 +37,7 @@ var GameTool = {
"matchId": matchId, "matchId": matchId,
"data": data "data": data
}; };
// console.log("上传数据:") console.log("上传数据:");
cc.fx.HttpUtil.uploadUserLogData(postData, function () { }); cc.fx.HttpUtil.uploadUserLogData(postData, function () { });
}, },
//上传排行榜 type为1 //上传排行榜 type为1
@ -47,8 +47,8 @@ var GameTool = {
"gameId": cc.fx.GameConfig.GM_INFO.gameId, "gameId": cc.fx.GameConfig.GM_INFO.gameId,
"userId": cc.fx.GameConfig.GM_INFO.userId, "userId": cc.fx.GameConfig.GM_INFO.userId,
"type": 1, "type": 1,
"reactionTime": data, "totleTimes": data.totleTimes,
"totalSunCount": cc.fx.GameConfig.GM_INFO.total, "accuracy": data.accuracy,
"success": cc.fx.GameConfig.GM_INFO.success "success": cc.fx.GameConfig.GM_INFO.success
}; };
cc.fx.HttpUtil.rankData(1, function () { }, postData); cc.fx.HttpUtil.rankData(1, function () { }, postData);
@ -68,6 +68,7 @@ var GameTool = {
//获取matchId 用于上传每次点击数据里面记录id方便查询 //获取matchId 用于上传每次点击数据里面记录id方便查询
getMatchId: function () { getMatchId: function () {
var matchId = cc.sys.localStorage.getItem("matchId"); var matchId = cc.sys.localStorage.getItem("matchId");
var tempId = matchId;
if (matchId == "undifend" || matchId == null) { if (matchId == "undifend" || matchId == null) {
matchId = this.setMatchId(); matchId = this.setMatchId();
} }
@ -76,15 +77,20 @@ var GameTool = {
matchId = this.setMatchId(); matchId = this.setMatchId();
} }
else { else {
var char = parseInt(matchId[10]); var char = parseInt(tempId.substring(10, tempId.length));
if (this.level == 1) { if (cc.fx.GameConfig.GM_INFO.level == 1) {
char += 1; char += 1;
matchId = tempId.slice(0, 10) + char + "";
if (this.containsNanana(matchId))
matchId = this.setMatchId();
cc.fx.GameConfig.GM_INFO.matchId = matchId;
cc.sys.localStorage.setItem("matchId", matchId);
} }
matchId = matchId.slice(0, 10) + char + "";
cc.fx.GameConfig.GM_INFO.matchId = matchId;
cc.sys.localStorage.setItem("matchId", matchId);
} }
} }
if (this.containsNanana(matchId) == true) {
matchId = this.setMatchId();
}
return matchId; return matchId;
}, },
//检测matchId 如果有缓存以前的nanana数据清除 //检测matchId 如果有缓存以前的nanana数据清除
@ -156,7 +162,7 @@ var GameTool = {
var self = false; var self = false;
cc.fx.GameTool.setPic(target.selfNode.getChildByName("pic").getChildByName("icon"), target.selfData.pic); cc.fx.GameTool.setPic(target.selfNode.getChildByName("pic").getChildByName("icon"), target.selfData.pic);
for (var i = 0; i <= target.listData.length - 1; i++) { for (var i = 0; i <= target.listData.length - 1; i++) {
rankData.push({ rank: (i + 1), name: target.listData[i].nickName, total: target.listData[i].totalSunCount, pic: target.listData[i].pic }); rankData.push({ rank: (i + 1), name: target.listData[i].nickName, total: target.listData[i].accuracy, time: target.listData[i].totleTimes, pic: target.listData[i].pic });
if (cc.fx.GameConfig.GM_INFO.userId == target.listData[i].userId) { if (cc.fx.GameConfig.GM_INFO.userId == target.listData[i].userId) {
self = true; self = true;
target.rankNumber = i; target.rankNumber = i;
@ -169,7 +175,9 @@ var GameTool = {
} }
cc.fx.GameTool.subName(target.selfData.nickName, nameLength); cc.fx.GameTool.subName(target.selfData.nickName, nameLength);
target.selfNode.getChildByName("nameLab").getComponent(cc.Label).string = target.selfData.nickName; target.selfNode.getChildByName("nameLab").getComponent(cc.Label).string = target.selfData.nickName;
target.selfNode.getChildByName("totalLab").getComponent(cc.Label).string = target.selfData.totalSunCount; target.selfNode.getChildByName("totalLab").getComponent(cc.Label).string = target.selfData.accuracy + "%";
var timeTemp = cc.fx.GameTool.getTimeShenNong(target.selfData.totleTimes);
target.selfNode.getChildByName("timeLab").getComponent(cc.Label).string = timeTemp + "";
switch (target.selfNode.getChildByName("rankLab").getComponent(cc.Label).string) { switch (target.selfNode.getChildByName("rankLab").getComponent(cc.Label).string) {
case "1": case "1":
target.selfNode.getChildByName("rank").getChildByName("one").active = true; target.selfNode.getChildByName("rank").getChildByName("one").active = true;
@ -189,6 +197,120 @@ var GameTool = {
target.selfNode.opacity = 0; target.selfNode.opacity = 0;
} }
}, },
getSeedRandom: function (min, max) {
console.log("随机数:", cc.fx.GameConfig.GM_INFO.currSeed);
max = max || 1;
min = min || 0;
cc.fx.GameConfig.GM_INFO.currSeed = (cc.fx.GameConfig.GM_INFO.currSeed * 9301 + 49297) % 233280;
var rnd = cc.fx.GameConfig.GM_INFO.currSeed / 233280.0;
var tmp = min + rnd * (max - min);
return parseInt(tmp);
},
//获取关卡配置的那个关卡数
getCustom: function (type) {
var custom = cc.fx.StorageMessage.getStorage(cc.fx.storageType.storageTypeCustom);
if (custom == "undifend" || custom == null || custom == "") {
this.setCustom();
}
else {
cc.fx.GameConfig.GM_INFO_SET("custom", custom[0]);
if (custom[0] != 0 || type == true) {
custom.shift();
if (custom.length == 0) {
this.setCustom();
}
else
cc.fx.StorageMessage.setStorage(cc.fx.storageType.storageTypeCustom, custom);
}
}
},
//本地没有存储到配置,或者配置用完,重新创建配置
setCustom: function () {
var arrayLength = cc.fx.GameConfig.LEVEL_INFO.length;
var arrayList = [];
for (var i = 1; i < arrayLength; i++) {
arrayList.push(i);
}
arrayList.sort(function () { return Math.random() - 0.5; });
arrayList.unshift(0);
cc.fx.GameConfig.GM_INFO_SET("custom", arrayList[0]);
cc.fx.StorageMessage.setStorage(cc.fx.storageType.storageTypeCustom, arrayList);
},
getFoodName: function (food) {
var name = "葡萄";
switch (food) {
case "baishao":
name = "白芍";
break;
case "jingjie":
name = "荆芥";
break;
case "renshen":
name = "人参";
break;
case "danshen":
name = "丹参";
break;
case "danggui":
name = "当归";
break;
case "gouqi":
name = "枸杞";
break;
case "mudan":
name = "牡丹";
break;
case "mulan":
name = "木兰";
break;
case "pugongying":
name = "蒲公英";
break;
case "moli":
name = "茉莉";
break;
case "jinju":
name = "金桔";
break;
case "dazao":
name = "大枣";
break;
case "lizi":
name = "李子";
break;
case "lizhi":
name = "荔枝";
break;
case "taozi":
name = "桃子";
break;
case "putao":
name = "葡萄";
break;
case "muchai":
name = "木柴";
break;
case "ganjiang":
name = "干姜";
break;
case "zhuye":
name = "竹叶";
break;
case "longyan":
name = "龙眼";
break;
case "chixiaodou":
name = "赤小豆";
break;
case "gancao":
name = "甘草";
break;
case "cha":
name = "茶";
break;
}
return name;
},
getSetScreenResolutionFlag: function () { getSetScreenResolutionFlag: function () {
var size = cc.winSize; var size = cc.winSize;
var width = size.width; var width = size.width;
@ -216,6 +338,23 @@ var GameTool = {
//设置游戏信息 //设置游戏信息
setGameInfo: function (pd) { setGameInfo: function (pd) {
}, },
//打字机效果
typingAni: function (label, text, cb, target) {
var self = target;
var html = '';
var arr = text.split('');
var len = arr.length;
var step = 0;
self.func = function () {
html += arr[step];
label.string = html;
if (++step == len) {
self.unschedule(self.func);
cb && cb();
}
};
self.schedule(self.func, 0.1, cc.macro.REPEAT_FOREVER, 0);
},
//输入秒,返回需要展示时间格式 //输入秒,返回需要展示时间格式
getTimeMargin: function (second) { getTimeMargin: function (second) {
var total = 0; var total = 0;
@ -233,6 +372,20 @@ var GameTool = {
miao = "0" + afterMin; miao = "0" + afterMin;
return m + ':' + miao; return m + ':' + miao;
}, },
//输入秒,返回需要展示时间格式
getTimeShenNong: function (second) {
second = parseInt(second / 1000 + "");
var total = 0;
total = second;
var min = 0;
if (total > 60) {
min = parseInt((total / 60) + ""); //计算整数分
}
var m = min + "'";
var afterMin = total - min * 60; //取得算出分后剩余的秒数
var miao = afterMin + "''";
return m + miao;
},
//获取时间戳 //获取时间戳
getTime: function () { getTime: function () {
var timestamp = new Date().getTime(); var timestamp = new Date().getTime();

File diff suppressed because one or more lines are too long

View File

@ -35,8 +35,9 @@ var NewClass = /** @class */ (function (_super) {
} }
NewClass.prototype.start = function () { NewClass.prototype.start = function () {
window.initMgr(); window.initMgr();
cc.fx.GameConfig.init(this.localTest); debugger;
cc.fx.AudioManager.Instance.init(); cc.fx.GameConfig.init(true);
// cc.fx.AudioManager.Instance.init();
this.testVersion.string = this.clientTestVersion; this.testVersion.string = this.clientTestVersion;
}; };
//开始游戏,跳转至引导页面 //开始游戏,跳转至引导页面

View File

@ -1 +1 @@
{"version":3,"sources":["assets\\Script\\Load.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AACM,IAAA,KAAwC,EAAE,CAAC,UAAU,EAApD,OAAO,aAAA,EAAE,QAAQ,cAAA,EAAE,gBAAgB,sBAAiB,CAAC;AAG5D;IAAsC,4BAAY;IAAlD;QAAA,qEAmCC;QAhCG,eAAS,GAAY,KAAK,CAAC;QAG3B,uBAAiB,GAAW,OAAO,CAAC;QAGpC,iBAAW,GAAa,IAAI,CAAC;;IA0BjC,CAAC;IAxBG,wBAAK,GAAL;QACI,MAAM,CAAC,OAAO,EAAE,CAAC;QACjB,EAAE,CAAC,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QACtC,EAAE,CAAC,EAAE,CAAC,YAAY,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC;QACnC,IAAI,CAAC,WAAW,CAAC,MAAM,GAAG,IAAI,CAAC,iBAAiB,CAAC;IACrD,CAAC;IAED,cAAc;IACd,4BAAS,GAAT;QACI,EAAE,CAAC,QAAQ,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC;QACnC,uCAAuC;IAC3C,CAAC;IACD,gBAAgB;IAChB,2BAAQ,GAAR,UAAS,KAAK,EAAC,IAAI;QACf,EAAE,CAAC,EAAE,CAAC,UAAU,CAAC,OAAO,CAAC,MAAM,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC;QACjD,EAAE,CAAC,QAAQ,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC;IACvC,CAAC;IACD,OAAO;IACP,2BAAQ,GAAR;QACI,EAAE,CAAC,QAAQ,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC;IACvC,CAAC;IAES,yBAAM,GAAhB,UAAiB,EAAU;IAC3B,CAAC;IA/BD;QADC,QAAQ,CAAC,KAAK,CAAC;+CACW;IAG3B;QADC,QAAQ,CAAC,EAAE,CAAC;uDACuB;IAGpC;QADC,QAAQ,CAAC,EAAE,CAAC,KAAK,CAAC;iDACU;IATZ,QAAQ;QAD5B,OAAO;OACa,QAAQ,CAmC5B;IAAD,eAAC;CAnCD,AAmCC,CAnCqC,EAAE,CAAC,SAAS,GAmCjD;kBAnCoB,QAAQ","file":"","sourceRoot":"/","sourcesContent":["\r\nconst {ccclass, property, requireComponent} = cc._decorator;\r\n\r\n@ccclass\r\nexport default class NewClass extends cc.Component {\r\n\r\n @property(false)\r\n localTest: boolean = false;\r\n\r\n @property(\"\")\r\n clientTestVersion: string = \"1.0.0\";\r\n\r\n @property(cc.Label)\r\n testVersion: cc.Label = null;\r\n\r\n start () {\r\n window.initMgr();\r\n cc.fx.GameConfig.init(this.localTest);\r\n cc.fx.AudioManager.Instance.init();\r\n this.testVersion.string = this.clientTestVersion;\r\n }\r\n\r\n //开始游戏,跳转至引导页面\r\n startGame(){\r\n cc.director.loadScene(\"GameScene\");\r\n // cc.director.loadScene(\"GuideScene\");\r\n }\r\n //备用,用来测试跳转 指定关卡\r\n clickBtn(event,data){\r\n cc.fx.GameConfig.GM_INFO.custom = parseInt(data);\r\n cc.director.loadScene(\"GameScene\");\r\n } \r\n //打开排行榜\r\n openRank(){\r\n cc.director.loadScene(\"RankScene\");\r\n }\r\n \r\n protected update(dt: number): void {\r\n }\r\n}\r\n"]} {"version":3,"sources":["assets\\Script\\Load.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AACM,IAAA,KAAwC,EAAE,CAAC,UAAU,EAApD,OAAO,aAAA,EAAE,QAAQ,cAAA,EAAE,gBAAgB,sBAAiB,CAAC;AAG5D;IAAsC,4BAAY;IAAlD;QAAA,qEAoCC;QAjCG,eAAS,GAAY,KAAK,CAAC;QAG3B,uBAAiB,GAAW,OAAO,CAAC;QAGpC,iBAAW,GAAa,IAAI,CAAC;;IA2BjC,CAAC;IAzBG,wBAAK,GAAL;QACI,MAAM,CAAC,OAAO,EAAE,CAAC;QACjB,QAAQ,CAAC;QACT,EAAE,CAAC,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC5B,sCAAsC;QACtC,IAAI,CAAC,WAAW,CAAC,MAAM,GAAG,IAAI,CAAC,iBAAiB,CAAC;IACrD,CAAC;IAED,cAAc;IACd,4BAAS,GAAT;QACI,EAAE,CAAC,QAAQ,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC;QACnC,uCAAuC;IAC3C,CAAC;IACD,gBAAgB;IAChB,2BAAQ,GAAR,UAAS,KAAK,EAAC,IAAI;QACf,EAAE,CAAC,EAAE,CAAC,UAAU,CAAC,OAAO,CAAC,MAAM,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC;QACjD,EAAE,CAAC,QAAQ,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC;IACvC,CAAC;IACD,OAAO;IACP,2BAAQ,GAAR;QACI,EAAE,CAAC,QAAQ,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC;IACvC,CAAC;IAES,yBAAM,GAAhB,UAAiB,EAAU;IAC3B,CAAC;IAhCD;QADC,QAAQ,CAAC,KAAK,CAAC;+CACW;IAG3B;QADC,QAAQ,CAAC,EAAE,CAAC;uDACuB;IAGpC;QADC,QAAQ,CAAC,EAAE,CAAC,KAAK,CAAC;iDACU;IATZ,QAAQ;QAD5B,OAAO;OACa,QAAQ,CAoC5B;IAAD,eAAC;CApCD,AAoCC,CApCqC,EAAE,CAAC,SAAS,GAoCjD;kBApCoB,QAAQ","file":"","sourceRoot":"/","sourcesContent":["\r\nconst {ccclass, property, requireComponent} = cc._decorator;\r\n\r\n@ccclass\r\nexport default class NewClass extends cc.Component {\r\n\r\n @property(false)\r\n localTest: boolean = false;\r\n\r\n @property(\"\")\r\n clientTestVersion: string = \"1.0.0\";\r\n\r\n @property(cc.Label)\r\n testVersion: cc.Label = null;\r\n\r\n start () {\r\n window.initMgr();\r\n debugger;\r\n cc.fx.GameConfig.init(true);\r\n // cc.fx.AudioManager.Instance.init();\r\n this.testVersion.string = this.clientTestVersion;\r\n }\r\n\r\n //开始游戏,跳转至引导页面\r\n startGame(){\r\n cc.director.loadScene(\"GameScene\");\r\n // cc.director.loadScene(\"GuideScene\");\r\n }\r\n //备用,用来测试跳转 指定关卡\r\n clickBtn(event,data){\r\n cc.fx.GameConfig.GM_INFO.custom = parseInt(data);\r\n cc.director.loadScene(\"GameScene\");\r\n } \r\n //打开排行榜\r\n openRank(){\r\n cc.director.loadScene(\"RankScene\");\r\n }\r\n \r\n protected update(dt: number): void {\r\n }\r\n}\r\n"]}

View File

@ -3,6 +3,19 @@ cc._RF.push(module, '58403/n16JCa5sZhNMjZzGo', 'AudioManager');
// Script/module/Music/AudioManager.ts // Script/module/Music/AudioManager.ts
"use strict"; "use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
@ -10,22 +23,54 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
return c > 3 && r && Object.defineProperty(target, key, r), r; return c > 3 && r && Object.defineProperty(target, key, r), r;
}; };
Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "__esModule", { value: true });
exports.AudioManager = void 0;
var _a = cc._decorator, ccclass = _a.ccclass, property = _a.property; var _a = cc._decorator, ccclass = _a.ccclass, property = _a.property;
var AudioManager = /** @class */ (function () { var AudioManager = /** @class */ (function (_super) {
__extends(AudioManager, _super);
function AudioManager() { function AudioManager() {
var _this = _super !== null && _super.apply(this, arguments) || this;
//背景音乐 //背景音乐
this.audioGameBgm0 = null; _this.audioGameBgm0 = null;
//跳跃 _this.baishao_audio = null;
this.audioButtonClick = null; _this.cha_audio = null;
//落地上 _this.chixiaodou_audio = null;
this.audioWarning = null; _this.danggui_audio = null;
//碰撞 _this.danshen_audio = null;
this.audioWin = null; _this.dazao_audio = null;
_this.gancao_audio = null;
_this.ganjiang_audio = null;
_this.gouqi_audio = null;
_this.jingjie_audio = null;
_this.jinju_audio = null;
_this.lizhi_audio = null;
_this.lizi_audio = null;
_this.longyan_audio = null;
_this.moli_audio = null;
_this.muchai_audio = null;
_this.mudan_audio = null;
_this.mulan_audio = null;
_this.pugongying_audio = null;
_this.putao_audio = null;
_this.renshen_audio = null;
_this.taozi_audio = null;
_this.zhuye_audio = null;
_this.err = null;
_this.yes = null;
return _this;
} }
AudioManager_1 = AudioManager; AudioManager_1 = AudioManager;
AudioManager.playWarning = function () { AudioManager.prototype.onLoad = function () {
throw new Error('Method not implemented.'); if (AudioManager_1._instance == null) {
AudioManager_1._instance = this;
cc.game.addPersistRootNode(this.node);
}
else {
return;
}
this.reward = false;
this.finish = false;
this.rewardCount = 0;
this.ctor();
this.preload();
}; };
AudioManager.prototype.ctor = function () { AudioManager.prototype.ctor = function () {
this.mAudioMap = {}; this.mAudioMap = {};
@ -39,51 +84,41 @@ var AudioManager = /** @class */ (function () {
this.mEffectSwitch = 1; this.mEffectSwitch = 1;
}; };
AudioManager.prototype.play = function (audioSource, loop, callback, isBgMusic) { AudioManager.prototype.play = function (audioSource, loop, callback, isBgMusic) {
if (isBgMusic && !this.mMusicSwitch) // if (isBgMusic && !this.mMusicSwitch) return;
return; // if (!isBgMusic && !this.mEffectSwitch) return;
if (!isBgMusic && !this.mEffectSwitch)
return;
var volume = isBgMusic ? this.bgMusicVolume : this.effectMusicVolume; var volume = isBgMusic ? this.bgMusicVolume : this.effectMusicVolume;
if (cc.sys.isBrowser) { // if (cc.sys.isBrowser) {
if (audioSource == this.brickSound) { // if(audioSource == this.brickSound){
volume = 0.1; // volume = 0.1;
} // }
volume = 1; volume = 1;
var context = cc.audioEngine.play(audioSource, loop, volume); cc.audioEngine.setEffectsVolume(1);
if (callback) { cc.audioEngine.setMusicVolume(1);
cc.audioEngine.setFinishCallback(context, function () { var context = cc.audioEngine.playEffect(audioSource, loop);
callback.call(this); if (callback) {
}.bind(this)); cc.audioEngine.setFinishCallback(context, function () {
} callback.call(this);
// cc.wwx.OutPut.log('play audio effect isBrowser: ' + context.src); }.bind(this));
this.mAudioMap[audioSource] = context;
return audioSource;
}
else {
return audioSource;
} }
// cc.wwx.OutPut.log('play audio effect isBrowser: ' + context.src);
this.mAudioMap[audioSource] = context;
return audioSource;
// } else {
// return audioSource;
// }
}; };
AudioManager.prototype.save = function () { AudioManager.prototype.save = function () {
// cc.wwx.Storage.setItem(cc.wwx.Storage.Key_Setting_Music_Volume, this.mMusicSwitch); // cc.wwx.Storage.setItem(cc.wwx.Storage.Key_Setting_Music_Volume, this.mMusicSwitch);
// cc.wwx.Storage.setItem(cc.wwx.Storage.Key_Setting_Effect_Volume, this.mEffectSwitch); // cc.wwx.Storage.setItem(cc.wwx.Storage.Key_Setting_Effect_Volume, this.mEffectSwitch);
}; };
Object.defineProperty(AudioManager, "Instance", { // static get Instance()
get: function () { // {
if (this._instance == null) { // if (this._instance == null)
this._instance = new AudioManager_1(); // {
} // this._instance = new AudioManager();
return this._instance; // }
}, // return this._instance;
enumerable: false, // }
configurable: true
});
AudioManager.prototype.init = function () {
this.reward = false;
this.finish = false;
this.rewardCount = 0;
this.ctor();
this.preload();
};
AudioManager.prototype.preload = function () { AudioManager.prototype.preload = function () {
if (!(cc.sys.platform === cc.sys.WECHAT_GAME)) { if (!(cc.sys.platform === cc.sys.WECHAT_GAME)) {
return; return;
@ -128,6 +163,11 @@ var AudioManager = /** @class */ (function () {
AudioManager.prototype.onShow = function () { AudioManager.prototype.onShow = function () {
cc.audioEngine.resumeAll(); cc.audioEngine.resumeAll();
}; };
//播放音效
AudioManager.prototype.playEffect = function (name, callback) {
if (this[name])
return this.play(this[name], false, callback, this.mEffectSwitch);
};
AudioManager.prototype.playMusic = function (key, callback, loop) { AudioManager.prototype.playMusic = function (key, callback, loop) {
loop = typeof loop == 'undefined' || loop ? true : false; loop = typeof loop == 'undefined' || loop ? true : false;
this.stopMusic(); this.stopMusic();
@ -155,14 +195,6 @@ var AudioManager = /** @class */ (function () {
cc.audioEngine.stop(context); cc.audioEngine.stop(context);
} }
}; };
// 炸弹、火箭爆炸音效
AudioManager.prototype.playWin = function () {
return this.play(this.audioWin, false, null, this.mEffectSwitch);
};
//激光音效
AudioManager.prototype.playWarning = function () {
return this.play(this.audioWarning, false, null, this.mEffectSwitch);
};
/* /*
* 游戏开始音效 * 游戏开始音效
* *
@ -191,28 +223,93 @@ var AudioManager = /** @class */ (function () {
* 按钮 * 按钮
*/ */
AudioManager.prototype.playAudioButton = function () { AudioManager.prototype.playAudioButton = function () {
return this.play(this.audioButtonClick, false, null, this.mEffectSwitch); // return this.play(this.audioButtonClick, false,null,this.mEffectSwitch);
}; };
var AudioManager_1; var AudioManager_1;
AudioManager._instance = null;
__decorate([ __decorate([
property(cc.AudioClip) property(cc.AudioClip)
], AudioManager.prototype, "audioGameBgm0", void 0); ], AudioManager.prototype, "audioGameBgm0", void 0);
__decorate([ __decorate([
property(cc.AudioClip) property(cc.AudioClip)
], AudioManager.prototype, "audioButtonClick", void 0); ], AudioManager.prototype, "baishao_audio", void 0);
__decorate([ __decorate([
property(cc.AudioClip) property(cc.AudioClip)
], AudioManager.prototype, "audioWarning", void 0); ], AudioManager.prototype, "cha_audio", void 0);
__decorate([ __decorate([
property(cc.AudioClip) property(cc.AudioClip)
], AudioManager.prototype, "audioWin", void 0); ], AudioManager.prototype, "chixiaodou_audio", void 0);
__decorate([
property(cc.AudioClip)
], AudioManager.prototype, "danggui_audio", void 0);
__decorate([
property(cc.AudioClip)
], AudioManager.prototype, "danshen_audio", void 0);
__decorate([
property(cc.AudioClip)
], AudioManager.prototype, "dazao_audio", void 0);
__decorate([
property(cc.AudioClip)
], AudioManager.prototype, "gancao_audio", void 0);
__decorate([
property(cc.AudioClip)
], AudioManager.prototype, "ganjiang_audio", void 0);
__decorate([
property(cc.AudioClip)
], AudioManager.prototype, "gouqi_audio", void 0);
__decorate([
property(cc.AudioClip)
], AudioManager.prototype, "jingjie_audio", void 0);
__decorate([
property(cc.AudioClip)
], AudioManager.prototype, "jinju_audio", void 0);
__decorate([
property(cc.AudioClip)
], AudioManager.prototype, "lizhi_audio", void 0);
__decorate([
property(cc.AudioClip)
], AudioManager.prototype, "lizi_audio", void 0);
__decorate([
property(cc.AudioClip)
], AudioManager.prototype, "longyan_audio", void 0);
__decorate([
property(cc.AudioClip)
], AudioManager.prototype, "moli_audio", void 0);
__decorate([
property(cc.AudioClip)
], AudioManager.prototype, "muchai_audio", void 0);
__decorate([
property(cc.AudioClip)
], AudioManager.prototype, "mudan_audio", void 0);
__decorate([
property(cc.AudioClip)
], AudioManager.prototype, "mulan_audio", void 0);
__decorate([
property(cc.AudioClip)
], AudioManager.prototype, "pugongying_audio", void 0);
__decorate([
property(cc.AudioClip)
], AudioManager.prototype, "putao_audio", void 0);
__decorate([
property(cc.AudioClip)
], AudioManager.prototype, "renshen_audio", void 0);
__decorate([
property(cc.AudioClip)
], AudioManager.prototype, "taozi_audio", void 0);
__decorate([
property(cc.AudioClip)
], AudioManager.prototype, "zhuye_audio", void 0);
__decorate([
property(cc.AudioClip)
], AudioManager.prototype, "err", void 0);
__decorate([
property(cc.AudioClip)
], AudioManager.prototype, "yes", void 0);
AudioManager = AudioManager_1 = __decorate([ AudioManager = AudioManager_1 = __decorate([
ccclass('AudioManager') ccclass
], AudioManager); ], AudioManager);
return AudioManager; return AudioManager;
}()); }(cc.Component));
exports.AudioManager = AudioManager; exports.default = AudioManager;
; ;
// export { AudioManager }; // export { AudioManager };

File diff suppressed because one or more lines are too long

View File

@ -15,7 +15,7 @@ window.initMgr = function () {
return; return;
} }
cc.fx = {}; cc.fx = {};
console.log("初始化"); console.log("1初始化");
//基础状态信息 //基础状态信息
cc.fx.StateInfo = { cc.fx.StateInfo = {
debugMode: true, debugMode: true,
@ -28,7 +28,7 @@ window.initMgr = function () {
cc.fx.GameConfig = GameConfig_1.GameConfig; cc.fx.GameConfig = GameConfig_1.GameConfig;
cc.fx.HttpUtil = HttpUtil_1.default; cc.fx.HttpUtil = HttpUtil_1.default;
cc.fx.GameTool = GameTool_1.GameTool; cc.fx.GameTool = GameTool_1.GameTool;
cc.fx.AudioManager = AudioManager_1.AudioManager; cc.fx.AudioManager = AudioManager_1.default;
cc.fx.Notifications = Notification_1.Notifications; cc.fx.Notifications = Notification_1.Notifications;
cc.fx.StorageMessage = Storage_1.StorageMessage; cc.fx.StorageMessage = Storage_1.StorageMessage;
cc.fx.ShareInfo = { cc.fx.ShareInfo = {
@ -68,31 +68,45 @@ window.initMgr = function () {
Friend: "friend", Friend: "friend",
All: "all", All: "all",
}; };
//用于存储消息的ID
cc.fx.storageType = cc.Enum({
storageTypeCustom: 1000101,
});
//用于存储提示语 按照步骤提示
cc.fx.tipType = cc.Enum({
tipOne: '神农氏回到家中,开始整理今天收集来的物品。当他第一次拿出或说出一种植物时,请告诉他这是新植物。',
tipTwo: '如果他拿出或说出的植物你今天看到过,请告诉他上次是看到的;如果你听他说过,则请告诉他上次是听到的。',
tipErrNew: '这是这局游戏第一次出现{植物}',
tipErrOld: '{植物}刚才出现过呢',
tipErrHear: '上次遇到{植物}时,似乎不是听到的吧',
tipErrSee: '上次遇到{植物}时,似乎不是看到的吧',
tipErrLast: '之前确实看到过{植物},但最近一次似乎不是看到的呢',
});
//暂时不用 //暂时不用
cc.fx.clickStatEventType = { // cc.fx.clickStatEventType = {
clickStatEventTypeVideoAD: 20173201, // clickStatEventTypeVideoAD : 20173201,//视频播放完成
clickStatEventTypeClickAdVideo: 20173202, // clickStatEventTypeClickAdVideo : 20173202,//视频播放为完成
clickStatEventTypeBannerAD: 20173203, // clickStatEventTypeBannerAD : 20173203,//banner播放为完成
clickStatEventTypeUserFrom: 99990001, // clickStatEventTypeUserFrom : 99990001,//用户来源
clickStatEventTypeShare: 99990002, // clickStatEventTypeShare : 99990002,//用户分享
clickStatEventTypeClickAdBtn: 99990007, // clickStatEventTypeClickAdBtn : 99990007,//点击分流icon
clickStatEventTypeBannerAD2: 67890033, // clickStatEventTypeBannerAD2 : 67890033, // banner广告干预
clickStatEventTypeSubmitVersionInfo: 9999, // clickStatEventTypeSubmitVersionInfo : 9999, //上报微信版本及基础库信息
clickStatEventTypeClickFirstAd: 99990003, // clickStatEventTypeClickFirstAd : 99990003, //分流icon显示
clickStatEventTypeClickSecondAd: 99990004, // clickStatEventTypeClickSecondAd : 99990004, //玩家点击分流按钮
clickStatEventTypeWxLoginStart: 10001, // clickStatEventTypeWxLoginStart : 10001,//微信登录开始
clickStatEventTypeWxLoginSuccess: 10002, // clickStatEventTypeWxLoginSuccess : 10002,//微信登录成功
clickStatEventTypeWxLoginFailed: 10003, // clickStatEventTypeWxLoginFailed : 10003,//微信登录失败
clickStatEventTypeAuthorizationStart: 10003, // clickStatEventTypeAuthorizationStart : 10003,//授权开始
clickStatEventTypeAuthorizationSuccess: 10004, // clickStatEventTypeAuthorizationSuccess : 10004,//授权成功
clickStatEventTypeAuthorizationFailed: 10005, // clickStatEventTypeAuthorizationFailed : 10005,//授权失败
clickStatEventTypeLoginSDKStart: 10007, // clickStatEventTypeLoginSDKStart : 10007,//登录SDK开始
clickStatEventTypeLoginSDKSuccess: 10008, // clickStatEventTypeLoginSDKSuccess : 10008,//登录SDK成功
clickStatEventTypeLoginSDKFailed: 10009, // clickStatEventTypeLoginSDKFailed : 10009,//登录SDK时失败
clickStatEventTypeTCP_Start: 10009, // clickStatEventTypeTCP_Start : 10009,//TCP连接开始
clickStatEventTypeTCP_Success: 10010, // clickStatEventTypeTCP_Success : 10010,//TCP连接成功
clickStatEventTypeTCP_Failed: 10011, // clickStatEventTypeTCP_Failed : 10011,//TCP连接失败
}; // };
}; };
cc._RF.pop(); cc._RF.pop();

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,130 @@
"use strict";
cc._RF.push(module, '7290caA39xMWZc2phTMKovP', 'share');
// Script/module/Share/share.ts
"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
var __generator = (this && this.__generator) || function (thisArg, body) {
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
function verb(n) { return function (v) { return step([n, v]); }; }
function step(op) {
if (f) throw new TypeError("Generator is already executing.");
while (_) try {
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
if (y = 0, t) op = [op[0] & 2, t.value];
switch (op[0]) {
case 0: case 1: t = op; break;
case 4: _.label++; return { value: op[1], done: false };
case 5: _.label++; y = op[1]; op = [0]; continue;
case 7: op = _.ops.pop(); _.trys.pop(); continue;
default:
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
if (t[2]) _.ops.pop();
_.trys.pop(); continue;
}
op = body.call(thisArg, _);
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
}
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.WeChat = void 0;
var shareConfig = {
gameId: "100010",
shareLine: "zDLsruVI",
EK: "hui231%1"
};
// 微信操作类
var WeChat = /** @class */ (function () {
function WeChat() {
}
WeChat.setShare = function (url) {
var urlTemp = this.removeQueryParams(url);
shareConfig.shareLine = urlTemp;
WeChat.getSignature(url);
};
WeChat.getResult = function (res) {
if (res) {
var data = res.data;
wx.config({
debug: false,
appId: data.appId,
timestamp: data.timestamp,
nonceStr: data.nonceStr,
signature: data.signature,
jsApiList: ['onMenuShareTimeline', 'updateAppMessageShareData', 'updateTimelineShareData', 'onMenuShareAppMessage']
});
wx.checkJsApi({
jsApiList: ['updateAppMessageShareData'],
success: function (res) {
setTimeout(function () {
WeChat.changeShare();
}, 100);
setTimeout(function () {
WeChat.changeShare();
}, 200);
}
});
}
};
WeChat.changeShare = function () {
wx.ready(function () {
wx.updateAppMessageShareData({
title: '记忆力认知测评',
desc: '你的认知灵活性和选择注意有问题吗',
link: shareConfig.shareLine,
imgUrl: 'https://static.sparkus.cn/public/shennong.jpg',
success: function () {
// 设置成功
console.log("分享好友成功回调");
}
});
wx.updateTimelineShareData({
title: '记忆力认知测评',
link: shareConfig.shareLine,
imgUrl: 'https://static.sparkus.cn/public/shennong.jpg',
success: function () {
// 设置成功
console.log("分享朋友圈成功回调");
}
});
});
};
WeChat.getSignature = function (url) {
return new Promise(function (resolve) {
WeChat.getShareInfo((encodeURIComponent(url)), WeChat.getResult);
});
};
WeChat.getShareInfo = function (shareUrl, callback) {
return __awaiter(this, void 0, Promise, function () {
var time, url;
return __generator(this, function (_a) {
time = Math.floor((new Date().getTime()) / 1000);
url = cc.fx.HttpUtil.apiSign("/api/share/cfg?gameId=" + shareConfig.gameId + "&time=" + time + "&url=" + shareUrl, {});
return [2 /*return*/, cc.fx.HttpUtil.get(url, callback)];
});
});
};
WeChat.containsNanana = function (str) {
return /test/i.test(str);
};
WeChat.removeQueryParams = function (url) {
return url.replace(/\?.*$/, '');
};
return WeChat;
}());
exports.WeChat = WeChat;
cc._RF.pop();

File diff suppressed because one or more lines are too long

View File

@ -61,20 +61,32 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "__esModule", { value: true });
var _a = cc._decorator, ccclass = _a.ccclass, property = _a.property; var _a = cc._decorator, ccclass = _a.ccclass, property = _a.property;
var CryptoJS = require("./crypto-js.min.js"); //引用AES源码js var CryptoJS = require("./crypto-js.min.js"); //引用AES源码js
var BASE_URL = "http://api.sparkus.cn"; var BASE_URL = "https://api.sparkus.cn";
//只负责网络接口 次类只负责和后端交互,不负责处理数据 数据处理在GameTool //只负责网络接口 次类只负责和后端交互,不负责处理数据 数据处理在GameTool
var HttpUtil = /** @class */ (function (_super) { var HttpUtil = /** @class */ (function (_super) {
__extends(HttpUtil, _super); __extends(HttpUtil, _super);
function HttpUtil() { function HttpUtil() {
return _super !== null && _super.apply(this, arguments) || this; return _super !== null && _super.apply(this, arguments) || this;
} }
HttpUtil_1 = HttpUtil;
HttpUtil.getShareInfo = function (shareUrl) {
return __awaiter(this, void 0, Promise, function () {
var time, url;
return __generator(this, function (_a) {
console.log("设置分享链接:", shareUrl);
time = Math.floor((new Date().getTime()) / 1000);
url = HttpUtil_1.apiSign("/api/share/cfg?gameId=" + config.gameId + "&time=" + time + "&url=" + shareUrl, {});
return [2 /*return*/, this.post(url, null, null)];
});
});
};
//排行榜 //排行榜
HttpUtil.rankData = function (type, callback, data) { HttpUtil.rankData = function (type, callback, data) {
return __awaiter(this, void 0, Promise, function () { return __awaiter(this, void 0, Promise, function () {
var time, url; var time, url;
return __generator(this, function (_a) { return __generator(this, function (_a) {
time = Math.floor((new Date().getTime()) / 1000); time = Math.floor((new Date().getTime()) / 1000);
url = apiSign("/api/get/rank/data?gameId=" + config.gameId + "&dataType=" + type + "&time=" + time, data); url = HttpUtil_1.apiSign("/api/get/rank/data?gameId=" + config.gameId + "&dataType=" + type + "&time=" + time, data);
this.post(url, data, callback); this.post(url, data, callback);
return [2 /*return*/]; return [2 /*return*/];
}); });
@ -96,7 +108,7 @@ var HttpUtil = /** @class */ (function (_super) {
var time, url; var time, url;
return __generator(this, function (_a) { return __generator(this, function (_a) {
time = Math.floor((new Date().getTime()) / 1000); time = Math.floor((new Date().getTime()) / 1000);
url = apiSign("/api/get/user/data?gameId=" + config.gameId + "&time=" + time, data); url = HttpUtil_1.apiSign("/api/get/user/data?gameId=" + config.gameId + "&time=" + time, data);
this.post(url, data, callback); this.post(url, data, callback);
return [2 /*return*/]; return [2 /*return*/];
}); });
@ -163,7 +175,27 @@ var HttpUtil = /** @class */ (function (_super) {
}); });
}); });
}; };
HttpUtil = __decorate([ /**
*
* @param url {string} 接口地址
* @param params {object} 需要加密的参数对象
*/
HttpUtil.apiSign = function (url, params) {
if (params === void 0) { params = {}; }
var convertUrl = url.trim();
if (convertUrl.indexOf('?') === -1) {
convertUrl += '?';
}
// 传入参数转换拼接字符串
var postStr = getQueryString(params);
var signedStr = genSignStr(convertUrl, postStr);
var encryptStr = "sign=" + signedStr;
var encryptSignStr = fxCry.encryptByDES(encryptStr, config.secretKey);
encryptSignStr = encodeURIComponent(encryptSignStr);
return urlencode(convertUrl) + "&_p=" + encryptSignStr;
};
var HttpUtil_1;
HttpUtil = HttpUtil_1 = __decorate([
ccclass ccclass
], HttpUtil); ], HttpUtil);
return HttpUtil; return HttpUtil;
@ -175,8 +207,8 @@ function responseHandler(response) {
// 响应拦截器 // 响应拦截器
// Rq.interceptors.response.use(responseHandler) // Rq.interceptors.response.use(responseHandler)
var config = { var config = {
gameId: "100009", gameId: "100010",
secretKey: "CMNhOzBA", secretKey: "wozrGKsL",
EK: "hui231%1" EK: "hui231%1"
}; };
var Crypoto = /** @class */ (function () { var Crypoto = /** @class */ (function () {
@ -289,24 +321,5 @@ function urlencode(url) {
var params = new URLSearchParams(queryString); var params = new URLSearchParams(queryString);
return baseUrl + "?" + params.toString(); return baseUrl + "?" + params.toString();
} }
/**
*
* @param url {string} 接口地址
* @param params {object} 需要加密的参数对象
*/
function apiSign(url, params) {
if (params === void 0) { params = {}; }
var convertUrl = url.trim();
if (convertUrl.indexOf('?') === -1) {
convertUrl += '?';
}
// 传入参数转换拼接字符串
var postStr = getQueryString(params);
var signedStr = genSignStr(convertUrl, postStr);
var encryptStr = "sign=" + signedStr;
var encryptSignStr = fxCry.encryptByDES(encryptStr, config.secretKey);
encryptSignStr = encodeURIComponent(encryptSignStr);
return urlencode(convertUrl) + "&_p=" + encryptSignStr;
}
cc._RF.pop(); cc._RF.pop();

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,6 @@
{
"__type__": "cc.Asset",
"_name": "Share",
"_objFlags": 0,
"_native": ".zip"
}

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@ -39,7 +39,9 @@ var ItemRender = /** @class */ (function (_super) {
cc.fx.GameTool.subName(this.data.name, 6); cc.fx.GameTool.subName(this.data.name, 6);
this.node.getChildByName("rankLab").getComponent(cc.Label).string = this.data.rank + ""; this.node.getChildByName("rankLab").getComponent(cc.Label).string = this.data.rank + "";
this.node.getChildByName("nameLab").getComponent(cc.Label).string = this.data.name + ""; this.node.getChildByName("nameLab").getComponent(cc.Label).string = this.data.name + "";
this.node.getChildByName("totalLab").getComponent(cc.Label).string = this.data.total + ""; this.node.getChildByName("totalLab").getComponent(cc.Label).string = this.data.total + "%";
var timeTemp = cc.fx.GameTool.getTimeShenNong(this.data.time);
this.node.getChildByName("timeLab").getComponent(cc.Label).string = timeTemp + "";
this.node.getChildByName("rank").getChildByName("one").active = false; this.node.getChildByName("rank").getChildByName("one").active = false;
this.node.getChildByName("rank").getChildByName("two").active = false; this.node.getChildByName("rank").getChildByName("two").active = false;
this.node.getChildByName("rank").getChildByName("three").active = false; this.node.getChildByName("rank").getChildByName("three").active = false;

File diff suppressed because one or more lines are too long

View File

@ -10,8 +10,8 @@
"relativePath": "Scene" "relativePath": "Scene"
}, },
"4734c20c-0db8-4eb2-92ea-e692f4d70934": { "4734c20c-0db8-4eb2-92ea-e692f4d70934": {
"asset": 1718619692438, "asset": 1718679055991,
"meta": 1718619784996, "meta": 1720605517840,
"relativePath": "Script" "relativePath": "Script"
}, },
"7b81d4e8-ec84-4716-968d-500ac1d78a54": { "7b81d4e8-ec84-4716-968d-500ac1d78a54": {
@ -50,8 +50,8 @@
"relativePath": "music" "relativePath": "music"
}, },
"bf3935ca-518a-42f4-84e4-ad96badfd1b4": { "bf3935ca-518a-42f4-84e4-ad96badfd1b4": {
"asset": 1718619692406, "asset": 1718678335895,
"meta": 1718619784992, "meta": 1720605517839,
"relativePath": "prefab" "relativePath": "prefab"
}, },
"52e78fe3-9095-42ad-8e4d-f9bb12dc69ce": { "52e78fe3-9095-42ad-8e4d-f9bb12dc69ce": {
@ -80,48 +80,48 @@
"relativePath": "Scene\\GameScene.fire" "relativePath": "Scene\\GameScene.fire"
}, },
"eaa8b84d-69d0-4170-9f7d-8179ea948cde": { "eaa8b84d-69d0-4170-9f7d-8179ea948cde": {
"asset": 1718619692478, "asset": 1720605318013,
"meta": 1718619785000, "meta": 1720605517842,
"relativePath": "Script\\module" "relativePath": "Script\\module"
}, },
"8848cd9b-8115-456d-a656-2abcda1dadbe": { "8848cd9b-8115-456d-a656-2abcda1dadbe": {
"asset": 1718619692450, "asset": 1718619692450,
"meta": 1718619785002, "meta": 1720605517844,
"relativePath": "Script\\module\\Config" "relativePath": "Script\\module\\Config"
}, },
"13a0b173-d59e-4a9d-b5e3-4dbe4dc37cc1": { "13a0b173-d59e-4a9d-b5e3-4dbe4dc37cc1": {
"asset": 1718619692458, "asset": 1718619692458,
"meta": 1718619785003, "meta": 1720605517844,
"relativePath": "Script\\module\\Crypto" "relativePath": "Script\\module\\Crypto"
}, },
"b4e113c6-a987-4133-bfa0-3355d8ab4bd1": { "b4e113c6-a987-4133-bfa0-3355d8ab4bd1": {
"asset": 1718619692462, "asset": 1718619692462,
"meta": 1718619785004, "meta": 1720605517845,
"relativePath": "Script\\module\\GameStart" "relativePath": "Script\\module\\GameStart"
}, },
"0487cacb-b94a-4ab6-a301-b6402ab0ac5d": { "0487cacb-b94a-4ab6-a301-b6402ab0ac5d": {
"asset": 1718619692462, "asset": 1718619692462,
"meta": 1718619785004, "meta": 1720605517846,
"relativePath": "Script\\module\\Music" "relativePath": "Script\\module\\Music"
}, },
"ff6560d9-676d-42ad-8ec7-e44acb84ad9e": { "ff6560d9-676d-42ad-8ec7-e44acb84ad9e": {
"asset": 1718619692466, "asset": 1718619692466,
"meta": 1718619785005, "meta": 1720605517847,
"relativePath": "Script\\module\\Notification" "relativePath": "Script\\module\\Notification"
}, },
"d3520299-33dc-43d2-b522-d424efb5575d": { "d3520299-33dc-43d2-b522-d424efb5575d": {
"asset": 1718619692474, "asset": 1718619692474,
"meta": 1718619785006, "meta": 1720605517847,
"relativePath": "Script\\module\\RankList" "relativePath": "Script\\module\\RankList"
}, },
"2af8f2ef-b8a0-43ad-a144-ef4a887f2fa9": { "2af8f2ef-b8a0-43ad-a144-ef4a887f2fa9": {
"asset": 1718619692478, "asset": 1718619692478,
"meta": 1718619785007, "meta": 1720605517849,
"relativePath": "Script\\module\\Storage" "relativePath": "Script\\module\\Storage"
}, },
"2a81f82d-8d16-44af-b947-44eea4dde54f": { "2a81f82d-8d16-44af-b947-44eea4dde54f": {
"asset": 1718619692482, "asset": 1718619692482,
"meta": 1718619785008, "meta": 1720605517850,
"relativePath": "Script\\module\\Tool" "relativePath": "Script\\module\\Tool"
}, },
"e64e1a97-c93f-4257-ab34-80341d8ff79d": { "e64e1a97-c93f-4257-ab34-80341d8ff79d": {
@ -150,18 +150,18 @@
"relativePath": "Script\\module\\Storage\\Storage.ts" "relativePath": "Script\\module\\Storage\\Storage.ts"
}, },
"771a3d9a-4013-4654-a777-fbaea0c93280": { "771a3d9a-4013-4654-a777-fbaea0c93280": {
"asset": 1718273919621, "asset": 1720412209513,
"meta": 1718346430400, "meta": 1720605518151,
"relativePath": "Script\\module\\Crypto\\HttpUtil.ts" "relativePath": "Script\\module\\Crypto\\HttpUtil.ts"
}, },
"58403fe7-d7a2-426b-9b19-84d3236731a8": { "58403fe7-d7a2-426b-9b19-84d3236731a8": {
"asset": 1718605933965, "asset": 1720174805252,
"meta": 1718606212381, "meta": 1720605518223,
"relativePath": "Script\\module\\Music\\AudioManager.ts" "relativePath": "Script\\module\\Music\\AudioManager.ts"
}, },
"9c08062d-4cf1-4b6e-a8ba-4a3881cc7e7d": { "9c08062d-4cf1-4b6e-a8ba-4a3881cc7e7d": {
"asset": 1718681719453, "asset": 1720606674576,
"meta": 1718681719457, "meta": 1720606674582,
"relativePath": "Scene\\LoadScene.fire" "relativePath": "Scene\\LoadScene.fire"
}, },
"805c69df-dfdf-4759-97ae-5a7341f424c7": { "805c69df-dfdf-4759-97ae-5a7341f424c7": {
@ -170,18 +170,18 @@
"relativePath": "Script\\GameOver.ts" "relativePath": "Script\\GameOver.ts"
}, },
"61d4c718-db3b-4b31-8221-f16bea3cf030": { "61d4c718-db3b-4b31-8221-f16bea3cf030": {
"asset": 1718607502756, "asset": 1720411081997,
"meta": 1718607561350, "meta": 1720605518172,
"relativePath": "Script\\module\\GameStart\\GameAppStart.ts" "relativePath": "Script\\module\\GameStart\\GameAppStart.ts"
}, },
"ca0f9934-a015-436e-9402-f8e30d4c5de6": { "ca0f9934-a015-436e-9402-f8e30d4c5de6": {
"asset": 1718607319459, "asset": 1719476024626,
"meta": 1718607561362, "meta": 1720605518248,
"relativePath": "Script\\module\\RankList\\ItemRender.ts" "relativePath": "Script\\module\\RankList\\ItemRender.ts"
}, },
"43bfc27a-ff6e-45b3-87c7-504d0f781397": { "43bfc27a-ff6e-45b3-87c7-504d0f781397": {
"asset": 1718607249147, "asset": 1720412213923,
"meta": 1718607561393, "meta": 1720605518351,
"relativePath": "Script\\module\\Tool\\GameTool.ts" "relativePath": "Script\\module\\Tool\\GameTool.ts"
}, },
"e74a9f7d-2031-4e69-bcb2-9998174088b2": { "e74a9f7d-2031-4e69-bcb2-9998174088b2": {
@ -200,8 +200,8 @@
"relativePath": "resources\\Json\\CLICK_DATA.json" "relativePath": "resources\\Json\\CLICK_DATA.json"
}, },
"2cddbdcb-5dba-4b13-960c-9ebe6d17a7db": { "2cddbdcb-5dba-4b13-960c-9ebe6d17a7db": {
"asset": 1718614465765, "asset": 1718692696758,
"meta": 1718614747332, "meta": 1720605518355,
"relativePath": "resources\\Json\\LEVEL_INFO.json" "relativePath": "resources\\Json\\LEVEL_INFO.json"
}, },
"b0432040-dbde-438c-839c-ba2b5d18a3b5": { "b0432040-dbde-438c-839c-ba2b5d18a3b5": {
@ -210,8 +210,8 @@
"relativePath": "Script\\GameManager.ts" "relativePath": "Script\\GameManager.ts"
}, },
"066e91c2-fc55-407c-b061-9e4de4a9f224": { "066e91c2-fc55-407c-b061-9e4de4a9f224": {
"asset": 1718619692418, "asset": 1718693420194,
"meta": 1718619785000, "meta": 1720605517841,
"relativePath": "resources\\Json" "relativePath": "resources\\Json"
}, },
"badb56f7-1c07-4fbb-87e6-5bfd805fe81b": { "badb56f7-1c07-4fbb-87e6-5bfd805fe81b": {
@ -226,502 +226,502 @@
}, },
"9836134e-b892-4283-b6b2-78b5acf3ed45": { "9836134e-b892-4283-b6b2-78b5acf3ed45": {
"asset": 1714966328642, "asset": 1714966328642,
"meta": 1718679174859, "meta": 1720605515002,
"relativePath": "effects" "relativePath": "effects"
}, },
"abc2cb62-7852-4525-a90d-d474487b88f2": { "abc2cb62-7852-4525-a90d-d474487b88f2": {
"asset": 1714966328642, "asset": 1714966328642,
"meta": 1718679174912, "meta": 1720605515140,
"relativePath": "effects\\builtin-phong.effect" "relativePath": "effects\\builtin-phong.effect"
}, },
"e2f00085-c597-422d-9759-52c360279106": { "e2f00085-c597-422d-9759-52c360279106": {
"asset": 1714966328642, "asset": 1714966328642,
"meta": 1718679174942, "meta": 1720605515198,
"relativePath": "effects\\builtin-toon.effect" "relativePath": "effects\\builtin-toon.effect"
}, },
"430eccbf-bf2c-4e6e-8c0c-884bbb487f32": { "430eccbf-bf2c-4e6e-8c0c-884bbb487f32": {
"asset": 1714966328642, "asset": 1714966328642,
"meta": 1718679174949, "meta": 1720605515216,
"relativePath": "effects\\__builtin-editor-gizmo-line.effect" "relativePath": "effects\\__builtin-editor-gizmo-line.effect"
}, },
"6c5cf6e1-b044-4eac-9431-835644d57381": { "6c5cf6e1-b044-4eac-9431-835644d57381": {
"asset": 1714966328642, "asset": 1714966328642,
"meta": 1718679174956, "meta": 1720605515225,
"relativePath": "effects\\__builtin-editor-gizmo-unlit.effect" "relativePath": "effects\\__builtin-editor-gizmo-unlit.effect"
}, },
"115286d1-2e10-49ee-aab4-341583f607e8": { "115286d1-2e10-49ee-aab4-341583f607e8": {
"asset": 1714966328642, "asset": 1714966328642,
"meta": 1718679174967, "meta": 1720605515260,
"relativePath": "effects\\__builtin-editor-gizmo.effect" "relativePath": "effects\\__builtin-editor-gizmo.effect"
}, },
"f8e6b000-5643-4b86-9080-aa680ce1f599": { "f8e6b000-5643-4b86-9080-aa680ce1f599": {
"asset": 1714966328706, "asset": 1714966328706,
"meta": 1718679174968, "meta": 1720605515003,
"relativePath": "image" "relativePath": "image"
}, },
"5c3eedba-6c41-4c0c-9ba7-d91f813cbd1c": { "5c3eedba-6c41-4c0c-9ba7-d91f813cbd1c": {
"asset": 1714966328721, "asset": 1714966328721,
"meta": 1718679175019, "meta": 1720605515005,
"relativePath": "materials" "relativePath": "materials"
}, },
"fc09f9bd-2cce-4605-b630-8145ef809ed6": { "fc09f9bd-2cce-4605-b630-8145ef809ed6": {
"asset": 1714966328721, "asset": 1714966328721,
"meta": 1718679175025, "meta": 1720605515006,
"relativePath": "misc" "relativePath": "misc"
}, },
"e851e89b-faa2-4484-bea6-5c01dd9f06e2": { "e851e89b-faa2-4484-bea6-5c01dd9f06e2": {
"asset": 1714966328658, "asset": 1714966328658,
"meta": 1718679175003, "meta": 1720605515325,
"relativePath": "image\\default_btn_normal.png" "relativePath": "image\\default_btn_normal.png"
}, },
"db019bf7-f71c-4111-98cf-918ea180cb48": { "db019bf7-f71c-4111-98cf-918ea180cb48": {
"asset": 1714966328737, "asset": 1714966328737,
"meta": 1718679175029, "meta": 1720605515008,
"relativePath": "model" "relativePath": "model"
}, },
"4bab67cb-18e6-4099-b840-355f0473f890": { "4bab67cb-18e6-4099-b840-355f0473f890": {
"asset": 1714966328689, "asset": 1714966328689,
"meta": 1718679175011, "meta": 1720605515395,
"relativePath": "image\\default_scrollbar_bg.png" "relativePath": "image\\default_scrollbar_bg.png"
}, },
"e39e96e6-6f6e-413f-bcf1-ac7679bb648a": { "e39e96e6-6f6e-413f-bcf1-ac7679bb648a": {
"asset": 1714966328737, "asset": 1714966328737,
"meta": 1718679175032, "meta": 1720605515333,
"relativePath": "model\\prefab" "relativePath": "model\\prefab"
}, },
"617323dd-11f4-4dd3-8eec-0caf6b3b45b9": { "617323dd-11f4-4dd3-8eec-0caf6b3b45b9": {
"asset": 1714966328689, "asset": 1714966328689,
"meta": 1718679175013, "meta": 1720605515383,
"relativePath": "image\\default_scrollbar_vertical_bg.png" "relativePath": "image\\default_scrollbar_vertical_bg.png"
}, },
"71561142-4c83-4933-afca-cb7a17f67053": { "71561142-4c83-4933-afca-cb7a17f67053": {
"asset": 1714966328658, "asset": 1714966328658,
"meta": 1718679175016, "meta": 1720605515331,
"relativePath": "image\\default_btn_disabled.png" "relativePath": "image\\default_btn_disabled.png"
}, },
"600301aa-3357-4a10-b086-84f011fa32ba": { "600301aa-3357-4a10-b086-84f011fa32ba": {
"asset": 1714966328642, "asset": 1714966328642,
"meta": 1718679175018, "meta": 1720605515379,
"relativePath": "image\\default-particle.png" "relativePath": "image\\default-particle.png"
}, },
"edd215b9-2796-4a05-aaf5-81f96c9281ce": { "edd215b9-2796-4a05-aaf5-81f96c9281ce": {
"asset": 1714966328658, "asset": 1714966328658,
"meta": 1718679175023, "meta": 1720605515317,
"relativePath": "image\\default_editbox_bg.png" "relativePath": "image\\default_editbox_bg.png"
}, },
"b43ff3c2-02bb-4874-81f7-f2dea6970f18": { "b43ff3c2-02bb-4874-81f7-f2dea6970f18": {
"asset": 1714966328658, "asset": 1714966328658,
"meta": 1718679175027, "meta": 1720605515329,
"relativePath": "image\\default_btn_pressed.png" "relativePath": "image\\default_btn_pressed.png"
}, },
"567dcd80-8bf4-4535-8a5a-313f1caf078a": { "567dcd80-8bf4-4535-8a5a-313f1caf078a": {
"asset": 1714966328673, "asset": 1714966328673,
"meta": 1718679175030, "meta": 1720605515315,
"relativePath": "image\\default_radio_button_off.png" "relativePath": "image\\default_radio_button_off.png"
}, },
"cfef78f1-c8df-49b7-8ed0-4c953ace2621": { "cfef78f1-c8df-49b7-8ed0-4c953ace2621": {
"asset": 1714966328673, "asset": 1714966328673,
"meta": 1718679175035, "meta": 1720605515320,
"relativePath": "image\\default_progressbar.png" "relativePath": "image\\default_progressbar.png"
}, },
"f6e6dd15-71d1-4ffe-ace7-24fd39942c05": { "f6e6dd15-71d1-4ffe-ace7-24fd39942c05": {
"asset": 1714966328752, "asset": 1714966328752,
"meta": 1718679175069, "meta": 1720605515009,
"relativePath": "obsolete" "relativePath": "obsolete"
}, },
"0291c134-b3da-4098-b7b5-e397edbe947f": { "0291c134-b3da-4098-b7b5-e397edbe947f": {
"asset": 1714966328689, "asset": 1714966328689,
"meta": 1718679175055, "meta": 1720605515377,
"relativePath": "image\\default_scrollbar.png" "relativePath": "image\\default_scrollbar.png"
}, },
"c4480a0a-6ac5-443f-8b40-361a14257fc8": { "c4480a0a-6ac5-443f-8b40-361a14257fc8": {
"asset": 1714966328706, "asset": 1714966328706,
"meta": 1718679175366, "meta": 1720605515755,
"relativePath": "materials\\builtin-phong.mtl" "relativePath": "materials\\builtin-phong.mtl"
}, },
"f743d2b6-b7ea-4c14-a55b-547ed4d0a045": { "f743d2b6-b7ea-4c14-a55b-547ed4d0a045": {
"asset": 1714966328752, "asset": 1714966328752,
"meta": 1718679175073, "meta": 1720605515010,
"relativePath": "particle" "relativePath": "particle"
}, },
"9d60001f-b5f4-4726-a629-2659e3ded0b8": { "9d60001f-b5f4-4726-a629-2659e3ded0b8": {
"asset": 1714966328673, "asset": 1714966328673,
"meta": 1718679175057, "meta": 1720605515381,
"relativePath": "image\\default_radio_button_on.png" "relativePath": "image\\default_radio_button_on.png"
}, },
"a87cc147-01b2-43f8-8e42-a7ca90b0c757": { "a87cc147-01b2-43f8-8e42-a7ca90b0c757": {
"asset": 1714966328721, "asset": 1714966328721,
"meta": 1718679175074, "meta": 1720605515674,
"relativePath": "model\\prefab\\box.prefab" "relativePath": "model\\prefab\\box.prefab"
}, },
"d81ec8ad-247c-4e62-aa3c-d35c4193c7af": { "d81ec8ad-247c-4e62-aa3c-d35c4193c7af": {
"asset": 1714966328673, "asset": 1714966328673,
"meta": 1718679175058, "meta": 1720605515386,
"relativePath": "image\\default_panel.png" "relativePath": "image\\default_panel.png"
}, },
"fe1417b6-fe6b-46a4-ae7c-9fd331f33a2a": { "fe1417b6-fe6b-46a4-ae7c-9fd331f33a2a": {
"asset": 1714966328737, "asset": 1714966328737,
"meta": 1718679175077, "meta": 1720605515677,
"relativePath": "model\\prefab\\capsule.prefab" "relativePath": "model\\prefab\\capsule.prefab"
}, },
"ae6c6c98-11e4-452f-8758-75f5c6a56e83": { "ae6c6c98-11e4-452f-8758-75f5c6a56e83": {
"asset": 1714966328831, "asset": 1714966328831,
"meta": 1718679175078, "meta": 1720605515011,
"relativePath": "prefab" "relativePath": "prefab"
}, },
"d6d3ca85-4681-47c1-b5dd-d036a9d39ea2": { "d6d3ca85-4681-47c1-b5dd-d036a9d39ea2": {
"asset": 1714966328689, "asset": 1714966328689,
"meta": 1718679175060, "meta": 1720605515392,
"relativePath": "image\\default_scrollbar_vertical.png" "relativePath": "image\\default_scrollbar_vertical.png"
}, },
"b5fc2cf2-7942-483d-be1f-bbeadc4714ad": { "b5fc2cf2-7942-483d-be1f-bbeadc4714ad": {
"asset": 1714966328737, "asset": 1714966328737,
"meta": 1718679175081, "meta": 1720605515670,
"relativePath": "model\\prefab\\cone.prefab" "relativePath": "model\\prefab\\cone.prefab"
}, },
"1c5e4038-953a-44c2-b620-0bbfc6170477": { "1c5e4038-953a-44c2-b620-0bbfc6170477": {
"asset": 1714966328737, "asset": 1714966328737,
"meta": 1718679175083, "meta": 1720605515680,
"relativePath": "model\\prefab\\cylinder.prefab" "relativePath": "model\\prefab\\cylinder.prefab"
}, },
"99170b0b-d210-46f1-b213-7d9e3f23098a": { "99170b0b-d210-46f1-b213-7d9e3f23098a": {
"asset": 1714966328673, "asset": 1714966328673,
"meta": 1718679175062, "meta": 1720605515322,
"relativePath": "image\\default_progressbar_bg.png" "relativePath": "image\\default_progressbar_bg.png"
}, },
"3f376125-a699-40ca-ad05-04d662eaa1f2": { "3f376125-a699-40ca-ad05-04d662eaa1f2": {
"asset": 1714966328737, "asset": 1714966328737,
"meta": 1718679175084, "meta": 1720605515672,
"relativePath": "model\\prefab\\plane.prefab" "relativePath": "model\\prefab\\plane.prefab"
}, },
"6c9ef10d-b479-420b-bfe6-39cdda6a8ae0": { "6c9ef10d-b479-420b-bfe6-39cdda6a8ae0": {
"asset": 1714966328737, "asset": 1714966328737,
"meta": 1718679175087, "meta": 1720605515684,
"relativePath": "model\\prefab\\quad.prefab" "relativePath": "model\\prefab\\quad.prefab"
}, },
"6e056173-d285-473c-b206-40a7fff5386e": { "6e056173-d285-473c-b206-40a7fff5386e": {
"asset": 1714966328689, "asset": 1714966328689,
"meta": 1718679175064, "meta": 1720605515390,
"relativePath": "image\\default_sprite.png" "relativePath": "image\\default_sprite.png"
}, },
"2d9a4b85-b0ab-4c46-84c5-18f393ab2058": { "2d9a4b85-b0ab-4c46-84c5-18f393ab2058": {
"asset": 1714966328737, "asset": 1714966328737,
"meta": 1718679175090, "meta": 1720605515689,
"relativePath": "model\\prefab\\sphere.prefab" "relativePath": "model\\prefab\\sphere.prefab"
}, },
"de510076-056b-484f-b94c-83bef217d0e1": { "de510076-056b-484f-b94c-83bef217d0e1": {
"asset": 1714966328737, "asset": 1714966328737,
"meta": 1718679175092, "meta": 1720605515675,
"relativePath": "model\\prefab\\torus.prefab" "relativePath": "model\\prefab\\torus.prefab"
}, },
"0275e94c-56a7-410f-bd1a-fc7483f7d14a": { "0275e94c-56a7-410f-bd1a-fc7483f7d14a": {
"asset": 1714966328705, "asset": 1714966328705,
"meta": 1718679175068, "meta": 1720605515388,
"relativePath": "image\\default_sprite_splash.png" "relativePath": "image\\default_sprite_splash.png"
}, },
"897ef7a1-4860-4f64-968d-f5924b18668a": { "897ef7a1-4860-4f64-968d-f5924b18668a": {
"asset": 1714966328752, "asset": 1714966328752,
"meta": 1718679175098, "meta": 1720605515401,
"relativePath": "prefab\\2d-camera.prefab" "relativePath": "prefab\\2d-camera.prefab"
}, },
"70d7cdb0-04cd-41bb-9480-c06a4785f386": { "70d7cdb0-04cd-41bb-9480-c06a4785f386": {
"asset": 1714966328768, "asset": 1714966328768,
"meta": 1718679175102, "meta": 1720605515404,
"relativePath": "prefab\\3d-camera.prefab" "relativePath": "prefab\\3d-camera.prefab"
}, },
"a3ee0214-b432-4865-9666-4a3211814282": { "a3ee0214-b432-4865-9666-4a3211814282": {
"asset": 1714966328800, "asset": 1714966328800,
"meta": 1718679175103, "meta": 1720605515405,
"relativePath": "prefab\\light" "relativePath": "prefab\\light"
}, },
"ed88f13d-fcad-4848-aa35-65a2cb973584": { "ed88f13d-fcad-4848-aa35-65a2cb973584": {
"asset": 1714966328768, "asset": 1714966328768,
"meta": 1718679175106, "meta": 1720605515412,
"relativePath": "prefab\\3d-stage.prefab" "relativePath": "prefab\\3d-stage.prefab"
}, },
"61aeb05b-3b32-452b-8eed-2b76deeed554": { "61aeb05b-3b32-452b-8eed-2b76deeed554": {
"asset": 1714966328783, "asset": 1714966328783,
"meta": 1718679175108, "meta": 1720605515419,
"relativePath": "prefab\\editbox.prefab" "relativePath": "prefab\\editbox.prefab"
}, },
"972b9a4d-47ee-4c74-b5c3-61d8a69bc29f": { "972b9a4d-47ee-4c74-b5c3-61d8a69bc29f": {
"asset": 1714966328768, "asset": 1714966328768,
"meta": 1718679175110, "meta": 1720605515407,
"relativePath": "prefab\\button.prefab" "relativePath": "prefab\\button.prefab"
}, },
"70bbeb73-6dc2-4ee4-8faf-76b3a0e34ec4": { "70bbeb73-6dc2-4ee4-8faf-76b3a0e34ec4": {
"asset": 1714966328768, "asset": 1714966328768,
"meta": 1718679175113, "meta": 1720605515410,
"relativePath": "prefab\\3d-particle.prefab" "relativePath": "prefab\\3d-particle.prefab"
}, },
"2c937608-2562-40ea-b264-7395df6f0cea": { "2c937608-2562-40ea-b264-7395df6f0cea": {
"asset": 1714966328768, "asset": 1714966328768,
"meta": 1718679175115, "meta": 1720605515416,
"relativePath": "prefab\\canvas.prefab" "relativePath": "prefab\\canvas.prefab"
}, },
"27756ebb-3d33-44b0-9b96-e858fadd4dd4": { "27756ebb-3d33-44b0-9b96-e858fadd4dd4": {
"asset": 1714966328783, "asset": 1714966328783,
"meta": 1718679175119, "meta": 1720605515424,
"relativePath": "prefab\\label.prefab" "relativePath": "prefab\\label.prefab"
}, },
"785a442c-3ceb-45be-a46e-7317f625f3b9": { "785a442c-3ceb-45be-a46e-7317f625f3b9": {
"asset": 1714966328783, "asset": 1714966328783,
"meta": 1718679175138, "meta": 1720605515427,
"relativePath": "prefab\\layout.prefab" "relativePath": "prefab\\layout.prefab"
}, },
"2be36297-9abb-4fee-8049-9ed5e271da8a": { "2be36297-9abb-4fee-8049-9ed5e271da8a": {
"asset": 1714966328721, "asset": 1714966328721,
"meta": 1718679175144, "meta": 1720605515487,
"relativePath": "misc\\default_video.mp4" "relativePath": "misc\\default_video.mp4"
}, },
"4a37dd57-78cd-4cec-aad4-f11a73d12b63": { "4a37dd57-78cd-4cec-aad4-f11a73d12b63": {
"asset": 1714966328800, "asset": 1714966328800,
"meta": 1718679175149, "meta": 1720605515432,
"relativePath": "prefab\\richtext.prefab" "relativePath": "prefab\\richtext.prefab"
}, },
"cd33edea-55f5-46c2-958d-357a01384a36": { "cd33edea-55f5-46c2-958d-357a01384a36": {
"asset": 1714966328800, "asset": 1714966328800,
"meta": 1718679175151, "meta": 1720605515429,
"relativePath": "prefab\\particlesystem.prefab" "relativePath": "prefab\\particlesystem.prefab"
}, },
"ca8401fe-ad6e-41a8-bd46-8e3e4e9945be": { "ca8401fe-ad6e-41a8-bd46-8e3e4e9945be": {
"asset": 1714966328800, "asset": 1714966328800,
"meta": 1718679175153, "meta": 1720605515434,
"relativePath": "prefab\\pageview.prefab" "relativePath": "prefab\\pageview.prefab"
}, },
"5965ffac-69da-4b55-bcde-9225d0613c28": { "5965ffac-69da-4b55-bcde-9225d0613c28": {
"asset": 1714966328800, "asset": 1714966328800,
"meta": 1718679175155, "meta": 1720605515436,
"relativePath": "prefab\\progressBar.prefab" "relativePath": "prefab\\progressBar.prefab"
}, },
"c25b9d50-c8fc-4d27-beeb-6e7c1f2e5c0f": { "c25b9d50-c8fc-4d27-beeb-6e7c1f2e5c0f": {
"asset": 1714966328706, "asset": 1714966328706,
"meta": 1718679175135, "meta": 1720605515463,
"relativePath": "image\\default_toggle_disabled.png" "relativePath": "image\\default_toggle_disabled.png"
}, },
"32044bd2-481f-4cf1-a656-e2b2fb1594eb": { "32044bd2-481f-4cf1-a656-e2b2fb1594eb": {
"asset": 1714966328800, "asset": 1714966328800,
"meta": 1718679175158, "meta": 1720605515439,
"relativePath": "prefab\\scrollview.prefab" "relativePath": "prefab\\scrollview.prefab"
}, },
"0004d1cf-a0ad-47d8-ab17-34d3db9d35a3": { "0004d1cf-a0ad-47d8-ab17-34d3db9d35a3": {
"asset": 1714966328800, "asset": 1714966328800,
"meta": 1718679175160, "meta": 1720605515441,
"relativePath": "prefab\\slider.prefab" "relativePath": "prefab\\slider.prefab"
}, },
"96083d03-c332-4a3f-9386-d03e2d19e8ee": { "96083d03-c332-4a3f-9386-d03e2d19e8ee": {
"asset": 1714966328815, "asset": 1714966328815,
"meta": 1718679175165, "meta": 1720605515450,
"relativePath": "prefab\\sprite.prefab" "relativePath": "prefab\\sprite.prefab"
}, },
"b181c1e4-0a72-4a91-bfb0-ae6f36ca60bd": { "b181c1e4-0a72-4a91-bfb0-ae6f36ca60bd": {
"asset": 1714966328706, "asset": 1714966328706,
"meta": 1718679175142, "meta": 1720605515472,
"relativePath": "image\\default_toggle_pressed.png" "relativePath": "image\\default_toggle_pressed.png"
}, },
"d8afc78c-4eac-4a9f-83dd-67bc70344d33": { "d8afc78c-4eac-4a9f-83dd-67bc70344d33": {
"asset": 1714966328862, "asset": 1714966328862,
"meta": 1718679175166, "meta": 1720605515012,
"relativePath": "resources" "relativePath": "resources"
}, },
"294c1663-4adf-4a1e-a795-53808011a38a": { "294c1663-4adf-4a1e-a795-53808011a38a": {
"asset": 1714966328862, "asset": 1714966328862,
"meta": 1718679175168, "meta": 1720605515464,
"relativePath": "resources\\effects" "relativePath": "resources\\effects"
}, },
"73a0903d-d80e-4e3c-aa67-f999543c08f5": { "73a0903d-d80e-4e3c-aa67-f999543c08f5": {
"asset": 1714966328706, "asset": 1714966328706,
"meta": 1718679175146, "meta": 1720605515492,
"relativePath": "image\\default_toggle_checkmark.png" "relativePath": "image\\default_toggle_checkmark.png"
}, },
"bbee2217-c261-49bd-a8ce-708d6bcc3500": { "bbee2217-c261-49bd-a8ce-708d6bcc3500": {
"asset": 1714966328893, "asset": 1714966328893,
"meta": 1718679175171, "meta": 1720605515466,
"relativePath": "resources\\materials" "relativePath": "resources\\materials"
}, },
"d29077ba-1627-4a72-9579-7b56a235340c": { "d29077ba-1627-4a72-9579-7b56a235340c": {
"asset": 1714966328706, "asset": 1714966328706,
"meta": 1718679175147, "meta": 1720605515506,
"relativePath": "image\\default_toggle_normal.png" "relativePath": "image\\default_toggle_normal.png"
}, },
"30682f87-9f0d-4f17-8a44-72863791461b": { "30682f87-9f0d-4f17-8a44-72863791461b": {
"asset": 1714966328831, "asset": 1714966328831,
"meta": 1718679175181, "meta": 1720605515505,
"relativePath": "resources\\effects\\builtin-2d-graphics.effect" "relativePath": "resources\\effects\\builtin-2d-graphics.effect"
}, },
"144c3297-af63-49e8-b8ef-1cfa29b3be28": { "144c3297-af63-49e8-b8ef-1cfa29b3be28": {
"asset": 1714966328831, "asset": 1714966328831,
"meta": 1718679175189, "meta": 1720605515516,
"relativePath": "resources\\effects\\builtin-2d-gray-sprite.effect" "relativePath": "resources\\effects\\builtin-2d-gray-sprite.effect"
}, },
"1f55e3be-b89b-4b79-88de-47fd31018044": { "1f55e3be-b89b-4b79-88de-47fd31018044": {
"asset": 1714966328815, "asset": 1714966328815,
"meta": 1718679175191, "meta": 1720605515473,
"relativePath": "prefab\\sprite_splash.prefab" "relativePath": "prefab\\sprite_splash.prefab"
}, },
"f18742d7-56d2-4eb5-ae49-2d9d710b37c8": { "f18742d7-56d2-4eb5-ae49-2d9d710b37c8": {
"asset": 1714966328831, "asset": 1714966328831,
"meta": 1718679175200, "meta": 1720605515528,
"relativePath": "resources\\effects\\builtin-2d-label.effect" "relativePath": "resources\\effects\\builtin-2d-label.effect"
}, },
"7de03a80-4457-438d-95a7-3e7cdffd6086": { "7de03a80-4457-438d-95a7-3e7cdffd6086": {
"asset": 1714966328815, "asset": 1714966328815,
"meta": 1718679175206, "meta": 1720605515476,
"relativePath": "prefab\\tiledmap.prefab" "relativePath": "prefab\\tiledmap.prefab"
}, },
"0e93aeaa-0b53-4e40-b8e0-6268b4e07bd7": { "0e93aeaa-0b53-4e40-b8e0-6268b4e07bd7": {
"asset": 1714966328831, "asset": 1714966328831,
"meta": 1718679175214, "meta": 1720605515539,
"relativePath": "resources\\effects\\builtin-2d-spine.effect" "relativePath": "resources\\effects\\builtin-2d-spine.effect"
}, },
"2874f8dd-416c-4440-81b7-555975426e93": { "2874f8dd-416c-4440-81b7-555975426e93": {
"asset": 1714966328846, "asset": 1714966328846,
"meta": 1718679175223, "meta": 1720605515552,
"relativePath": "resources\\effects\\builtin-2d-sprite.effect" "relativePath": "resources\\effects\\builtin-2d-sprite.effect"
}, },
"829a282c-b049-4019-bd38-5ace8d8a6417": { "829a282c-b049-4019-bd38-5ace8d8a6417": {
"asset": 1714966328846, "asset": 1714966328846,
"meta": 1718679175275, "meta": 1720605515617,
"relativePath": "resources\\effects\\builtin-3d-particle.effect" "relativePath": "resources\\effects\\builtin-3d-particle.effect"
}, },
"2a7c0036-e0b3-4fe1-8998-89a54b8a2bec": { "2a7c0036-e0b3-4fe1-8998-89a54b8a2bec": {
"asset": 1714966328846, "asset": 1714966328846,
"meta": 1718679175289, "meta": 1720605515639,
"relativePath": "resources\\effects\\builtin-3d-trail.effect" "relativePath": "resources\\effects\\builtin-3d-trail.effect"
}, },
"8a96b965-2dc0-4e03-aa90-3b79cb93b5b4": { "8a96b965-2dc0-4e03-aa90-3b79cb93b5b4": {
"asset": 1714966328752, "asset": 1714966328752,
"meta": 1718679175171, "meta": 1720605515468,
"relativePath": "obsolete\\atom.png" "relativePath": "obsolete\\atom.png"
}, },
"c0040c95-c57f-49cd-9cbc-12316b73d0d4": { "c0040c95-c57f-49cd-9cbc-12316b73d0d4": {
"asset": 1714966328846, "asset": 1714966328846,
"meta": 1718679175293, "meta": 1720605515647,
"relativePath": "resources\\effects\\builtin-clear-stencil.effect" "relativePath": "resources\\effects\\builtin-clear-stencil.effect"
}, },
"6d91e591-4ce0-465c-809f-610ec95019c6": { "6d91e591-4ce0-465c-809f-610ec95019c6": {
"asset": 1714966328862, "asset": 1714966328862,
"meta": 1718679175303, "meta": 1720605515664,
"relativePath": "resources\\effects\\builtin-unlit.effect" "relativePath": "resources\\effects\\builtin-unlit.effect"
}, },
"0e42ba95-1fa1-46aa-b2cf-143cd1bcee2c": { "0e42ba95-1fa1-46aa-b2cf-143cd1bcee2c": {
"asset": 1714966328815, "asset": 1714966328815,
"meta": 1718679175306, "meta": 1720605515478,
"relativePath": "prefab\\tiledtile.prefab" "relativePath": "prefab\\tiledtile.prefab"
}, },
"0d784963-d024-4ea6-a7db-03be0ad63010": { "0d784963-d024-4ea6-a7db-03be0ad63010": {
"asset": 1714966328815, "asset": 1714966328815,
"meta": 1718679175309, "meta": 1720605515481,
"relativePath": "prefab\\toggle.prefab" "relativePath": "prefab\\toggle.prefab"
}, },
"bf0a434c-84dd-4a8e-a08a-7a36f180cc75": { "bf0a434c-84dd-4a8e-a08a-7a36f180cc75": {
"asset": 1714966328815, "asset": 1714966328815,
"meta": 1718679175312, "meta": 1720605515483,
"relativePath": "prefab\\toggleContainer.prefab" "relativePath": "prefab\\toggleContainer.prefab"
}, },
"d1b8be49-b0a0-435c-83b7-552bed4bbe35": { "d1b8be49-b0a0-435c-83b7-552bed4bbe35": {
"asset": 1714966328815, "asset": 1714966328815,
"meta": 1718679175314, "meta": 1720605515485,
"relativePath": "prefab\\toggleGroup.prefab" "relativePath": "prefab\\toggleGroup.prefab"
}, },
"232d2782-c4bd-4bb4-9e01-909f03d6d3b9": { "232d2782-c4bd-4bb4-9e01-909f03d6d3b9": {
"asset": 1714966328815, "asset": 1714966328815,
"meta": 1718679175315, "meta": 1720605515490,
"relativePath": "prefab\\videoplayer.prefab" "relativePath": "prefab\\videoplayer.prefab"
}, },
"61906da3-7003-4bda-9abc-5769c76faee4": { "61906da3-7003-4bda-9abc-5769c76faee4": {
"asset": 1714966328783, "asset": 1714966328783,
"meta": 1718679175317, "meta": 1720605515682,
"relativePath": "prefab\\light\\ambient.prefab" "relativePath": "prefab\\light\\ambient.prefab"
}, },
"8c5001fd-07ee-4a4b-a8a0-63e15195e94d": { "8c5001fd-07ee-4a4b-a8a0-63e15195e94d": {
"asset": 1714966328831, "asset": 1714966328831,
"meta": 1718679175318, "meta": 1720605515541,
"relativePath": "prefab\\webview.prefab" "relativePath": "prefab\\webview.prefab"
}, },
"d0a82d39-bede-46c4-b698-c81ff0dedfff": { "d0a82d39-bede-46c4-b698-c81ff0dedfff": {
"asset": 1714966328752, "asset": 1714966328752,
"meta": 1718679175215, "meta": 1720605515470,
"relativePath": "particle\\atom.png" "relativePath": "particle\\atom.png"
}, },
"f5331fd2-bf42-4ee3-a3fd-3e1657600eff": { "f5331fd2-bf42-4ee3-a3fd-3e1657600eff": {
"asset": 1714966328800, "asset": 1714966328800,
"meta": 1718679175320, "meta": 1720605515691,
"relativePath": "prefab\\light\\spot.prefab" "relativePath": "prefab\\light\\spot.prefab"
}, },
"0cf30284-9073-46bc-9eba-e62b69dbbff3": { "0cf30284-9073-46bc-9eba-e62b69dbbff3": {
"asset": 1714966328800, "asset": 1714966328800,
"meta": 1718679175322, "meta": 1720605515687,
"relativePath": "prefab\\light\\point.prefab" "relativePath": "prefab\\light\\point.prefab"
}, },
"ddb99b39-7004-47cd-9705-751905c43c46": { "ddb99b39-7004-47cd-9705-751905c43c46": {
"asset": 1714966328800, "asset": 1714966328800,
"meta": 1718679175324, "meta": 1720605515686,
"relativePath": "prefab\\light\\directional.prefab" "relativePath": "prefab\\light\\directional.prefab"
}, },
"6f801092-0c37-4f30-89ef-c8d960825b36": { "6f801092-0c37-4f30-89ef-c8d960825b36": {
"asset": 1714966328862, "asset": 1714966328862,
"meta": 1718679175384, "meta": 1720605515785,
"relativePath": "resources\\materials\\builtin-2d-base.mtl" "relativePath": "resources\\materials\\builtin-2d-base.mtl"
}, },
"a153945d-2511-4c14-be7b-05d242f47d57": { "a153945d-2511-4c14-be7b-05d242f47d57": {
"asset": 1714966328862, "asset": 1714966328862,
"meta": 1718679175385, "meta": 1720605515784,
"relativePath": "resources\\materials\\builtin-2d-graphics.mtl" "relativePath": "resources\\materials\\builtin-2d-graphics.mtl"
}, },
"eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432": { "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432": {
"asset": 1714966328878, "asset": 1714966328878,
"meta": 1718679175386, "meta": 1720605515791,
"relativePath": "resources\\materials\\builtin-2d-sprite.mtl" "relativePath": "resources\\materials\\builtin-2d-sprite.mtl"
}, },
"7afd064b-113f-480e-b793-8817d19f63c3": { "7afd064b-113f-480e-b793-8817d19f63c3": {
"asset": 1714966328878, "asset": 1714966328878,
"meta": 1718679175386, "meta": 1720605515792,
"relativePath": "resources\\materials\\builtin-2d-spine.mtl" "relativePath": "resources\\materials\\builtin-2d-spine.mtl"
}, },
"432fa09c-cf03-4cff-a186-982604408a07": { "432fa09c-cf03-4cff-a186-982604408a07": {
"asset": 1714966328878, "asset": 1714966328878,
"meta": 1718679175387, "meta": 1720605515793,
"relativePath": "resources\\materials\\builtin-3d-particle.mtl" "relativePath": "resources\\materials\\builtin-3d-particle.mtl"
}, },
"466d4f9b-e5f4-4ea8-85d5-3c6e9a65658a": { "466d4f9b-e5f4-4ea8-85d5-3c6e9a65658a": {
"asset": 1714966328878, "asset": 1714966328878,
"meta": 1718679175388, "meta": 1720605515787,
"relativePath": "resources\\materials\\builtin-3d-trail.mtl" "relativePath": "resources\\materials\\builtin-3d-trail.mtl"
}, },
"2a296057-247c-4a1c-bbeb-0548b6c98650": { "2a296057-247c-4a1c-bbeb-0548b6c98650": {
"asset": 1714966328893, "asset": 1714966328893,
"meta": 1718679175388, "meta": 1720605515789,
"relativePath": "resources\\materials\\builtin-unlit.mtl" "relativePath": "resources\\materials\\builtin-unlit.mtl"
}, },
"cf7e0bb8-a81c-44a9-ad79-d28d43991032": { "cf7e0bb8-a81c-44a9-ad79-d28d43991032": {
"asset": 1714966328878, "asset": 1714966328878,
"meta": 1718679175389, "meta": 1720605515788,
"relativePath": "resources\\materials\\builtin-clear-stencil.mtl" "relativePath": "resources\\materials\\builtin-clear-stencil.mtl"
}, },
"e02d87d4-e599-4d16-8001-e14891ac6506": { "e02d87d4-e599-4d16-8001-e14891ac6506": {
"asset": 1714966328878, "asset": 1714966328878,
"meta": 1718679175390, "meta": 1720605515786,
"relativePath": "resources\\materials\\builtin-2d-label.mtl" "relativePath": "resources\\materials\\builtin-2d-label.mtl"
}, },
"3a7bb79f-32fd-422e-ada2-96f518fed422": { "3a7bb79f-32fd-422e-ada2-96f518fed422": {
"asset": 1714966328862, "asset": 1714966328862,
"meta": 1718679175391, "meta": 1720605515790,
"relativePath": "resources\\materials\\builtin-2d-gray-sprite.mtl" "relativePath": "resources\\materials\\builtin-2d-gray-sprite.mtl"
}, },
"b2687ac4-099e-403c-a192-ff477686f4f5": { "b2687ac4-099e-403c-a192-ff477686f4f5": {
"asset": 1714966328752, "asset": 1714966328752,
"meta": 1718679175400, "meta": 1720605515817,
"relativePath": "particle\\atom.plist" "relativePath": "particle\\atom.plist"
}, },
"b8223619-7e38-47c4-841f-9160c232495a": { "b8223619-7e38-47c4-841f-9160c232495a": {
"asset": 1714966328752, "asset": 1714966328752,
"meta": 1718679175401, "meta": 1720605515818,
"relativePath": "obsolete\\atom.plist" "relativePath": "obsolete\\atom.plist"
}, },
"954fec8b-cd16-4bb9-a3b7-7719660e7558": { "954fec8b-cd16-4bb9-a3b7-7719660e7558": {
"asset": 1714966328737, "asset": 1714966328737,
"meta": 1718679175408, "meta": 1720605517778,
"relativePath": "model\\primitives.fbx" "relativePath": "model\\primitives.fbx"
}, },
"e8b23e56-8d10-44ad-a8f0-2e637cc45533": { "e8b23e56-8d10-44ad-a8f0-2e637cc45533": {
@ -729,14 +729,29 @@
"meta": 1718681195177, "meta": 1718681195177,
"relativePath": "Script\\GameScene.js" "relativePath": "Script\\GameScene.js"
}, },
"bdc76845-baea-4381-911e-af437cccf839": {
"asset": 1720605318016,
"meta": 1720605517848,
"relativePath": "Script\\module\\Share"
},
"7290c680-dfdc-4c59-9736-a614cc2a8bcf": {
"asset": 1720427814120,
"meta": 1720605518270,
"relativePath": "Script\\module\\Share\\share.ts"
},
"b42c4fc1-4cd1-4b12-b206-930cea3d49ca": {
"asset": 1720419330469,
"meta": 1720605518358,
"relativePath": "Script\\module\\Share.zip"
},
"454ad829-851a-40ea-8ab9-941e828357ca": { "454ad829-851a-40ea-8ab9-941e828357ca": {
"asset": 1718681580968, "asset": 1720606628700,
"meta": 1718681581282, "meta": 1720606629712,
"relativePath": "Script\\Load.ts" "relativePath": "Script\\Load.ts"
}, },
"c5692be7-8703-45e4-9f67-23b54d290356": { "c5692be7-8703-45e4-9f67-23b54d290356": {
"asset": 1718681686912, "asset": 1720606662600,
"meta": 1718681687235, "meta": 1720606663284,
"relativePath": "Script\\module\\Config\\GameConfig.ts" "relativePath": "Script\\module\\Config\\GameConfig.ts"
} }
} }

View File

@ -1 +1 @@
{"version":"1.0.8","stats":{"C:/Work/Project/Model/temp/quick-scripts/src/__qc_index__.js":"2024-06-18T02:37:31.784Z","C:/Work/Project/Model/temp/quick-scripts/src/assets/migration/use_v2.1-2.2.1_cc.Toggle_event.js":"2024-06-18T02:37:31.744Z","C:/Work/Project/Model/temp/quick-scripts/src/assets/Script/RankManager.js":"2024-06-18T02:37:31.756Z","C:/Work/Project/Model/temp/quick-scripts/src/assets/Script/GameManager.js":"2024-06-18T02:37:31.747Z","C:/Work/Project/Model/temp/quick-scripts/src/assets/Script/GameOver.js":"2024-06-18T02:37:31.746Z","C:/Work/Project/Model/temp/quick-scripts/src/assets/Script/DynamicAtlasManager.js":"2024-06-18T02:37:31.740Z","C:/Work/Project/Model/temp/quick-scripts/src/assets/Script/Load.js":"2024-06-18T02:37:31.736Z","C:/Work/Project/Model/temp/quick-scripts/src/assets/Script/module/GameStart/GameAppStart.js":"2024-06-18T02:37:31.742Z","C:/Work/Project/Model/temp/quick-scripts/src/assets/Script/module/Crypto/HttpUtil.js":"2024-06-18T02:37:31.743Z","C:/Work/Project/Model/temp/quick-scripts/src/assets/Script/module/Storage/Storage.js":"2024-06-18T02:37:31.732Z","C:/Work/Project/Model/temp/quick-scripts/src/assets/Script/module/RankList/ItemRender.js":"2024-06-18T02:37:31.750Z","C:/Work/Project/Model/temp/quick-scripts/src/assets/Script/module/Music/AudioManager.js":"2024-06-18T02:37:31.739Z","C:/Work/Project/Model/temp/quick-scripts/src/assets/Script/module/Notification/Notification.js":"2024-06-18T02:37:31.738Z","C:/Work/Project/Model/temp/quick-scripts/src/assets/Script/module/Tool/GameTool.js":"2024-06-18T02:37:31.734Z","C:/Work/Project/Model/temp/quick-scripts/src/assets/Script/module/Config/GameConfig.js":"2024-06-18T02:37:31.748Z","C:/Work/Project/Model/temp/quick-scripts/src/assets/Script/module/Crypto/crypto-js.min.js":"2024-06-18T02:37:31.754Z","C:/Work/Project/Model/temp/quick-scripts/src/assets/Script/module/RankList/List.js":"2024-06-18T02:37:31.753Z"}} {"version":"1.0.8","stats":{"C:/Work/Project/Model/temp/quick-scripts/src/__qc_index__.js":"2024-07-10T09:58:38.626Z","C:/Work/Project/Model/temp/quick-scripts/src/assets/Script/GameOver.js":"2024-07-10T09:58:38.586Z","C:/Work/Project/Model/temp/quick-scripts/src/assets/Script/Load.js":"2024-07-10T09:58:38.572Z","C:/Work/Project/Model/temp/quick-scripts/src/assets/migration/use_v2.1-2.2.1_cc.Toggle_event.js":"2024-07-10T09:58:38.585Z","C:/Work/Project/Model/temp/quick-scripts/src/assets/Script/GameScene.js":"2024-07-10T09:58:38.598Z","C:/Work/Project/Model/temp/quick-scripts/src/assets/Script/RankManager.js":"2024-07-10T09:58:38.597Z","C:/Work/Project/Model/temp/quick-scripts/src/assets/Script/module/Crypto/HttpUtil.js":"2024-07-10T09:58:38.581Z","C:/Work/Project/Model/temp/quick-scripts/src/assets/Script/DynamicAtlasManager.js":"2024-07-10T09:58:38.577Z","C:/Work/Project/Model/temp/quick-scripts/src/assets/Script/GameManager.js":"2024-07-10T09:58:38.588Z","C:/Work/Project/Model/temp/quick-scripts/src/assets/Script/module/GameStart/GameAppStart.js":"2024-07-10T09:58:38.578Z","C:/Work/Project/Model/temp/quick-scripts/src/assets/Script/module/Tool/GameTool.js":"2024-07-10T09:58:38.570Z","C:/Work/Project/Model/temp/quick-scripts/src/assets/Script/module/RankList/ItemRender.js":"2024-07-10T09:58:38.591Z","C:/Work/Project/Model/temp/quick-scripts/src/assets/Script/module/Share/share.js":"2024-07-10T09:58:38.580Z","C:/Work/Project/Model/temp/quick-scripts/src/assets/Script/module/Notification/Notification.js":"2024-07-10T09:58:38.574Z","C:/Work/Project/Model/temp/quick-scripts/src/assets/Script/module/Config/GameConfig.js":"2024-07-10T09:58:38.590Z","C:/Work/Project/Model/temp/quick-scripts/src/assets/Script/module/Music/AudioManager.js":"2024-07-10T09:58:38.575Z","C:/Work/Project/Model/temp/quick-scripts/src/assets/Script/module/Crypto/crypto-js.min.js":"2024-07-10T09:58:38.594Z","C:/Work/Project/Model/temp/quick-scripts/src/assets/Script/module/Storage/Storage.js":"2024-07-10T09:58:38.569Z","C:/Work/Project/Model/temp/quick-scripts/src/assets/Script/module/RankList/List.js":"2024-07-10T09:58:38.592Z"}}

File diff suppressed because one or more lines are too long

View File

@ -24,6 +24,7 @@ require('./assets/Script/module/Music/AudioManager');
require('./assets/Script/module/Notification/Notification'); require('./assets/Script/module/Notification/Notification');
require('./assets/Script/module/RankList/ItemRender'); require('./assets/Script/module/RankList/ItemRender');
require('./assets/Script/module/RankList/List'); require('./assets/Script/module/RankList/List');
require('./assets/Script/module/Share/share');
require('./assets/Script/module/Storage/Storage'); require('./assets/Script/module/Storage/Storage');
require('./assets/Script/module/Tool/GameTool'); require('./assets/Script/module/Tool/GameTool');
require('./assets/migration/use_v2.1-2.2.1_cc.Toggle_event'); require('./assets/migration/use_v2.1-2.2.1_cc.Toggle_event');

View File

@ -1,6 +1,6 @@
(function () { (function () {
var scripts = [{"deps":{"./assets/Script/GameOver":4,"./assets/Script/GameScene":17,"./assets/Script/Load":6,"./assets/Script/RankManager":2,"./assets/Script/DynamicAtlasManager":5,"./assets/migration/use_v2.1-2.2.1_cc.Toggle_event":1,"./assets/Script/GameManager":3,"./assets/Script/module/Crypto/crypto-js.min":15,"./assets/Script/module/Crypto/HttpUtil":8,"./assets/Script/module/GameStart/GameAppStart":7,"./assets/Script/module/Music/AudioManager":11,"./assets/Script/module/Notification/Notification":12,"./assets/Script/module/RankList/List":16,"./assets/Script/module/RankList/ItemRender":10,"./assets/Script/module/Storage/Storage":9,"./assets/Script/module/Tool/GameTool":13,"./assets/Script/module/Config/GameConfig":14},"path":"preview-scripts/__qc_index__.js"},{"deps":{},"path":"preview-scripts/assets/migration/use_v2.1-2.2.1_cc.Toggle_event.js"},{"deps":{"./module/RankList/List":16},"path":"preview-scripts/assets/Script/RankManager.js"},{"deps":{},"path":"preview-scripts/assets/Script/GameManager.js"},{"deps":{},"path":"preview-scripts/assets/Script/GameOver.js"},{"deps":{},"path":"preview-scripts/assets/Script/DynamicAtlasManager.js"},{"deps":{},"path":"preview-scripts/assets/Script/Load.js"},{"deps":{"../Config/GameConfig":14,"../Crypto/HttpUtil":8,"../Music/AudioManager":11,"../Notification/Notification":12,"../Storage/Storage":9,"../Tool/GameTool":13},"path":"preview-scripts/assets/Script/module/GameStart/GameAppStart.js"},{"deps":{"./crypto-js.min.js":15},"path":"preview-scripts/assets/Script/module/Crypto/HttpUtil.js"},{"deps":{},"path":"preview-scripts/assets/Script/module/Storage/Storage.js"},{"deps":{},"path":"preview-scripts/assets/Script/module/RankList/ItemRender.js"},{"deps":{},"path":"preview-scripts/assets/Script/module/Music/AudioManager.js"},{"deps":{},"path":"preview-scripts/assets/Script/module/Notification/Notification.js"},{"deps":{},"path":"preview-scripts/assets/Script/module/Tool/GameTool.js"},{"deps":{},"path":"preview-scripts/assets/Script/module/Config/GameConfig.js"},{"deps":{},"path":"preview-scripts/assets/Script/module/Crypto/crypto-js.min.js"},{"deps":{"./ItemRender":10},"path":"preview-scripts/assets/Script/module/RankList/List.js"},{"deps":{},"path":"preview-scripts/assets/Script/GameScene.js"}]; var scripts = [{"deps":{"./assets/Script/GameOver":1,"./assets/Script/GameScene":4,"./assets/Script/Load":2,"./assets/Script/RankManager":5,"./assets/Script/DynamicAtlasManager":7,"./assets/migration/use_v2.1-2.2.1_cc.Toggle_event":3,"./assets/Script/GameManager":8,"./assets/Script/module/Crypto/crypto-js.min":16,"./assets/Script/module/Crypto/HttpUtil":6,"./assets/Script/module/GameStart/GameAppStart":9,"./assets/Script/module/Music/AudioManager":15,"./assets/Script/module/Notification/Notification":13,"./assets/Script/module/RankList/List":18,"./assets/Script/module/RankList/ItemRender":11,"./assets/Script/module/Share/share":12,"./assets/Script/module/Storage/Storage":17,"./assets/Script/module/Tool/GameTool":10,"./assets/Script/module/Config/GameConfig":14},"path":"preview-scripts/__qc_index__.js"},{"deps":{},"path":"preview-scripts/assets/Script/GameOver.js"},{"deps":{},"path":"preview-scripts/assets/Script/Load.js"},{"deps":{},"path":"preview-scripts/assets/migration/use_v2.1-2.2.1_cc.Toggle_event.js"},{"deps":{},"path":"preview-scripts/assets/Script/GameScene.js"},{"deps":{"./module/RankList/List":18},"path":"preview-scripts/assets/Script/RankManager.js"},{"deps":{"./crypto-js.min.js":16},"path":"preview-scripts/assets/Script/module/Crypto/HttpUtil.js"},{"deps":{},"path":"preview-scripts/assets/Script/DynamicAtlasManager.js"},{"deps":{},"path":"preview-scripts/assets/Script/GameManager.js"},{"deps":{"../Config/GameConfig":14,"../Crypto/HttpUtil":6,"../Music/AudioManager":15,"../Notification/Notification":13,"../Storage/Storage":17,"../Tool/GameTool":10},"path":"preview-scripts/assets/Script/module/GameStart/GameAppStart.js"},{"deps":{},"path":"preview-scripts/assets/Script/module/Tool/GameTool.js"},{"deps":{},"path":"preview-scripts/assets/Script/module/RankList/ItemRender.js"},{"deps":{},"path":"preview-scripts/assets/Script/module/Share/share.js"},{"deps":{},"path":"preview-scripts/assets/Script/module/Notification/Notification.js"},{"deps":{},"path":"preview-scripts/assets/Script/module/Config/GameConfig.js"},{"deps":{},"path":"preview-scripts/assets/Script/module/Music/AudioManager.js"},{"deps":{},"path":"preview-scripts/assets/Script/module/Crypto/crypto-js.min.js"},{"deps":{},"path":"preview-scripts/assets/Script/module/Storage/Storage.js"},{"deps":{"./ItemRender":11},"path":"preview-scripts/assets/Script/module/RankList/List.js"}];
var entries = ["preview-scripts/__qc_index__.js"]; var entries = ["preview-scripts/__qc_index__.js"];
var bundleScript = 'preview-scripts/__qc_bundle__.js'; var bundleScript = 'preview-scripts/__qc_bundle__.js';

View File

@ -46,8 +46,9 @@ var NewClass = /** @class */ (function (_super) {
} }
NewClass.prototype.start = function () { NewClass.prototype.start = function () {
window.initMgr(); window.initMgr();
cc.fx.GameConfig.init(this.localTest); debugger;
cc.fx.AudioManager.Instance.init(); cc.fx.GameConfig.init(true);
// cc.fx.AudioManager.Instance.init();
this.testVersion.string = this.clientTestVersion; this.testVersion.string = this.clientTestVersion;
}; };
//开始游戏,跳转至引导页面 //开始游戏,跳转至引导页面
@ -93,4 +94,4 @@ cc._RF.pop();
}); });
} }
})(); })();
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImFzc2V0c1xcU2NyaXB0XFxMb2FkLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OztBQUNNLElBQUEsS0FBd0MsRUFBRSxDQUFDLFVBQVUsRUFBcEQsT0FBTyxhQUFBLEVBQUUsUUFBUSxjQUFBLEVBQUUsZ0JBQWdCLHNCQUFpQixDQUFDO0FBRzVEO0lBQXNDLDRCQUFZO0lBQWxEO1FBQUEscUVBbUNDO1FBaENHLGVBQVMsR0FBWSxLQUFLLENBQUM7UUFHM0IsdUJBQWlCLEdBQVcsT0FBTyxDQUFDO1FBR3BDLGlCQUFXLEdBQWEsSUFBSSxDQUFDOztJQTBCakMsQ0FBQztJQXhCRyx3QkFBSyxHQUFMO1FBQ0ksTUFBTSxDQUFDLE9BQU8sRUFBRSxDQUFDO1FBQ2pCLEVBQUUsQ0FBQyxFQUFFLENBQUMsVUFBVSxDQUFDLElBQUksQ0FBQyxJQUFJLENBQUMsU0FBUyxDQUFDLENBQUM7UUFDdEMsRUFBRSxDQUFDLEVBQUUsQ0FBQyxZQUFZLENBQUMsUUFBUSxDQUFDLElBQUksRUFBRSxDQUFDO1FBQ25DLElBQUksQ0FBQyxXQUFXLENBQUMsTUFBTSxHQUFHLElBQUksQ0FBQyxpQkFBaUIsQ0FBQztJQUNyRCxDQUFDO0lBRUQsY0FBYztJQUNkLDRCQUFTLEdBQVQ7UUFDSSxFQUFFLENBQUMsUUFBUSxDQUFDLFNBQVMsQ0FBQyxXQUFXLENBQUMsQ0FBQztRQUNuQyx1Q0FBdUM7SUFDM0MsQ0FBQztJQUNELGdCQUFnQjtJQUNoQiwyQkFBUSxHQUFSLFVBQVMsS0FBSyxFQUFDLElBQUk7UUFDZixFQUFFLENBQUMsRUFBRSxDQUFDLFVBQVUsQ0FBQyxPQUFPLENBQUMsTUFBTSxHQUFHLFFBQVEsQ0FBQyxJQUFJLENBQUMsQ0FBQztRQUNqRCxFQUFFLENBQUMsUUFBUSxDQUFDLFNBQVMsQ0FBQyxXQUFXLENBQUMsQ0FBQztJQUN2QyxDQUFDO0lBQ0QsT0FBTztJQUNQLDJCQUFRLEdBQVI7UUFDSSxFQUFFLENBQUMsUUFBUSxDQUFDLFNBQVMsQ0FBQyxXQUFXLENBQUMsQ0FBQztJQUN2QyxDQUFDO0lBRVMseUJBQU0sR0FBaEIsVUFBaUIsRUFBVTtJQUMzQixDQUFDO0lBL0JEO1FBREMsUUFBUSxDQUFDLEtBQUssQ0FBQzsrQ0FDVztJQUczQjtRQURDLFFBQVEsQ0FBQyxFQUFFLENBQUM7dURBQ3VCO0lBR3BDO1FBREMsUUFBUSxDQUFDLEVBQUUsQ0FBQyxLQUFLLENBQUM7aURBQ1U7SUFUWixRQUFRO1FBRDVCLE9BQU87T0FDYSxRQUFRLENBbUM1QjtJQUFELGVBQUM7Q0FuQ0QsQUFtQ0MsQ0FuQ3FDLEVBQUUsQ0FBQyxTQUFTLEdBbUNqRDtrQkFuQ29CLFFBQVEiLCJmaWxlIjoiIiwic291cmNlUm9vdCI6Ii8iLCJzb3VyY2VzQ29udGVudCI6WyJcclxuY29uc3Qge2NjY2xhc3MsIHByb3BlcnR5LCByZXF1aXJlQ29tcG9uZW50fSA9IGNjLl9kZWNvcmF0b3I7XHJcblxyXG5AY2NjbGFzc1xyXG5leHBvcnQgZGVmYXVsdCBjbGFzcyBOZXdDbGFzcyBleHRlbmRzIGNjLkNvbXBvbmVudCB7XHJcblxyXG4gICAgQHByb3BlcnR5KGZhbHNlKVxyXG4gICAgbG9jYWxUZXN0OiBib29sZWFuID0gZmFsc2U7XHJcblxyXG4gICAgQHByb3BlcnR5KFwiXCIpXHJcbiAgICBjbGllbnRUZXN0VmVyc2lvbjogc3RyaW5nID0gXCIxLjAuMFwiO1xyXG5cclxuICAgIEBwcm9wZXJ0eShjYy5MYWJlbClcclxuICAgIHRlc3RWZXJzaW9uOiBjYy5MYWJlbCA9IG51bGw7XHJcblxyXG4gICAgc3RhcnQgKCkge1xyXG4gICAgICAgIHdpbmRvdy5pbml0TWdyKCk7XHJcbiAgICAgICAgY2MuZnguR2FtZUNvbmZpZy5pbml0KHRoaXMubG9jYWxUZXN0KTtcclxuICAgICAgICBjYy5meC5BdWRpb01hbmFnZXIuSW5zdGFuY2UuaW5pdCgpO1xyXG4gICAgICAgIHRoaXMudGVzdFZlcnNpb24uc3RyaW5nID0gdGhpcy5jbGllbnRUZXN0VmVyc2lvbjtcclxuICAgIH1cclxuXHJcbiAgICAvL+W8gOWni+a4uOaIj++8jOi3s+i9rOiHs+W8leWvvOmhtemdolxyXG4gICAgc3RhcnRHYW1lKCl7XHJcbiAgICAgICAgY2MuZGlyZWN0b3IubG9hZFNjZW5lKFwiR2FtZVNjZW5lXCIpO1xyXG4gICAgICAgIC8vIGNjLmRpcmVjdG9yLmxvYWRTY2VuZShcIkd1aWRlU2NlbmVcIik7XHJcbiAgICB9XHJcbiAgICAvL+Wkh+eUqO+8jOeUqOadpea1i+ivlei3s+i9rCDmjIflrprlhbPljaFcclxuICAgIGNsaWNrQnRuKGV2ZW50LGRhdGEpe1xyXG4gICAgICAgIGNjLmZ4LkdhbWVDb25maWcuR01fSU5GTy5jdXN0b20gPSBwYXJzZUludChkYXRhKTtcclxuICAgICAgICBjYy5kaXJlY3Rvci5sb2FkU2NlbmUoXCJHYW1lU2NlbmVcIik7XHJcbiAgICB9ICAgXHJcbiAgICAvL+aJk+W8gOaOkuihjOamnFxyXG4gICAgb3BlblJhbmsoKXtcclxuICAgICAgICBjYy5kaXJlY3Rvci5sb2FkU2NlbmUoXCJSYW5rU2NlbmVcIik7XHJcbiAgICB9XHJcbiAgICBcclxuICAgIHByb3RlY3RlZCB1cGRhdGUoZHQ6IG51bWJlcik6IHZvaWQge1xyXG4gICAgfVxyXG59XHJcbiJdfQ== //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImFzc2V0c1xcU2NyaXB0XFxMb2FkLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OztBQUNNLElBQUEsS0FBd0MsRUFBRSxDQUFDLFVBQVUsRUFBcEQsT0FBTyxhQUFBLEVBQUUsUUFBUSxjQUFBLEVBQUUsZ0JBQWdCLHNCQUFpQixDQUFDO0FBRzVEO0lBQXNDLDRCQUFZO0lBQWxEO1FBQUEscUVBb0NDO1FBakNHLGVBQVMsR0FBWSxLQUFLLENBQUM7UUFHM0IsdUJBQWlCLEdBQVcsT0FBTyxDQUFDO1FBR3BDLGlCQUFXLEdBQWEsSUFBSSxDQUFDOztJQTJCakMsQ0FBQztJQXpCRyx3QkFBSyxHQUFMO1FBQ0ksTUFBTSxDQUFDLE9BQU8sRUFBRSxDQUFDO1FBQ2pCLFFBQVEsQ0FBQztRQUNULEVBQUUsQ0FBQyxFQUFFLENBQUMsVUFBVSxDQUFDLElBQUksQ0FBQyxJQUFJLENBQUMsQ0FBQztRQUM1QixzQ0FBc0M7UUFDdEMsSUFBSSxDQUFDLFdBQVcsQ0FBQyxNQUFNLEdBQUcsSUFBSSxDQUFDLGlCQUFpQixDQUFDO0lBQ3JELENBQUM7SUFFRCxjQUFjO0lBQ2QsNEJBQVMsR0FBVDtRQUNJLEVBQUUsQ0FBQyxRQUFRLENBQUMsU0FBUyxDQUFDLFdBQVcsQ0FBQyxDQUFDO1FBQ25DLHVDQUF1QztJQUMzQyxDQUFDO0lBQ0QsZ0JBQWdCO0lBQ2hCLDJCQUFRLEdBQVIsVUFBUyxLQUFLLEVBQUMsSUFBSTtRQUNmLEVBQUUsQ0FBQyxFQUFFLENBQUMsVUFBVSxDQUFDLE9BQU8sQ0FBQyxNQUFNLEdBQUcsUUFBUSxDQUFDLElBQUksQ0FBQyxDQUFDO1FBQ2pELEVBQUUsQ0FBQyxRQUFRLENBQUMsU0FBUyxDQUFDLFdBQVcsQ0FBQyxDQUFDO0lBQ3ZDLENBQUM7SUFDRCxPQUFPO0lBQ1AsMkJBQVEsR0FBUjtRQUNJLEVBQUUsQ0FBQyxRQUFRLENBQUMsU0FBUyxDQUFDLFdBQVcsQ0FBQyxDQUFDO0lBQ3ZDLENBQUM7SUFFUyx5QkFBTSxHQUFoQixVQUFpQixFQUFVO0lBQzNCLENBQUM7SUFoQ0Q7UUFEQyxRQUFRLENBQUMsS0FBSyxDQUFDOytDQUNXO0lBRzNCO1FBREMsUUFBUSxDQUFDLEVBQUUsQ0FBQzt1REFDdUI7SUFHcEM7UUFEQyxRQUFRLENBQUMsRUFBRSxDQUFDLEtBQUssQ0FBQztpREFDVTtJQVRaLFFBQVE7UUFENUIsT0FBTztPQUNhLFFBQVEsQ0FvQzVCO0lBQUQsZUFBQztDQXBDRCxBQW9DQyxDQXBDcUMsRUFBRSxDQUFDLFNBQVMsR0FvQ2pEO2tCQXBDb0IsUUFBUSIsImZpbGUiOiIiLCJzb3VyY2VSb290IjoiLyIsInNvdXJjZXNDb250ZW50IjpbIlxyXG5jb25zdCB7Y2NjbGFzcywgcHJvcGVydHksIHJlcXVpcmVDb21wb25lbnR9ID0gY2MuX2RlY29yYXRvcjtcclxuXHJcbkBjY2NsYXNzXHJcbmV4cG9ydCBkZWZhdWx0IGNsYXNzIE5ld0NsYXNzIGV4dGVuZHMgY2MuQ29tcG9uZW50IHtcclxuXHJcbiAgICBAcHJvcGVydHkoZmFsc2UpXHJcbiAgICBsb2NhbFRlc3Q6IGJvb2xlYW4gPSBmYWxzZTtcclxuXHJcbiAgICBAcHJvcGVydHkoXCJcIilcclxuICAgIGNsaWVudFRlc3RWZXJzaW9uOiBzdHJpbmcgPSBcIjEuMC4wXCI7XHJcblxyXG4gICAgQHByb3BlcnR5KGNjLkxhYmVsKVxyXG4gICAgdGVzdFZlcnNpb246IGNjLkxhYmVsID0gbnVsbDtcclxuXHJcbiAgICBzdGFydCAoKSB7XHJcbiAgICAgICAgd2luZG93LmluaXRNZ3IoKTtcclxuICAgICAgICBkZWJ1Z2dlcjtcclxuICAgICAgICBjYy5meC5HYW1lQ29uZmlnLmluaXQodHJ1ZSk7XHJcbiAgICAgICAgLy8gY2MuZnguQXVkaW9NYW5hZ2VyLkluc3RhbmNlLmluaXQoKTtcclxuICAgICAgICB0aGlzLnRlc3RWZXJzaW9uLnN0cmluZyA9IHRoaXMuY2xpZW50VGVzdFZlcnNpb247XHJcbiAgICB9XHJcblxyXG4gICAgLy/lvIDlp4vmuLjmiI/vvIzot7Povazoh7PlvJXlr7zpobXpnaJcclxuICAgIHN0YXJ0R2FtZSgpe1xyXG4gICAgICAgIGNjLmRpcmVjdG9yLmxvYWRTY2VuZShcIkdhbWVTY2VuZVwiKTtcclxuICAgICAgICAvLyBjYy5kaXJlY3Rvci5sb2FkU2NlbmUoXCJHdWlkZVNjZW5lXCIpO1xyXG4gICAgfVxyXG4gICAgLy/lpIfnlKjvvIznlKjmnaXmtYvor5Xot7Povawg5oyH5a6a5YWz5Y2hXHJcbiAgICBjbGlja0J0bihldmVudCxkYXRhKXtcclxuICAgICAgICBjYy5meC5HYW1lQ29uZmlnLkdNX0lORk8uY3VzdG9tID0gcGFyc2VJbnQoZGF0YSk7XHJcbiAgICAgICAgY2MuZGlyZWN0b3IubG9hZFNjZW5lKFwiR2FtZVNjZW5lXCIpO1xyXG4gICAgfSAgIFxyXG4gICAgLy/miZPlvIDmjpLooYzmppxcclxuICAgIG9wZW5SYW5rKCl7XHJcbiAgICAgICAgY2MuZGlyZWN0b3IubG9hZFNjZW5lKFwiUmFua1NjZW5lXCIpO1xyXG4gICAgfVxyXG4gICAgXHJcbiAgICBwcm90ZWN0ZWQgdXBkYXRlKGR0OiBudW1iZXIpOiB2b2lkIHtcclxuICAgIH1cclxufVxyXG4iXX0=

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -13,6 +13,7 @@ require('./assets/Script/module/Music/AudioManager');
require('./assets/Script/module/Notification/Notification'); require('./assets/Script/module/Notification/Notification');
require('./assets/Script/module/RankList/ItemRender'); require('./assets/Script/module/RankList/ItemRender');
require('./assets/Script/module/RankList/List'); require('./assets/Script/module/RankList/List');
require('./assets/Script/module/Share/share');
require('./assets/Script/module/Storage/Storage'); require('./assets/Script/module/Storage/Storage');
require('./assets/Script/module/Tool/GameTool'); require('./assets/Script/module/Tool/GameTool');
require('./assets/migration/use_v2.1-2.2.1_cc.Toggle_event'); require('./assets/migration/use_v2.1-2.2.1_cc.Toggle_event');

View File

@ -0,0 +1 @@
{"version":3,"sources":["assets\\Script\\GameScene.js"],"names":[],"mappings":";;;;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;AAGA;AAEA;AAEA;AAEA","sourceRoot":"/","sourcesContent":["\r\n// cc.Class({\r\n// extends: cc.Component,\r\n// properties: {\r\n// localTest: {\r\n// default: false,\r\n// tooltip: '本地测试时勾选避免tz_url和Configure报错提交前勾掉'\r\n// },\r\n// clientTest: {\r\n// default: false,\r\n// tooltip: '客户端测试时勾选,展示版本标记方便测试区分,上线前勾掉'\r\n// },\r\n// clientTestVersion: {\r\n// default: '',\r\n// tooltip: '版本标记'\r\n// },\r\n// testVersion: cc.Label,\r\n// score: cc.Label,\r\n// double_hit: cc.Node,\r\n// add: cc.Node,\r\n// add2: cc.Node,\r\n// double_title: cc.Node,\r\n// count_time: cc.Node,\r\n// beginNode: cc.Node,\r\n// ball_nomal: [cc.SpriteFrame],\r\n// bg_nomal: [cc.SpriteFrame],\r\n// ball_light: [cc.SpriteFrame],\r\n// kuang_Frame: [cc.SpriteFrame],\r\n// daojishi: cc.Label,\r\n// pause_anniu: cc.Sprite,\r\n// mask: cc.Node,\r\n\r\n// flashUI: {\r\n// default: null,\r\n// type: cc.SpriteAtlas\r\n// },\r\n// },\r\n\r\n// onLoad() {\r\n\r\n\r\n// },\r\n\r\n// update(dt) {\r\n\r\n// },\r\n\r\n// });"]}

View File

@ -35,8 +35,9 @@ var NewClass = /** @class */ (function (_super) {
} }
NewClass.prototype.start = function () { NewClass.prototype.start = function () {
window.initMgr(); window.initMgr();
cc.fx.GameConfig.init(this.localTest); debugger;
cc.fx.AudioManager.Instance.init(); cc.fx.GameConfig.init(true);
// cc.fx.AudioManager.Instance.init();
this.testVersion.string = this.clientTestVersion; this.testVersion.string = this.clientTestVersion;
}; };
//开始游戏,跳转至引导页面 //开始游戏,跳转至引导页面

View File

@ -1 +1 @@
{"version":3,"sources":["assets\\Script\\Load.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AACM,IAAA,KAAwC,EAAE,CAAC,UAAU,EAApD,OAAO,aAAA,EAAE,QAAQ,cAAA,EAAE,gBAAgB,sBAAiB,CAAC;AAG5D;IAAsC,4BAAY;IAAlD;;IAyBA,CAAC;IAxBG,wBAAK,GAAL;QACI,MAAM,CAAC,OAAO,EAAE,CAAC;QACjB,EAAE,CAAC,EAAE,CAAC,UAAU,CAAC,IAAI,EAAE,CAAC;QACxB,EAAE,CAAC,EAAE,CAAC,YAAY,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC;QACnC,mCAAmC;IACvC,CAAC;IAED,cAAc;IACd,4BAAS,GAAT;QACI,EAAE,CAAC,QAAQ,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC;QACnC,uCAAuC;IAC3C,CAAC;IACD,gBAAgB;IAChB,2BAAQ,GAAR,UAAS,KAAK,EAAC,IAAI;QACf,EAAE,CAAC,EAAE,CAAC,UAAU,CAAC,OAAO,CAAC,MAAM,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC;QACjD,EAAE,CAAC,QAAQ,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC;IACvC,CAAC;IACD,OAAO;IACP,2BAAQ,GAAR;QACI,EAAE,CAAC,QAAQ,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC;IACvC,CAAC;IAES,yBAAM,GAAhB,UAAiB,EAAU;IAC3B,CAAC;IAxBgB,QAAQ;QAD5B,OAAO;OACa,QAAQ,CAyB5B;IAAD,eAAC;CAzBD,AAyBC,CAzBqC,EAAE,CAAC,SAAS,GAyBjD;kBAzBoB,QAAQ","file":"","sourceRoot":"/","sourcesContent":["\r\nconst {ccclass, property, requireComponent} = cc._decorator;\r\n\r\n@ccclass\r\nexport default class NewClass extends cc.Component {\r\n start () {\r\n window.initMgr();\r\n cc.fx.GameConfig.init();\r\n cc.fx.AudioManager.Instance.init();\r\n // cc.fx.GameTool.Authentication();\r\n }\r\n\r\n //开始游戏,跳转至引导页面\r\n startGame(){\r\n cc.director.loadScene(\"GameScene\");\r\n // cc.director.loadScene(\"GuideScene\");\r\n }\r\n //备用,用来测试跳转 指定关卡\r\n clickBtn(event,data){\r\n cc.fx.GameConfig.GM_INFO.custom = parseInt(data);\r\n cc.director.loadScene(\"GameScene\");\r\n } \r\n //打开排行榜\r\n openRank(){\r\n cc.director.loadScene(\"RankScene\");\r\n }\r\n \r\n protected update(dt: number): void {\r\n }\r\n}\r\n"]} {"version":3,"sources":["assets\\Script\\Load.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AACM,IAAA,KAAwC,EAAE,CAAC,UAAU,EAApD,OAAO,aAAA,EAAE,QAAQ,cAAA,EAAE,gBAAgB,sBAAiB,CAAC;AAG5D;IAAsC,4BAAY;IAAlD;QAAA,qEAmCC;QAhCG,eAAS,GAAY,KAAK,CAAC;QAG3B,uBAAiB,GAAW,OAAO,CAAC;QAGpC,iBAAW,GAAa,IAAI,CAAC;;IA0BjC,CAAC;IAxBG,wBAAK,GAAL;QACI,MAAM,CAAC,OAAO,EAAE,CAAC;QACjB,EAAE,CAAC,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QACtC,EAAE,CAAC,EAAE,CAAC,YAAY,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC;QACnC,IAAI,CAAC,WAAW,CAAC,MAAM,GAAG,IAAI,CAAC,iBAAiB,CAAC;IACrD,CAAC;IAED,cAAc;IACd,4BAAS,GAAT;QACI,EAAE,CAAC,QAAQ,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC;QACnC,uCAAuC;IAC3C,CAAC;IACD,gBAAgB;IAChB,2BAAQ,GAAR,UAAS,KAAK,EAAC,IAAI;QACf,EAAE,CAAC,EAAE,CAAC,UAAU,CAAC,OAAO,CAAC,MAAM,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC;QACjD,EAAE,CAAC,QAAQ,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC;IACvC,CAAC;IACD,OAAO;IACP,2BAAQ,GAAR;QACI,EAAE,CAAC,QAAQ,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC;IACvC,CAAC;IAES,yBAAM,GAAhB,UAAiB,EAAU;IAC3B,CAAC;IA/BD;QADC,QAAQ,CAAC,KAAK,CAAC;+CACW;IAG3B;QADC,QAAQ,CAAC,EAAE,CAAC;uDACuB;IAGpC;QADC,QAAQ,CAAC,EAAE,CAAC,KAAK,CAAC;iDACU;IATZ,QAAQ;QAD5B,OAAO;OACa,QAAQ,CAmC5B;IAAD,eAAC;CAnCD,AAmCC,CAnCqC,EAAE,CAAC,SAAS,GAmCjD;kBAnCoB,QAAQ","file":"","sourceRoot":"/","sourcesContent":["\r\nconst {ccclass, property, requireComponent} = cc._decorator;\r\n\r\n@ccclass\r\nexport default class NewClass extends cc.Component {\r\n\r\n @property(false)\r\n localTest: boolean = false;\r\n\r\n @property(\"\")\r\n clientTestVersion: string = \"1.0.0\";\r\n\r\n @property(cc.Label)\r\n testVersion: cc.Label = null;\r\n\r\n start () {\r\n window.initMgr();\r\n cc.fx.GameConfig.init(this.localTest);\r\n cc.fx.AudioManager.Instance.init();\r\n this.testVersion.string = this.clientTestVersion;\r\n }\r\n\r\n //开始游戏,跳转至引导页面\r\n startGame(){\r\n cc.director.loadScene(\"GameScene\");\r\n // cc.director.loadScene(\"GuideScene\");\r\n }\r\n //备用,用来测试跳转 指定关卡\r\n clickBtn(event,data){\r\n cc.fx.GameConfig.GM_INFO.custom = parseInt(data);\r\n cc.director.loadScene(\"GameScene\");\r\n } \r\n //打开排行榜\r\n openRank(){\r\n cc.director.loadScene(\"RankScene\");\r\n }\r\n \r\n protected update(dt: number): void {\r\n }\r\n}\r\n"]}

File diff suppressed because one or more lines are too long

View File

@ -61,20 +61,32 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "__esModule", { value: true });
var _a = cc._decorator, ccclass = _a.ccclass, property = _a.property; var _a = cc._decorator, ccclass = _a.ccclass, property = _a.property;
var CryptoJS = require("./crypto-js.min.js"); //引用AES源码js var CryptoJS = require("./crypto-js.min.js"); //引用AES源码js
var BASE_URL = "http://api.sparkus.cn"; var BASE_URL = "https://api.sparkus.cn";
//只负责网络接口 次类只负责和后端交互,不负责处理数据 数据处理在GameTool //只负责网络接口 次类只负责和后端交互,不负责处理数据 数据处理在GameTool
var HttpUtil = /** @class */ (function (_super) { var HttpUtil = /** @class */ (function (_super) {
__extends(HttpUtil, _super); __extends(HttpUtil, _super);
function HttpUtil() { function HttpUtil() {
return _super !== null && _super.apply(this, arguments) || this; return _super !== null && _super.apply(this, arguments) || this;
} }
HttpUtil_1 = HttpUtil;
HttpUtil.getShareInfo = function (shareUrl) {
return __awaiter(this, void 0, Promise, function () {
var time, url;
return __generator(this, function (_a) {
console.log("设置分享链接:", shareUrl);
time = Math.floor((new Date().getTime()) / 1000);
url = HttpUtil_1.apiSign("/api/share/cfg?gameId=" + config.gameId + "&time=" + time + "&url=" + shareUrl, {});
return [2 /*return*/, this.post(url, null, null)];
});
});
};
//排行榜 //排行榜
HttpUtil.rankData = function (type, callback, data) { HttpUtil.rankData = function (type, callback, data) {
return __awaiter(this, void 0, Promise, function () { return __awaiter(this, void 0, Promise, function () {
var time, url; var time, url;
return __generator(this, function (_a) { return __generator(this, function (_a) {
time = Math.floor((new Date().getTime()) / 1000); time = Math.floor((new Date().getTime()) / 1000);
url = apiSign("/api/get/rank/data?gameId=" + config.gameId + "&dataType=" + type + "&time=" + time, data); url = HttpUtil_1.apiSign("/api/get/rank/data?gameId=" + config.gameId + "&dataType=" + type + "&time=" + time, data);
this.post(url, data, callback); this.post(url, data, callback);
return [2 /*return*/]; return [2 /*return*/];
}); });
@ -96,7 +108,7 @@ var HttpUtil = /** @class */ (function (_super) {
var time, url; var time, url;
return __generator(this, function (_a) { return __generator(this, function (_a) {
time = Math.floor((new Date().getTime()) / 1000); time = Math.floor((new Date().getTime()) / 1000);
url = apiSign("/api/get/user/data?gameId=" + config.gameId + "&time=" + time, data); url = HttpUtil_1.apiSign("/api/get/user/data?gameId=" + config.gameId + "&time=" + time, data);
this.post(url, data, callback); this.post(url, data, callback);
return [2 /*return*/]; return [2 /*return*/];
}); });
@ -163,7 +175,27 @@ var HttpUtil = /** @class */ (function (_super) {
}); });
}); });
}; };
HttpUtil = __decorate([ /**
*
* @param url {string} 接口地址
* @param params {object} 需要加密的参数对象
*/
HttpUtil.apiSign = function (url, params) {
if (params === void 0) { params = {}; }
var convertUrl = url.trim();
if (convertUrl.indexOf('?') === -1) {
convertUrl += '?';
}
// 传入参数转换拼接字符串
var postStr = getQueryString(params);
var signedStr = genSignStr(convertUrl, postStr);
var encryptStr = "sign=" + signedStr;
var encryptSignStr = fxCry.encryptByDES(encryptStr, config.secretKey);
encryptSignStr = encodeURIComponent(encryptSignStr);
return urlencode(convertUrl) + "&_p=" + encryptSignStr;
};
var HttpUtil_1;
HttpUtil = HttpUtil_1 = __decorate([
ccclass ccclass
], HttpUtil); ], HttpUtil);
return HttpUtil; return HttpUtil;
@ -175,8 +207,8 @@ function responseHandler(response) {
// 响应拦截器 // 响应拦截器
// Rq.interceptors.response.use(responseHandler) // Rq.interceptors.response.use(responseHandler)
var config = { var config = {
gameId: "100009", gameId: "100010",
secretKey: "CMNhOzBA", secretKey: "wozrGKsL",
EK: "hui231%1" EK: "hui231%1"
}; };
var Crypoto = /** @class */ (function () { var Crypoto = /** @class */ (function () {
@ -289,24 +321,5 @@ function urlencode(url) {
var params = new URLSearchParams(queryString); var params = new URLSearchParams(queryString);
return baseUrl + "?" + params.toString(); return baseUrl + "?" + params.toString();
} }
/**
*
* @param url {string} 接口地址
* @param params {object} 需要加密的参数对象
*/
function apiSign(url, params) {
if (params === void 0) { params = {}; }
var convertUrl = url.trim();
if (convertUrl.indexOf('?') === -1) {
convertUrl += '?';
}
// 传入参数转换拼接字符串
var postStr = getQueryString(params);
var signedStr = genSignStr(convertUrl, postStr);
var encryptStr = "sign=" + signedStr;
var encryptSignStr = fxCry.encryptByDES(encryptStr, config.secretKey);
encryptSignStr = encodeURIComponent(encryptSignStr);
return urlencode(convertUrl) + "&_p=" + encryptSignStr;
}
cc._RF.pop(); cc._RF.pop();

File diff suppressed because one or more lines are too long

View File

@ -15,7 +15,7 @@ window.initMgr = function () {
return; return;
} }
cc.fx = {}; cc.fx = {};
console.log("初始化"); console.log("1初始化");
//基础状态信息 //基础状态信息
cc.fx.StateInfo = { cc.fx.StateInfo = {
debugMode: true, debugMode: true,
@ -28,7 +28,7 @@ window.initMgr = function () {
cc.fx.GameConfig = GameConfig_1.GameConfig; cc.fx.GameConfig = GameConfig_1.GameConfig;
cc.fx.HttpUtil = HttpUtil_1.default; cc.fx.HttpUtil = HttpUtil_1.default;
cc.fx.GameTool = GameTool_1.GameTool; cc.fx.GameTool = GameTool_1.GameTool;
cc.fx.AudioManager = AudioManager_1.AudioManager; cc.fx.AudioManager = AudioManager_1.default;
cc.fx.Notifications = Notification_1.Notifications; cc.fx.Notifications = Notification_1.Notifications;
cc.fx.StorageMessage = Storage_1.StorageMessage; cc.fx.StorageMessage = Storage_1.StorageMessage;
cc.fx.ShareInfo = { cc.fx.ShareInfo = {
@ -68,31 +68,45 @@ window.initMgr = function () {
Friend: "friend", Friend: "friend",
All: "all", All: "all",
}; };
//用于存储消息的ID
cc.fx.storageType = cc.Enum({
storageTypeCustom: 1000101,
});
//用于存储提示语 按照步骤提示
cc.fx.tipType = cc.Enum({
tipOne: '神农氏回到家中,开始整理今天收集来的物品。当他第一次拿出或说出一种植物时,请告诉他这是新植物。',
tipTwo: '如果他拿出或说出的植物你今天看到过,请告诉他上次是看到的;如果你听他说过,则请告诉他上次是听到的。',
tipErrNew: '这是这局游戏第一次出现{植物}',
tipErrOld: '{植物}刚才出现过呢',
tipErrHear: '上次遇到{植物}时,似乎不是听到的吧',
tipErrSee: '上次遇到{植物}时,似乎不是看到的吧',
tipErrLast: '之前确实看到过{植物},但最近一次似乎不是看到的呢',
});
//暂时不用 //暂时不用
cc.fx.clickStatEventType = { // cc.fx.clickStatEventType = {
clickStatEventTypeVideoAD: 20173201, // clickStatEventTypeVideoAD : 20173201,//视频播放完成
clickStatEventTypeClickAdVideo: 20173202, // clickStatEventTypeClickAdVideo : 20173202,//视频播放为完成
clickStatEventTypeBannerAD: 20173203, // clickStatEventTypeBannerAD : 20173203,//banner播放为完成
clickStatEventTypeUserFrom: 99990001, // clickStatEventTypeUserFrom : 99990001,//用户来源
clickStatEventTypeShare: 99990002, // clickStatEventTypeShare : 99990002,//用户分享
clickStatEventTypeClickAdBtn: 99990007, // clickStatEventTypeClickAdBtn : 99990007,//点击分流icon
clickStatEventTypeBannerAD2: 67890033, // clickStatEventTypeBannerAD2 : 67890033, // banner广告干预
clickStatEventTypeSubmitVersionInfo: 9999, // clickStatEventTypeSubmitVersionInfo : 9999, //上报微信版本及基础库信息
clickStatEventTypeClickFirstAd: 99990003, // clickStatEventTypeClickFirstAd : 99990003, //分流icon显示
clickStatEventTypeClickSecondAd: 99990004, // clickStatEventTypeClickSecondAd : 99990004, //玩家点击分流按钮
clickStatEventTypeWxLoginStart: 10001, // clickStatEventTypeWxLoginStart : 10001,//微信登录开始
clickStatEventTypeWxLoginSuccess: 10002, // clickStatEventTypeWxLoginSuccess : 10002,//微信登录成功
clickStatEventTypeWxLoginFailed: 10003, // clickStatEventTypeWxLoginFailed : 10003,//微信登录失败
clickStatEventTypeAuthorizationStart: 10003, // clickStatEventTypeAuthorizationStart : 10003,//授权开始
clickStatEventTypeAuthorizationSuccess: 10004, // clickStatEventTypeAuthorizationSuccess : 10004,//授权成功
clickStatEventTypeAuthorizationFailed: 10005, // clickStatEventTypeAuthorizationFailed : 10005,//授权失败
clickStatEventTypeLoginSDKStart: 10007, // clickStatEventTypeLoginSDKStart : 10007,//登录SDK开始
clickStatEventTypeLoginSDKSuccess: 10008, // clickStatEventTypeLoginSDKSuccess : 10008,//登录SDK成功
clickStatEventTypeLoginSDKFailed: 10009, // clickStatEventTypeLoginSDKFailed : 10009,//登录SDK时失败
clickStatEventTypeTCP_Start: 10009, // clickStatEventTypeTCP_Start : 10009,//TCP连接开始
clickStatEventTypeTCP_Success: 10010, // clickStatEventTypeTCP_Success : 10010,//TCP连接成功
clickStatEventTypeTCP_Failed: 10011, // clickStatEventTypeTCP_Failed : 10011,//TCP连接失败
}; // };
}; };
cc._RF.pop(); cc._RF.pop();

File diff suppressed because one or more lines are too long

View File

@ -3,6 +3,19 @@ cc._RF.push(module, '58403/n16JCa5sZhNMjZzGo', 'AudioManager');
// Script/module/Music/AudioManager.ts // Script/module/Music/AudioManager.ts
"use strict"; "use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
@ -10,22 +23,54 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
return c > 3 && r && Object.defineProperty(target, key, r), r; return c > 3 && r && Object.defineProperty(target, key, r), r;
}; };
Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "__esModule", { value: true });
exports.AudioManager = void 0;
var _a = cc._decorator, ccclass = _a.ccclass, property = _a.property; var _a = cc._decorator, ccclass = _a.ccclass, property = _a.property;
var AudioManager = /** @class */ (function () { var AudioManager = /** @class */ (function (_super) {
__extends(AudioManager, _super);
function AudioManager() { function AudioManager() {
var _this = _super !== null && _super.apply(this, arguments) || this;
//背景音乐 //背景音乐
this.audioGameBgm0 = null; _this.audioGameBgm0 = null;
//跳跃 _this.baishao_audio = null;
this.audioButtonClick = null; _this.cha_audio = null;
//落地上 _this.chixiaodou_audio = null;
this.audioWarning = null; _this.danggui_audio = null;
//碰撞 _this.danshen_audio = null;
this.audioWin = null; _this.dazao_audio = null;
_this.gancao_audio = null;
_this.ganjiang_audio = null;
_this.gouqi_audio = null;
_this.jingjie_audio = null;
_this.jinju_audio = null;
_this.lizhi_audio = null;
_this.lizi_audio = null;
_this.longyan_audio = null;
_this.moli_audio = null;
_this.muchai_audio = null;
_this.mudan_audio = null;
_this.mulan_audio = null;
_this.pugongying_audio = null;
_this.putao_audio = null;
_this.renshen_audio = null;
_this.taozi_audio = null;
_this.zhuye_audio = null;
_this.err = null;
_this.yes = null;
return _this;
} }
AudioManager_1 = AudioManager; AudioManager_1 = AudioManager;
AudioManager.playWarning = function () { AudioManager.prototype.onLoad = function () {
throw new Error('Method not implemented.'); if (AudioManager_1._instance == null) {
AudioManager_1._instance = this;
cc.game.addPersistRootNode(this.node);
}
else {
return;
}
this.reward = false;
this.finish = false;
this.rewardCount = 0;
this.ctor();
this.preload();
}; };
AudioManager.prototype.ctor = function () { AudioManager.prototype.ctor = function () {
this.mAudioMap = {}; this.mAudioMap = {};
@ -39,51 +84,41 @@ var AudioManager = /** @class */ (function () {
this.mEffectSwitch = 1; this.mEffectSwitch = 1;
}; };
AudioManager.prototype.play = function (audioSource, loop, callback, isBgMusic) { AudioManager.prototype.play = function (audioSource, loop, callback, isBgMusic) {
if (isBgMusic && !this.mMusicSwitch) // if (isBgMusic && !this.mMusicSwitch) return;
return; // if (!isBgMusic && !this.mEffectSwitch) return;
if (!isBgMusic && !this.mEffectSwitch)
return;
var volume = isBgMusic ? this.bgMusicVolume : this.effectMusicVolume; var volume = isBgMusic ? this.bgMusicVolume : this.effectMusicVolume;
if (cc.sys.isBrowser) { // if (cc.sys.isBrowser) {
if (audioSource == this.brickSound) { // if(audioSource == this.brickSound){
volume = 0.1; // volume = 0.1;
} // }
volume = 1; volume = 1;
var context = cc.audioEngine.play(audioSource, loop, volume); cc.audioEngine.setEffectsVolume(1);
if (callback) { cc.audioEngine.setMusicVolume(1);
cc.audioEngine.setFinishCallback(context, function () { var context = cc.audioEngine.playEffect(audioSource, loop);
callback.call(this); if (callback) {
}.bind(this)); cc.audioEngine.setFinishCallback(context, function () {
} callback.call(this);
// cc.wwx.OutPut.log('play audio effect isBrowser: ' + context.src); }.bind(this));
this.mAudioMap[audioSource] = context;
return audioSource;
}
else {
return audioSource;
} }
// cc.wwx.OutPut.log('play audio effect isBrowser: ' + context.src);
this.mAudioMap[audioSource] = context;
return audioSource;
// } else {
// return audioSource;
// }
}; };
AudioManager.prototype.save = function () { AudioManager.prototype.save = function () {
// cc.wwx.Storage.setItem(cc.wwx.Storage.Key_Setting_Music_Volume, this.mMusicSwitch); // cc.wwx.Storage.setItem(cc.wwx.Storage.Key_Setting_Music_Volume, this.mMusicSwitch);
// cc.wwx.Storage.setItem(cc.wwx.Storage.Key_Setting_Effect_Volume, this.mEffectSwitch); // cc.wwx.Storage.setItem(cc.wwx.Storage.Key_Setting_Effect_Volume, this.mEffectSwitch);
}; };
Object.defineProperty(AudioManager, "Instance", { // static get Instance()
get: function () { // {
if (this._instance == null) { // if (this._instance == null)
this._instance = new AudioManager_1(); // {
} // this._instance = new AudioManager();
return this._instance; // }
}, // return this._instance;
enumerable: false, // }
configurable: true
});
AudioManager.prototype.init = function () {
this.reward = false;
this.finish = false;
this.rewardCount = 0;
this.ctor();
this.preload();
};
AudioManager.prototype.preload = function () { AudioManager.prototype.preload = function () {
if (!(cc.sys.platform === cc.sys.WECHAT_GAME)) { if (!(cc.sys.platform === cc.sys.WECHAT_GAME)) {
return; return;
@ -128,6 +163,11 @@ var AudioManager = /** @class */ (function () {
AudioManager.prototype.onShow = function () { AudioManager.prototype.onShow = function () {
cc.audioEngine.resumeAll(); cc.audioEngine.resumeAll();
}; };
//播放音效
AudioManager.prototype.playEffect = function (name, callback) {
if (this[name])
return this.play(this[name], false, callback, this.mEffectSwitch);
};
AudioManager.prototype.playMusic = function (key, callback, loop) { AudioManager.prototype.playMusic = function (key, callback, loop) {
loop = typeof loop == 'undefined' || loop ? true : false; loop = typeof loop == 'undefined' || loop ? true : false;
this.stopMusic(); this.stopMusic();
@ -155,14 +195,6 @@ var AudioManager = /** @class */ (function () {
cc.audioEngine.stop(context); cc.audioEngine.stop(context);
} }
}; };
// 炸弹、火箭爆炸音效
AudioManager.prototype.playWin = function () {
return this.play(this.audioWin, false, null, this.mEffectSwitch);
};
//激光音效
AudioManager.prototype.playWarning = function () {
return this.play(this.audioWarning, false, null, this.mEffectSwitch);
};
/* /*
* 游戏开始音效 * 游戏开始音效
* *
@ -191,28 +223,93 @@ var AudioManager = /** @class */ (function () {
* 按钮 * 按钮
*/ */
AudioManager.prototype.playAudioButton = function () { AudioManager.prototype.playAudioButton = function () {
return this.play(this.audioButtonClick, false, null, this.mEffectSwitch); // return this.play(this.audioButtonClick, false,null,this.mEffectSwitch);
}; };
var AudioManager_1; var AudioManager_1;
AudioManager._instance = null;
__decorate([ __decorate([
property(cc.AudioClip) property(cc.AudioClip)
], AudioManager.prototype, "audioGameBgm0", void 0); ], AudioManager.prototype, "audioGameBgm0", void 0);
__decorate([ __decorate([
property(cc.AudioClip) property(cc.AudioClip)
], AudioManager.prototype, "audioButtonClick", void 0); ], AudioManager.prototype, "baishao_audio", void 0);
__decorate([ __decorate([
property(cc.AudioClip) property(cc.AudioClip)
], AudioManager.prototype, "audioWarning", void 0); ], AudioManager.prototype, "cha_audio", void 0);
__decorate([ __decorate([
property(cc.AudioClip) property(cc.AudioClip)
], AudioManager.prototype, "audioWin", void 0); ], AudioManager.prototype, "chixiaodou_audio", void 0);
__decorate([
property(cc.AudioClip)
], AudioManager.prototype, "danggui_audio", void 0);
__decorate([
property(cc.AudioClip)
], AudioManager.prototype, "danshen_audio", void 0);
__decorate([
property(cc.AudioClip)
], AudioManager.prototype, "dazao_audio", void 0);
__decorate([
property(cc.AudioClip)
], AudioManager.prototype, "gancao_audio", void 0);
__decorate([
property(cc.AudioClip)
], AudioManager.prototype, "ganjiang_audio", void 0);
__decorate([
property(cc.AudioClip)
], AudioManager.prototype, "gouqi_audio", void 0);
__decorate([
property(cc.AudioClip)
], AudioManager.prototype, "jingjie_audio", void 0);
__decorate([
property(cc.AudioClip)
], AudioManager.prototype, "jinju_audio", void 0);
__decorate([
property(cc.AudioClip)
], AudioManager.prototype, "lizhi_audio", void 0);
__decorate([
property(cc.AudioClip)
], AudioManager.prototype, "lizi_audio", void 0);
__decorate([
property(cc.AudioClip)
], AudioManager.prototype, "longyan_audio", void 0);
__decorate([
property(cc.AudioClip)
], AudioManager.prototype, "moli_audio", void 0);
__decorate([
property(cc.AudioClip)
], AudioManager.prototype, "muchai_audio", void 0);
__decorate([
property(cc.AudioClip)
], AudioManager.prototype, "mudan_audio", void 0);
__decorate([
property(cc.AudioClip)
], AudioManager.prototype, "mulan_audio", void 0);
__decorate([
property(cc.AudioClip)
], AudioManager.prototype, "pugongying_audio", void 0);
__decorate([
property(cc.AudioClip)
], AudioManager.prototype, "putao_audio", void 0);
__decorate([
property(cc.AudioClip)
], AudioManager.prototype, "renshen_audio", void 0);
__decorate([
property(cc.AudioClip)
], AudioManager.prototype, "taozi_audio", void 0);
__decorate([
property(cc.AudioClip)
], AudioManager.prototype, "zhuye_audio", void 0);
__decorate([
property(cc.AudioClip)
], AudioManager.prototype, "err", void 0);
__decorate([
property(cc.AudioClip)
], AudioManager.prototype, "yes", void 0);
AudioManager = AudioManager_1 = __decorate([ AudioManager = AudioManager_1 = __decorate([
ccclass('AudioManager') ccclass
], AudioManager); ], AudioManager);
return AudioManager; return AudioManager;
}()); }(cc.Component));
exports.AudioManager = AudioManager; exports.default = AudioManager;
; ;
// export { AudioManager }; // export { AudioManager };

File diff suppressed because one or more lines are too long

View File

@ -39,7 +39,9 @@ var ItemRender = /** @class */ (function (_super) {
cc.fx.GameTool.subName(this.data.name, 6); cc.fx.GameTool.subName(this.data.name, 6);
this.node.getChildByName("rankLab").getComponent(cc.Label).string = this.data.rank + ""; this.node.getChildByName("rankLab").getComponent(cc.Label).string = this.data.rank + "";
this.node.getChildByName("nameLab").getComponent(cc.Label).string = this.data.name + ""; this.node.getChildByName("nameLab").getComponent(cc.Label).string = this.data.name + "";
this.node.getChildByName("totalLab").getComponent(cc.Label).string = this.data.total + ""; this.node.getChildByName("totalLab").getComponent(cc.Label).string = this.data.total + "%";
var timeTemp = cc.fx.GameTool.getTimeShenNong(this.data.time);
this.node.getChildByName("timeLab").getComponent(cc.Label).string = timeTemp + "";
this.node.getChildByName("rank").getChildByName("one").active = false; this.node.getChildByName("rank").getChildByName("one").active = false;
this.node.getChildByName("rank").getChildByName("two").active = false; this.node.getChildByName("rank").getChildByName("two").active = false;
this.node.getChildByName("rank").getChildByName("three").active = false; this.node.getChildByName("rank").getChildByName("three").active = false;

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,130 @@
"use strict";
cc._RF.push(module, '7290caA39xMWZc2phTMKovP', 'share');
// Script/module/Share/share.ts
"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
var __generator = (this && this.__generator) || function (thisArg, body) {
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
function verb(n) { return function (v) { return step([n, v]); }; }
function step(op) {
if (f) throw new TypeError("Generator is already executing.");
while (_) try {
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
if (y = 0, t) op = [op[0] & 2, t.value];
switch (op[0]) {
case 0: case 1: t = op; break;
case 4: _.label++; return { value: op[1], done: false };
case 5: _.label++; y = op[1]; op = [0]; continue;
case 7: op = _.ops.pop(); _.trys.pop(); continue;
default:
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
if (t[2]) _.ops.pop();
_.trys.pop(); continue;
}
op = body.call(thisArg, _);
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
}
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.WeChat = void 0;
var shareConfig = {
gameId: "100010",
shareLine: "zDLsruVI",
EK: "hui231%1"
};
// 微信操作类
var WeChat = /** @class */ (function () {
function WeChat() {
}
WeChat.setShare = function (url) {
var urlTemp = this.removeQueryParams(url);
shareConfig.shareLine = urlTemp;
WeChat.getSignature(url);
};
WeChat.getResult = function (res) {
if (res) {
var data = res.data;
wx.config({
debug: false,
appId: data.appId,
timestamp: data.timestamp,
nonceStr: data.nonceStr,
signature: data.signature,
jsApiList: ['onMenuShareTimeline', 'updateAppMessageShareData', 'updateTimelineShareData', 'onMenuShareAppMessage']
});
wx.checkJsApi({
jsApiList: ['updateAppMessageShareData'],
success: function (res) {
setTimeout(function () {
WeChat.changeShare();
}, 100);
setTimeout(function () {
WeChat.changeShare();
}, 200);
}
});
}
};
WeChat.changeShare = function () {
wx.ready(function () {
wx.updateAppMessageShareData({
title: '记忆力认知测评',
desc: '你的认知灵活性和选择注意有问题吗',
link: shareConfig.shareLine,
imgUrl: 'https://static.sparkus.cn/public/shennong.jpg',
success: function () {
// 设置成功
console.log("分享好友成功回调");
}
});
wx.updateTimelineShareData({
title: '记忆力认知测评',
link: shareConfig.shareLine,
imgUrl: 'https://static.sparkus.cn/public/shennong.jpg',
success: function () {
// 设置成功
console.log("分享朋友圈成功回调");
}
});
});
};
WeChat.getSignature = function (url) {
return new Promise(function (resolve) {
WeChat.getShareInfo((encodeURIComponent(url)), WeChat.getResult);
});
};
WeChat.getShareInfo = function (shareUrl, callback) {
return __awaiter(this, void 0, Promise, function () {
var time, url;
return __generator(this, function (_a) {
time = Math.floor((new Date().getTime()) / 1000);
url = cc.fx.HttpUtil.apiSign("/api/share/cfg?gameId=" + shareConfig.gameId + "&time=" + time + "&url=" + shareUrl, {});
return [2 /*return*/, cc.fx.HttpUtil.get(url, callback)];
});
});
};
WeChat.containsNanana = function (str) {
return /test/i.test(str);
};
WeChat.removeQueryParams = function (url) {
return url.replace(/\?.*$/, '');
};
return WeChat;
}());
exports.WeChat = WeChat;
cc._RF.pop();

File diff suppressed because one or more lines are too long

View File

@ -15,7 +15,7 @@ var GameTool = {
var name = "user_" + cc.fx.GameConfig.GM_INFO.gameId; var name = "user_" + cc.fx.GameConfig.GM_INFO.gameId;
var data = JSON.parse(localStorage.getItem(name)); var data = JSON.parse(localStorage.getItem(name));
if (data == "undifend" || data == null || data == "") { if (data == "undifend" || data == null || data == "") {
var url = "http://api.sparkus.cn/api/user/auth/login?domain=hui32579WdYPsgYq&callback=" + location.href; var url = "https://api.sparkus.cn/api/user/auth/login?domain=hui32579WdYPsgYq&callback=" + location.href;
window.location.href = url; window.location.href = url;
} }
else { else {
@ -37,7 +37,7 @@ var GameTool = {
"matchId": matchId, "matchId": matchId,
"data": data "data": data
}; };
// console.log("上传数据:") console.log("上传数据:");
cc.fx.HttpUtil.uploadUserLogData(postData, function () { }); cc.fx.HttpUtil.uploadUserLogData(postData, function () { });
}, },
//上传排行榜 type为1 //上传排行榜 type为1
@ -47,8 +47,8 @@ var GameTool = {
"gameId": cc.fx.GameConfig.GM_INFO.gameId, "gameId": cc.fx.GameConfig.GM_INFO.gameId,
"userId": cc.fx.GameConfig.GM_INFO.userId, "userId": cc.fx.GameConfig.GM_INFO.userId,
"type": 1, "type": 1,
"reactionTime": data, "totleTimes": data.totleTimes,
"totalSunCount": cc.fx.GameConfig.GM_INFO.total, "accuracy": data.accuracy,
"success": cc.fx.GameConfig.GM_INFO.success "success": cc.fx.GameConfig.GM_INFO.success
}; };
cc.fx.HttpUtil.rankData(1, function () { }, postData); cc.fx.HttpUtil.rankData(1, function () { }, postData);
@ -68,6 +68,7 @@ var GameTool = {
//获取matchId 用于上传每次点击数据里面记录id方便查询 //获取matchId 用于上传每次点击数据里面记录id方便查询
getMatchId: function () { getMatchId: function () {
var matchId = cc.sys.localStorage.getItem("matchId"); var matchId = cc.sys.localStorage.getItem("matchId");
var tempId = matchId;
if (matchId == "undifend" || matchId == null) { if (matchId == "undifend" || matchId == null) {
matchId = this.setMatchId(); matchId = this.setMatchId();
} }
@ -76,15 +77,20 @@ var GameTool = {
matchId = this.setMatchId(); matchId = this.setMatchId();
} }
else { else {
var char = parseInt(matchId[10]); var char = parseInt(tempId.substring(10, tempId.length));
if (this.level == 1) { if (cc.fx.GameConfig.GM_INFO.level == 1) {
char += 1; char += 1;
matchId = tempId.slice(0, 10) + char + "";
if (this.containsNanana(matchId))
matchId = this.setMatchId();
cc.fx.GameConfig.GM_INFO.matchId = matchId;
cc.sys.localStorage.setItem("matchId", matchId);
} }
matchId = matchId.slice(0, 10) + char + "";
cc.fx.GameConfig.GM_INFO.matchId = matchId;
cc.sys.localStorage.setItem("matchId", matchId);
} }
} }
if (this.containsNanana(matchId) == true) {
matchId = this.setMatchId();
}
return matchId; return matchId;
}, },
//检测matchId 如果有缓存以前的nanana数据清除 //检测matchId 如果有缓存以前的nanana数据清除
@ -156,7 +162,7 @@ var GameTool = {
var self = false; var self = false;
cc.fx.GameTool.setPic(target.selfNode.getChildByName("pic").getChildByName("icon"), target.selfData.pic); cc.fx.GameTool.setPic(target.selfNode.getChildByName("pic").getChildByName("icon"), target.selfData.pic);
for (var i = 0; i <= target.listData.length - 1; i++) { for (var i = 0; i <= target.listData.length - 1; i++) {
rankData.push({ rank: (i + 1), name: target.listData[i].nickName, total: target.listData[i].totalSunCount, pic: target.listData[i].pic }); rankData.push({ rank: (i + 1), name: target.listData[i].nickName, total: target.listData[i].accuracy, time: target.listData[i].totleTimes, pic: target.listData[i].pic });
if (cc.fx.GameConfig.GM_INFO.userId == target.listData[i].userId) { if (cc.fx.GameConfig.GM_INFO.userId == target.listData[i].userId) {
self = true; self = true;
target.rankNumber = i; target.rankNumber = i;
@ -169,7 +175,9 @@ var GameTool = {
} }
cc.fx.GameTool.subName(target.selfData.nickName, nameLength); cc.fx.GameTool.subName(target.selfData.nickName, nameLength);
target.selfNode.getChildByName("nameLab").getComponent(cc.Label).string = target.selfData.nickName; target.selfNode.getChildByName("nameLab").getComponent(cc.Label).string = target.selfData.nickName;
target.selfNode.getChildByName("totalLab").getComponent(cc.Label).string = target.selfData.totalSunCount; target.selfNode.getChildByName("totalLab").getComponent(cc.Label).string = target.selfData.accuracy + "%";
var timeTemp = cc.fx.GameTool.getTimeShenNong(target.selfData.totleTimes);
target.selfNode.getChildByName("timeLab").getComponent(cc.Label).string = timeTemp + "";
switch (target.selfNode.getChildByName("rankLab").getComponent(cc.Label).string) { switch (target.selfNode.getChildByName("rankLab").getComponent(cc.Label).string) {
case "1": case "1":
target.selfNode.getChildByName("rank").getChildByName("one").active = true; target.selfNode.getChildByName("rank").getChildByName("one").active = true;
@ -189,6 +197,120 @@ var GameTool = {
target.selfNode.opacity = 0; target.selfNode.opacity = 0;
} }
}, },
getSeedRandom: function (min, max) {
console.log("随机数:", cc.fx.GameConfig.GM_INFO.currSeed);
max = max || 1;
min = min || 0;
cc.fx.GameConfig.GM_INFO.currSeed = (cc.fx.GameConfig.GM_INFO.currSeed * 9301 + 49297) % 233280;
var rnd = cc.fx.GameConfig.GM_INFO.currSeed / 233280.0;
var tmp = min + rnd * (max - min);
return parseInt(tmp);
},
//获取关卡配置的那个关卡数
getCustom: function (type) {
var custom = cc.fx.StorageMessage.getStorage(cc.fx.storageType.storageTypeCustom);
if (custom == "undifend" || custom == null || custom == "") {
this.setCustom();
}
else {
cc.fx.GameConfig.GM_INFO_SET("custom", custom[0]);
if (custom[0] != 0 || type == true) {
custom.shift();
if (custom.length == 0) {
this.setCustom();
}
else
cc.fx.StorageMessage.setStorage(cc.fx.storageType.storageTypeCustom, custom);
}
}
},
//本地没有存储到配置,或者配置用完,重新创建配置
setCustom: function () {
var arrayLength = cc.fx.GameConfig.LEVEL_INFO.length;
var arrayList = [];
for (var i = 1; i < arrayLength; i++) {
arrayList.push(i);
}
arrayList.sort(function () { return Math.random() - 0.5; });
arrayList.unshift(0);
cc.fx.GameConfig.GM_INFO_SET("custom", arrayList[0]);
cc.fx.StorageMessage.setStorage(cc.fx.storageType.storageTypeCustom, arrayList);
},
getFoodName: function (food) {
var name = "葡萄";
switch (food) {
case "baishao":
name = "白芍";
break;
case "jingjie":
name = "荆芥";
break;
case "renshen":
name = "人参";
break;
case "danshen":
name = "丹参";
break;
case "danggui":
name = "当归";
break;
case "gouqi":
name = "枸杞";
break;
case "mudan":
name = "牡丹";
break;
case "mulan":
name = "木兰";
break;
case "pugongying":
name = "蒲公英";
break;
case "moli":
name = "茉莉";
break;
case "jinju":
name = "金桔";
break;
case "dazao":
name = "大枣";
break;
case "lizi":
name = "李子";
break;
case "lizhi":
name = "荔枝";
break;
case "taozi":
name = "桃子";
break;
case "putao":
name = "葡萄";
break;
case "muchai":
name = "木柴";
break;
case "ganjiang":
name = "干姜";
break;
case "zhuye":
name = "竹叶";
break;
case "longyan":
name = "龙眼";
break;
case "chixiaodou":
name = "赤小豆";
break;
case "gancao":
name = "甘草";
break;
case "cha":
name = "茶";
break;
}
return name;
},
getSetScreenResolutionFlag: function () { getSetScreenResolutionFlag: function () {
var size = cc.winSize; var size = cc.winSize;
var width = size.width; var width = size.width;
@ -216,6 +338,23 @@ var GameTool = {
//设置游戏信息 //设置游戏信息
setGameInfo: function (pd) { setGameInfo: function (pd) {
}, },
//打字机效果
typingAni: function (label, text, cb, target) {
var self = target;
var html = '';
var arr = text.split('');
var len = arr.length;
var step = 0;
self.func = function () {
html += arr[step];
label.string = html;
if (++step == len) {
self.unschedule(self.func);
cb && cb();
}
};
self.schedule(self.func, 0.1, cc.macro.REPEAT_FOREVER, 0);
},
//输入秒,返回需要展示时间格式 //输入秒,返回需要展示时间格式
getTimeMargin: function (second) { getTimeMargin: function (second) {
var total = 0; var total = 0;
@ -233,6 +372,20 @@ var GameTool = {
miao = "0" + afterMin; miao = "0" + afterMin;
return m + ':' + miao; return m + ':' + miao;
}, },
//输入秒,返回需要展示时间格式
getTimeShenNong: function (second) {
second = parseInt(second / 1000 + "");
var total = 0;
total = second;
var min = 0;
if (total > 60) {
min = parseInt((total / 60) + ""); //计算整数分
}
var m = min + "'";
var afterMin = total - min * 60; //取得算出分后剩余的秒数
var miao = afterMin + "''";
return m + miao;
},
//获取时间戳 //获取时间戳
getTime: function () { getTime: function () {
var timestamp = new Date().getTime(); var timestamp = new Date().getTime();

File diff suppressed because one or more lines are too long