Compare commits
No commits in common. "6a07a4f30dfda1602380bcf9fac4dca8c1f1f666" and "7cd510c66fcad5faf8973a60f28a3b62eb98ee9d" have entirely different histories.
6a07a4f30d
...
7cd510c66f
|
@ -6196,8 +6196,8 @@
|
|||
"alignMode": 1,
|
||||
"_target": null,
|
||||
"_alignFlags": 45,
|
||||
"_left": -5.46229728115577e-14,
|
||||
"_right": 5.46229728115577e-14,
|
||||
"_left": 0,
|
||||
"_right": 0,
|
||||
"_top": 0,
|
||||
"_bottom": 0,
|
||||
"_verticalCenter": 0,
|
||||
|
|
|
@ -499,24 +499,6 @@ export default class Block extends cc.Component {
|
|||
this.node.off(cc.Node.EventType.TOUCH_MOVE);
|
||||
this.node.off(cc.Node.EventType.TOUCH_CANCEL);
|
||||
this.node.off(cc.Node.EventType.TOUCH_END);
|
||||
if(diraction == 2 || diraction == 3){
|
||||
// 获取当前节点的宽度和高度
|
||||
const currentWidth = this.node.width;
|
||||
const currentHeight = this.node.height;
|
||||
// 假设将高度增加 50,你可以根据需求修改这个值
|
||||
const newHeight = currentHeight + 50;
|
||||
// 设置新的节点尺寸
|
||||
this.node.setContentSize(currentWidth, newHeight);
|
||||
}
|
||||
else if(diraction == 0 || diraction == 1){
|
||||
// 获取当前节点的宽度和高度
|
||||
const currentWidth = this.node.width;
|
||||
const currentHeight = this.node.height;
|
||||
// 假设将高度增加 50,你可以根据需求修改这个值
|
||||
const newWidth = currentWidth + 50;
|
||||
// 设置新的节点尺寸
|
||||
this.node.setContentSize(newWidth, currentHeight);
|
||||
}
|
||||
this.node.addComponent(cc.Mask);
|
||||
let self = this;
|
||||
let pos = this.node.getPosition();
|
||||
|
@ -588,8 +570,6 @@ export default class Block extends cc.Component {
|
|||
}
|
||||
}
|
||||
|
||||
MapConroler._instance.judgeWin();
|
||||
|
||||
setTimeout(() => {
|
||||
let tempColor = this.color;
|
||||
setTimeout(() => {
|
||||
|
@ -762,7 +742,6 @@ export default class Block extends cc.Component {
|
|||
var self = this;
|
||||
this.removeMapBlock();
|
||||
|
||||
MapConroler._instance.judgeWin();
|
||||
setTimeout(() => {
|
||||
let pos = this.node.getPosition();
|
||||
if(self.type == BlockType.叠加块下){
|
||||
|
|
|
@ -212,7 +212,6 @@ export default class GameManager extends cc.Component {
|
|||
//@ts-ignore
|
||||
if (typeof wx !== 'undefined' && wx !== null) {
|
||||
MiniGameSdk.API.shushu_Init();
|
||||
MiniGameSdk.API.yinli_Init();
|
||||
Utils.getUserInfo((data)=>{
|
||||
console.log("登陆成功",data);
|
||||
});
|
||||
|
|
|
@ -217,7 +217,6 @@ export default class MapConroler extends cc.Component {
|
|||
startUpdate() {
|
||||
if (this.gameStart == false) {
|
||||
this.gameStart = true;
|
||||
this.count_Time = Date.now();
|
||||
//发送数数事件——进入关卡
|
||||
console.log("准备进入下一关,发送下一关进入");
|
||||
if((cc.fx.GameConfig.GM_INFO.level + 1) == 1) {
|
||||
|
@ -238,6 +237,7 @@ export default class MapConroler extends cc.Component {
|
|||
this.timeNumber = cc.fx.GameConfig.LEVEL_INFO[0].time;
|
||||
console.log("当前关卡时间", this.timeNumber);
|
||||
|
||||
this.count_Time = 0;
|
||||
this.add_Time = 0;
|
||||
NumberToImage.getTimeMargin(this.timeNumber, 50, "time_", this.timeLabel)
|
||||
|
||||
|
@ -1327,14 +1327,6 @@ export default class MapConroler extends cc.Component {
|
|||
|
||||
}
|
||||
|
||||
judgeWin(){
|
||||
this.blockNum = this.blocks.length;
|
||||
if((this.blockNum == 0 || this.blockNum == 1) &&!this.gameWin &&!this.gameOver){
|
||||
this.stopTimeCutDown();
|
||||
this.stopBoom();
|
||||
}
|
||||
}
|
||||
|
||||
//判断游戏成功下一关
|
||||
nextLevel() {
|
||||
this.pause = false;
|
||||
|
@ -1350,8 +1342,7 @@ export default class MapConroler extends cc.Component {
|
|||
// console.log("即将上报成功________________________:",this.add_Time);
|
||||
// console.log("成功消除一个",this.add_Time);
|
||||
cc.fx.GameTool.changeCoin(40);
|
||||
let overTime = Date.now();
|
||||
this.count_Time = overTime - this.count_Time;
|
||||
|
||||
cc.fx.GameTool.addLevel(this.count_Time, this.add_Time);
|
||||
const winCOIN = cc.find("Canvas"); // 假设 Canvas 节点
|
||||
if (winCOIN) {
|
||||
|
@ -1539,8 +1530,6 @@ export default class MapConroler extends cc.Component {
|
|||
this.node.parent.parent.getChildByName("Lose").getChildByName("Boom").active = false;
|
||||
this.node.parent.parent.getChildByName("Lose").getChildByName("Lock").active = false;
|
||||
this.node.parent.parent.getChildByName("Lose").getChildByName("Health").active = true;
|
||||
let overTime = Date.now();
|
||||
this.count_Time = overTime - this.count_Time;
|
||||
let data = {
|
||||
time: this.count_Time,
|
||||
add_Time: this.add_Time,
|
||||
|
@ -1677,6 +1666,7 @@ export default class MapConroler extends cc.Component {
|
|||
}
|
||||
else {
|
||||
this.timeNumber -= 1;
|
||||
this.count_Time += 1;
|
||||
var timeTemp = cc.fx.GameTool.getTimeMargin(this.timeNumber);
|
||||
NumberToImage.getTimeMargin(this.timeNumber, 50, "time_", this.timeLabel)
|
||||
// this.timeLabel.string = timeTemp.toString();
|
||||
|
|
|
@ -195,8 +195,7 @@ export default class SceneManager extends cc.Component {
|
|||
cc.fx.GameTool.setUserHealth(-1, (data) => {
|
||||
})
|
||||
if (MapConroler._instance.count_Time) {
|
||||
let overTime = Date.now();
|
||||
let count_Time = overTime - MapConroler._instance.count_Time;
|
||||
let count_Time = MapConroler._instance.count_Time;
|
||||
let add_Time = MapConroler._instance.add_Time;
|
||||
let data = {
|
||||
time: count_Time,
|
||||
|
|
|
@ -1103,7 +1103,6 @@ export namespace MiniGameSdk {
|
|||
}
|
||||
|
||||
|
||||
//#region 数数平台
|
||||
/*
|
||||
* 数数平台初始化以及登录
|
||||
*/
|
||||
|
@ -1117,16 +1116,14 @@ export namespace MiniGameSdk {
|
|||
if (test == "正式版") {
|
||||
appId = "87d18958cea145f29d3265470ecd3486";
|
||||
}
|
||||
const isProduction = test === '正式版'; // 假设使用 NODE_ENV 区分环境
|
||||
var config = {
|
||||
// appId: "73e1ec654f15b47a1a7354fbabec05ad", // 项目 APP ID
|
||||
appId: appId,
|
||||
serverUrl: "https://data.nika4fun.com/sync_data", // 上报地址
|
||||
autoTrack: {
|
||||
appShow: true, // 自动采集 ta_mg_show
|
||||
appHide: true // 自动采集 ta_mg_hide
|
||||
},
|
||||
// 根据环境变量设置 debug 模式
|
||||
debug: !isProduction
|
||||
}
|
||||
};
|
||||
// 创建 TA 实例
|
||||
API._ta = new ThinkingAnalyticsAPI(config);
|
||||
|
@ -1203,18 +1200,6 @@ export namespace MiniGameSdk {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
//#region 引力平台-
|
||||
static yinli_Init(){
|
||||
const config = {
|
||||
accessToken: "aGws0nluotbm6Jjiv9WMuzOAbXLydxwe", // 项目通行证,在:网站后台-->设置-->应用列表中找到Access Token列 复制(首次使用可能需要先新增应用)
|
||||
clientId: cc.fx.GameConfig.GM_INFO.openid, // 用户唯一标识,如产品为小游戏,则必须填用户openid(注意,不是小游戏的APPID!!!)
|
||||
name: "ge", // 全局变量名称
|
||||
debugMode: "debug", // 是否开启测试模式,开启测试模式后,可以在 网站后台--设置--元数据--事件流中查看实时数据上报结果。(测试时使用,上线之后一定要关掉,改成none或者删除)
|
||||
};
|
||||
const ge = new GravityAnalyticsAPI(config);
|
||||
ge.setupAndStart();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
File diff suppressed because one or more lines are too long
|
@ -1,10 +0,0 @@
|
|||
{
|
||||
"ver": "1.1.0",
|
||||
"uuid": "ff9bbc79-743c-47c9-8e26-683c1472454c",
|
||||
"importer": "javascript",
|
||||
"isPlugin": true,
|
||||
"loadPluginInWeb": true,
|
||||
"loadPluginInNative": true,
|
||||
"loadPluginInEditor": false,
|
||||
"subMetas": {}
|
||||
}
|
|
@ -55,12 +55,12 @@ export class GameConfig {
|
|||
static PROP_INFO: ({ pos1: { x: number; y: number; z: number; }; pos2: { x: number; y: number; z: number; }; pos3: { x: number; y: number; z: number; }; pos4: { x: number; y: number; z: number; }; pos5: { x: number; y: number; z: number; }; pos6: { x: number; y: number; z: number; }; } | { pos1: { x: number; y: number; z: number; }; pos2: { x: number; y: number; z: number; }; pos3: { x: number; y: number; z: number; }; pos4: { x: number; y: number; z: number; }; pos5: { x: number; y: number; z: number; }; pos6?: undefined; })[];
|
||||
static NEW_LEVEL: any;
|
||||
static TA: any;
|
||||
static GE: any;
|
||||
static GM_INFO: {
|
||||
// isEnd: false,
|
||||
mean_Time: number; //平均放箭速度
|
||||
hp: number; //体力值
|
||||
review: number; //复活次数
|
||||
//复活次数
|
||||
currSeed: number; //用于随机数种子
|
||||
openid: string; //微信用户唯一id
|
||||
gameId: string; //游戏ID
|
||||
|
@ -81,18 +81,16 @@ export class GameConfig {
|
|||
first: boolean; //是否首次进入游戏
|
||||
score: number; //总得分
|
||||
scale: number; //玩家总计成功点火数
|
||||
iosOutTradeNo: number; //ios订单号
|
||||
iosOutTradeNo: number; //每次上一把最小步数
|
||||
min_Time: number; //体力恢复的剩余时间
|
||||
freezeAmount: number; //冻结道具次数
|
||||
hammerAmount: number; //锤子道具次数
|
||||
magicAmount: number; //魔法棒道具次数
|
||||
musicOpen: boolean; //音乐
|
||||
effectOpen: boolean; //音效
|
||||
vibrateOpen: boolean; //震动
|
||||
vibrateOpen: boolean;
|
||||
coinnum: number; //每局的金币数
|
||||
paid_user: boolean;
|
||||
};
|
||||
|
||||
//游戏内信息
|
||||
|
||||
static get Instance()
|
||||
|
@ -223,7 +221,6 @@ export class GameConfig {
|
|||
effectOpen: true, //音效
|
||||
vibrateOpen: true, //震动
|
||||
coinnum: 0, //每局的金币数
|
||||
paid_user: false, //是否是付费用户
|
||||
};
|
||||
// this.setCode(this.getKey("scode"));
|
||||
// this.GM_INFO.level = 0;
|
||||
|
|
144
assets/libs/GravityAnalyticsSDK.d.ts
vendored
144
assets/libs/GravityAnalyticsSDK.d.ts
vendored
|
@ -1,144 +0,0 @@
|
|||
declare class GravityAnalyticsAPI {
|
||||
constructor(config: any);
|
||||
setupAndStart(options?: { clientId?: string; openId?: string }): void;
|
||||
track(eventName: string): void;
|
||||
preInit(): void;
|
||||
track(eventName: string, properties: any): void;
|
||||
track(eventName: string, properties: any, time: any): void;
|
||||
track(eventName: string, properties: any, time: any, onComplete: any): void;
|
||||
track(taEvent: any): void;
|
||||
timeEvent(eventName: string): void;
|
||||
login(accoundId: string): void;
|
||||
logout(): void;
|
||||
setSuperProperties(properties: any): void;
|
||||
unsetSuperProperty(properties: any): void;
|
||||
clearSuperProperties(): void;
|
||||
getSuperProperties(): any;
|
||||
getSendProperties(): any;
|
||||
registerEvent(): void;
|
||||
loginEvent(): void;
|
||||
logoutEvent(): void;
|
||||
payEvent(
|
||||
pay_amount: number,
|
||||
pay_type: string,
|
||||
order_id: string,
|
||||
pay_reason: string,
|
||||
pay_method: string
|
||||
): void;
|
||||
payEventToTencent(pay_amount: number): void;
|
||||
tryPayEventDryRun(pay_amount: number): void;
|
||||
tryTutorialFinishEventDryRun(): void;
|
||||
tryRegisterEventDryRun(): void;
|
||||
tryCreateRoleEventDryRun(role_name: string): void;
|
||||
adShowEvent(ad_type: string, ad_unit_id: string, otherProperties: any): void;
|
||||
bindTAThirdPlatform(taAccountId: string, taDistinctId: string): void;
|
||||
initialize(data: any): any;
|
||||
initializeWithHistoryUserInfo(
|
||||
data: any,
|
||||
history_info: {
|
||||
company: string;
|
||||
create_time: number;
|
||||
}
|
||||
): any;
|
||||
userSet(properties: any): void;
|
||||
userSetOnce(properties: any): void;
|
||||
userAppend(properties: any): void;
|
||||
userUniqAppend(properties: any): void;
|
||||
userAdd(properties: any): void;
|
||||
userUnset(property: string): void;
|
||||
userDel(): void;
|
||||
authorizeOpenID(distinctId: string): void;
|
||||
identify(distinctId: string): void;
|
||||
initInstance(name: string): GravityAnalyticsAPI;
|
||||
initInstance(name: string, config: any): GravityAnalyticsAPI;
|
||||
lightInstance(name: string): any;
|
||||
setDynamicSuperProperties(properties: any): void;
|
||||
getDeviceId(callback?: any): string;
|
||||
getDistinctId(callback?: any): string;
|
||||
getAccountId(callback?: any): string;
|
||||
getPresetProperties(callback?: any): any;
|
||||
getWechatOpenId(
|
||||
code: string
|
||||
): Promise<{ session_key: string; openid: string; unionid: string }>;
|
||||
|
||||
sendDryRunResult(
|
||||
traceId: string,
|
||||
action: string
|
||||
): Promise<{
|
||||
extra: {
|
||||
error: string;
|
||||
};
|
||||
code: number;
|
||||
msg: string;
|
||||
}>;
|
||||
|
||||
onPayEvent(
|
||||
pay_amount: number,
|
||||
pay_type: string,
|
||||
order_id: string,
|
||||
pay_reason: string,
|
||||
pay_method: string
|
||||
): void;
|
||||
onRegisterEvent(): void;
|
||||
onCreateRoleEvent(role_name: string): void;
|
||||
onCreateRoleEventWithParams(role_name: string, params: any): void;
|
||||
onTutorialFinishEvent(): void;
|
||||
onTutorialFinishEventWithParams(params: any): void;
|
||||
onViewMallContentEvent(): void;
|
||||
onViewMallContentEventWithParams(params: any): void;
|
||||
onViewActivityContentEvent(): void;
|
||||
onViewActivityContentEventWithParams(params: any): void;
|
||||
onAddToWishListEvent(wishType: string): void;
|
||||
onAddToWishListEventWithParams(wishType: string, params: any): void;
|
||||
onShareEvent(shareType: "APP_MESSAGE" | "TIME_LINE"): void;
|
||||
onShareEventWithParams(
|
||||
shareType: "APP_MESSAGE" | "TIME_LINE",
|
||||
params: any
|
||||
): void;
|
||||
onUpdateLevelEvent(userLevel: number, userPower: number): void;
|
||||
onUpdateLevelEventWithParams(
|
||||
userLevel: number,
|
||||
userPower: number,
|
||||
params: any
|
||||
): void;
|
||||
|
||||
getKuaishouOpenId(
|
||||
code: string
|
||||
): Promise<{ session_key: string; openid: string; unionid: string }>;
|
||||
getDouyinOpenId(
|
||||
code: string
|
||||
): Promise<{ session_key: string; openid: string; unionid: string }>;
|
||||
getBilibiliOpenId(
|
||||
code: string
|
||||
): Promise<{ session_key: string; openid: string; unionid: string }>;
|
||||
/**
|
||||
* 暂停/开启上报
|
||||
* @param {bool} enabled YES:开启上报 NO:暂停上报
|
||||
* @deprecated This method is deprecated, use setTrackStatus() instand.
|
||||
*/
|
||||
enableTracking(enabled: boolean): void;
|
||||
/**
|
||||
* 停止上报,后续的上报和设置都无效,数据将清空
|
||||
* @deprecated This method is deprecated, use setTrackStatus() instand.
|
||||
*/
|
||||
optOutTracking(): void;
|
||||
/**
|
||||
* 停止上报,后续的上报和设置都无效,数据将清空,并且发送 user_del
|
||||
* @deprecated This method is deprecated, use setTrackStatus() instand.
|
||||
*/
|
||||
optOutTrackingAndDeleteUser(): void;
|
||||
/**
|
||||
* 允许上报
|
||||
* @deprecated This method is deprecated, use setTrackStatus() instand.
|
||||
*/
|
||||
optInTracking(): void;
|
||||
/**
|
||||
* 设置数据上报状态
|
||||
* PAUSE 暂停数据上报
|
||||
* STOP 停止数据上报,并清除缓存
|
||||
* SAVE_ONLY 数据入库,但不上报 (接入Native原生可支持,JS暂不支持此状态,默认等同 NORMAL)
|
||||
* NORMAL 恢复数据上报
|
||||
* @param {string} status 上报状态
|
||||
*/
|
||||
setTrackStatus(status: string): void;
|
||||
}
|
|
@ -1,6 +0,0 @@
|
|||
{
|
||||
"ver": "2.0.2",
|
||||
"uuid": "3133d8a4-37df-4a5f-8b47-9cc1a74bd339",
|
||||
"importer": "text",
|
||||
"subMetas": {}
|
||||
}
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"last-module-event-record-time": 1751876016726,
|
||||
"last-module-event-record-time": 1751270952307,
|
||||
"group-list": [
|
||||
"default",
|
||||
"Map"
|
||||
|
|
Loading…
Reference in New Issue
Block a user