Compare commits
No commits in common. "6c880489869ed2e5555044c31557c9512ab2f651" and "a0de1686b86de9e9805cb3776ca28b6a88e1fa0c" have entirely different histories.
6c88048986
...
a0de1686b8
|
@ -586,7 +586,7 @@
|
||||||
"__id__": 18
|
"__id__": 18
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"_active": false,
|
"_active": true,
|
||||||
"_components": [
|
"_components": [
|
||||||
{
|
{
|
||||||
"__id__": 21
|
"__id__": 21
|
||||||
|
@ -3041,7 +3041,7 @@
|
||||||
"__id__": 7
|
"__id__": 7
|
||||||
},
|
},
|
||||||
"_children": [],
|
"_children": [],
|
||||||
"_active": false,
|
"_active": true,
|
||||||
"_components": [
|
"_components": [
|
||||||
{
|
{
|
||||||
"__id__": 64
|
"__id__": 64
|
||||||
|
@ -3137,7 +3137,7 @@
|
||||||
"__id__": 7
|
"__id__": 7
|
||||||
},
|
},
|
||||||
"_children": [],
|
"_children": [],
|
||||||
"_active": false,
|
"_active": true,
|
||||||
"_components": [
|
"_components": [
|
||||||
{
|
{
|
||||||
"__id__": 66
|
"__id__": 66
|
||||||
|
|
|
@ -65,13 +65,7 @@ private heathScheduleCallback: Function = null;
|
||||||
// console.log("加载关卡配置2");
|
// console.log("加载关卡配置2");
|
||||||
// window.initMgr();
|
// window.initMgr();
|
||||||
GameManager._instance.Block_Color = this.Block_Color;
|
GameManager._instance.Block_Color = this.Block_Color;
|
||||||
let version = cc.fx.GameTool.getWechatGameVersion();
|
|
||||||
if(version == "开发版" || version == "体验版"){
|
|
||||||
this.node.getChildByName("Load").getChildByName("New EditBox").active = true;
|
|
||||||
}
|
|
||||||
else if(version == "正式版"){
|
|
||||||
this.node.getChildByName("Load").getChildByName("New EditBox").active = false
|
|
||||||
}
|
|
||||||
// 预加载 shop 预制体
|
// 预加载 shop 预制体
|
||||||
if (!JiaZai.cachedShopPrefab) {
|
if (!JiaZai.cachedShopPrefab) {
|
||||||
cc.assetManager.loadBundle('shop', (err: Error, bundle: cc.AssetManager.Bundle) => {
|
cc.assetManager.loadBundle('shop', (err: Error, bundle: cc.AssetManager.Bundle) => {
|
||||||
|
@ -94,12 +88,7 @@ private heathScheduleCallback: Function = null;
|
||||||
console.log("————————准备注册事件", cc.fx.GameConfig.GM_INFO.openid);
|
console.log("————————准备注册事件", cc.fx.GameConfig.GM_INFO.openid);
|
||||||
if (cc.fx.GameConfig.GM_INFO.openid != "") {
|
if (cc.fx.GameConfig.GM_INFO.openid != "") {
|
||||||
console.log("————————发送注册事件");
|
console.log("————————发送注册事件");
|
||||||
const time = cc.fx.GameTool.formatDate(new Date());
|
cc.fx.GameTool.shushu_Track("register");
|
||||||
let data = {
|
|
||||||
register_time: time, // 注册时间
|
|
||||||
}
|
|
||||||
cc.fx.GameTool.shushu_Track("register",data);
|
|
||||||
MiniGameSdk.API.shushu_SetSuperProperties(time);
|
|
||||||
}
|
}
|
||||||
cc.fx.AudioManager._instance.playEffect("zhuan1", null);
|
cc.fx.AudioManager._instance.playEffect("zhuan1", null);
|
||||||
this.node.getChildByName("zhuanchang").active = true;
|
this.node.getChildByName("zhuanchang").active = true;
|
||||||
|
@ -286,8 +275,6 @@ stopHeathTimeCutDown() {
|
||||||
}
|
}
|
||||||
if (this.node.getChildByName("Load").getChildByName("startBtn").getComponent("btnControl")._touch) {
|
if (this.node.getChildByName("Load").getChildByName("startBtn").getComponent("btnControl")._touch) {
|
||||||
this.node.getChildByName("Load").getChildByName("startBtn").getComponent("btnControl").setTouch(false);
|
this.node.getChildByName("Load").getChildByName("startBtn").getComponent("btnControl").setTouch(false);
|
||||||
let version = cc.fx.GameTool.getWechatGameVersion();
|
|
||||||
if(version == "开发版" || version == "体验版"){
|
|
||||||
if(this.custom.string != ""){
|
if(this.custom.string != ""){
|
||||||
cc.fx.GameConfig.GM_INFO.level = parseInt(this.custom.string) - 1;
|
cc.fx.GameConfig.GM_INFO.level = parseInt(this.custom.string) - 1;
|
||||||
// cc.fx.StorageMessage.setStorage("level",cc.fx.GameConfig.GM_INFO.level.toString());
|
// cc.fx.StorageMessage.setStorage("level",cc.fx.GameConfig.GM_INFO.level.toString());
|
||||||
|
@ -300,13 +287,6 @@ stopHeathTimeCutDown() {
|
||||||
cc.fx.GameConfig.LEVEL_INFO_init(true, 1000);
|
cc.fx.GameConfig.LEVEL_INFO_init(true, 1000);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if(version == "正式版"){
|
|
||||||
cc.fx.AudioManager._instance.playEffect("zhuan1", null);
|
|
||||||
this.node.getChildByName("zhuanchang").active = true;
|
|
||||||
this.node.getChildByName("zhuanchang").getComponent(sp.Skeleton).setAnimation(1, "up", false);
|
|
||||||
cc.fx.GameConfig.LEVEL_INFO_init(true, 1000);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1137,7 +1137,7 @@ export namespace MiniGameSdk {
|
||||||
API._ta.login(cc.fx.GameConfig.GM_INFO.openid);
|
API._ta.login(cc.fx.GameConfig.GM_INFO.openid);
|
||||||
const result = "success";
|
const result = "success";
|
||||||
API.shushu_Track("login", result);
|
API.shushu_Track("login", result);
|
||||||
API.shushu_SetSuperProperties(null);
|
API.shushu_SetSuperProperties();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1152,26 +1152,16 @@ export namespace MiniGameSdk {
|
||||||
* 数数平台设置动态公共属性
|
* 数数平台设置动态公共属性
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static shushu_SetSuperProperties(register_time) {
|
static shushu_SetSuperProperties() {
|
||||||
if (typeof wx !== 'undefined' && wx !== null && API._ta) {
|
if (typeof wx !== 'undefined' && wx !== null && API._ta) {
|
||||||
const versionData = "1.3";
|
const versionData = "1.3";
|
||||||
// API._ta.userSetOnce({ register_time:time});
|
// API._ta.userSetOnce({ register_time:time});
|
||||||
var superProperties = {};
|
var superProperties = {
|
||||||
superProperties = {
|
|
||||||
current_level: (cc.fx.GameConfig.GM_INFO.level + 1), //当前关卡等级 number
|
current_level: (cc.fx.GameConfig.GM_INFO.level + 1), //当前关卡等级 number
|
||||||
current_health: cc.fx.GameConfig.GM_INFO.hp, //当前体力值
|
current_health: cc.fx.GameConfig.GM_INFO.hp, //当前体力值
|
||||||
tmp_coin: cc.fx.GameConfig.GM_INFO.coin,//当前金币
|
tmp_coin: cc.fx.GameConfig.GM_INFO.coin,//当前金币
|
||||||
version: versionData
|
version: versionData
|
||||||
};
|
};
|
||||||
if(register_time != null){
|
|
||||||
superProperties = {
|
|
||||||
current_level: (cc.fx.GameConfig.GM_INFO.level + 1), //当前关卡等级 number
|
|
||||||
current_health: cc.fx.GameConfig.GM_INFO.hp, //当前体力值
|
|
||||||
tmp_coin: cc.fx.GameConfig.GM_INFO.coin,//当前金币
|
|
||||||
version: versionData,
|
|
||||||
register_time:register_time
|
|
||||||
};
|
|
||||||
}
|
|
||||||
API._ta.setSuperProperties(superProperties);//设置公共事件属性
|
API._ta.setSuperProperties(superProperties);//设置公共事件属性
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -353,7 +353,7 @@ var GameTool = {
|
||||||
result:"success"
|
result:"success"
|
||||||
}
|
}
|
||||||
cc.fx.GameTool.shushu_Track("finish_stage",data);
|
cc.fx.GameTool.shushu_Track("finish_stage",data);
|
||||||
MiniGameSdk.API.shushu_SetSuperProperties(null);
|
MiniGameSdk.API.shushu_SetSuperProperties();
|
||||||
}
|
}
|
||||||
|
|
||||||
cc.fx.GameTool.setUserLevel((data)=>{
|
cc.fx.GameTool.setUserLevel((data)=>{
|
||||||
|
@ -382,7 +382,7 @@ var GameTool = {
|
||||||
coin: cc.fx.GameConfig.GM_INFO.coin,
|
coin: cc.fx.GameConfig.GM_INFO.coin,
|
||||||
timestamp: timestamp,
|
timestamp: timestamp,
|
||||||
}
|
}
|
||||||
MiniGameSdk.API.shushu_SetSuperProperties(null);
|
MiniGameSdk.API.shushu_SetSuperProperties();
|
||||||
cc.fx.StorageMessage.setStorage("coin", coinInfo);
|
cc.fx.StorageMessage.setStorage("coin", coinInfo);
|
||||||
// console.log("存储金币数据:",cc.fx.GameConfig.GM_INFO.coin,coinInfo);
|
// console.log("存储金币数据:",cc.fx.GameConfig.GM_INFO.coin,coinInfo);
|
||||||
cc.fx.GameTool.setUserCoin((data) => {
|
cc.fx.GameTool.setUserCoin((data) => {
|
||||||
|
@ -494,7 +494,7 @@ var GameTool = {
|
||||||
"health":cc.fx.GameConfig.GM_INFO.hp,
|
"health":cc.fx.GameConfig.GM_INFO.hp,
|
||||||
"timestamp":data.result.timestamp
|
"timestamp":data.result.timestamp
|
||||||
}
|
}
|
||||||
MiniGameSdk.API.shushu_SetSuperProperties(null);
|
MiniGameSdk.API.shushu_SetSuperProperties();
|
||||||
cc.fx.StorageMessage.setStorage("health",healthInfo);
|
cc.fx.StorageMessage.setStorage("health",healthInfo);
|
||||||
}
|
}
|
||||||
else if(data.result.code == 404 && data.result.message == "未找到体力数据"){
|
else if(data.result.code == 404 && data.result.message == "未找到体力数据"){
|
||||||
|
@ -588,7 +588,7 @@ var GameTool = {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
cc.fx.StorageMessage.setStorage("health",healthInfo);
|
cc.fx.StorageMessage.setStorage("health",healthInfo);
|
||||||
MiniGameSdk.API.shushu_SetSuperProperties(null);
|
MiniGameSdk.API.shushu_SetSuperProperties();
|
||||||
//@ts-ignore
|
//@ts-ignore
|
||||||
if (typeof wx!== 'undefined' && wx!== null) {
|
if (typeof wx!== 'undefined' && wx!== null) {
|
||||||
//@ts-ignore
|
//@ts-ignore
|
||||||
|
@ -887,9 +887,6 @@ var GameTool = {
|
||||||
let eventData = {}
|
let eventData = {}
|
||||||
switch(name){
|
switch(name){
|
||||||
case "register":
|
case "register":
|
||||||
eventData = {
|
|
||||||
register_time: data.register_time,
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
case "enter_stage":
|
case "enter_stage":
|
||||||
eventData = {
|
eventData = {
|
||||||
|
|
|
@ -1275,7 +1275,7 @@
|
||||||
"ctor": "Float64Array",
|
"ctor": "Float64Array",
|
||||||
"array": [
|
"array": [
|
||||||
15,
|
15,
|
||||||
160,
|
150,
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
|
@ -1971,7 +1971,7 @@
|
||||||
"ctor": "Float64Array",
|
"ctor": "Float64Array",
|
||||||
"array": [
|
"array": [
|
||||||
20,
|
20,
|
||||||
160,
|
150,
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
|
@ -2667,7 +2667,7 @@
|
||||||
"ctor": "Float64Array",
|
"ctor": "Float64Array",
|
||||||
"array": [
|
"array": [
|
||||||
15,
|
15,
|
||||||
160,
|
150,
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
|
@ -3363,7 +3363,7 @@
|
||||||
"ctor": "Float64Array",
|
"ctor": "Float64Array",
|
||||||
"array": [
|
"array": [
|
||||||
18,
|
18,
|
||||||
165,
|
150,
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
|
@ -4059,7 +4059,7 @@
|
||||||
"ctor": "Float64Array",
|
"ctor": "Float64Array",
|
||||||
"array": [
|
"array": [
|
||||||
14,
|
14,
|
||||||
165,
|
150,
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
|
@ -4755,7 +4755,7 @@
|
||||||
"ctor": "Float64Array",
|
"ctor": "Float64Array",
|
||||||
"array": [
|
"array": [
|
||||||
21,
|
21,
|
||||||
165,
|
150,
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user