鲁班锁图首次提交,差结束页UI
This commit is contained in:
commit
306d92c2fe
13
assets/Scene.meta
Normal file
13
assets/Scene.meta
Normal file
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
"ver": "1.1.3",
|
||||
"uuid": "29f52784-2fca-467b-92e7-8fd9ef8c57b7",
|
||||
"importer": "folder",
|
||||
"isBundle": false,
|
||||
"bundleName": "",
|
||||
"priority": 1,
|
||||
"compressionType": {},
|
||||
"optimizeHotUpdate": {},
|
||||
"inlineSpriteFrames": {},
|
||||
"isRemoteBundle": {},
|
||||
"subMetas": {}
|
||||
}
|
3210
assets/Scene/GameScene.fire
Normal file
3210
assets/Scene/GameScene.fire
Normal file
File diff suppressed because it is too large
Load Diff
8
assets/Scene/GameScene.fire.meta
Normal file
8
assets/Scene/GameScene.fire.meta
Normal file
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
"ver": "1.3.2",
|
||||
"uuid": "4eaf518b-35ec-4262-928d-4d497c3f2830",
|
||||
"importer": "scene",
|
||||
"asyncLoadAssets": false,
|
||||
"autoReleaseAssets": true,
|
||||
"subMetas": {}
|
||||
}
|
2603
assets/Scene/LoadScene.fire
Normal file
2603
assets/Scene/LoadScene.fire
Normal file
File diff suppressed because it is too large
Load Diff
8
assets/Scene/LoadScene.fire.meta
Normal file
8
assets/Scene/LoadScene.fire.meta
Normal file
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
"ver": "1.3.2",
|
||||
"uuid": "9c08062d-4cf1-4b6e-a8ba-4a3881cc7e7d",
|
||||
"importer": "scene",
|
||||
"asyncLoadAssets": false,
|
||||
"autoReleaseAssets": true,
|
||||
"subMetas": {}
|
||||
}
|
274
assets/Scene/OverScene.fire
Normal file
274
assets/Scene/OverScene.fire
Normal file
|
@ -0,0 +1,274 @@
|
|||
[
|
||||
{
|
||||
"__type__": "cc.SceneAsset",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"_native": "",
|
||||
"scene": {
|
||||
"__id__": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Scene",
|
||||
"_objFlags": 0,
|
||||
"_parent": null,
|
||||
"_children": [
|
||||
{
|
||||
"__id__": 2
|
||||
}
|
||||
],
|
||||
"_active": false,
|
||||
"_components": [],
|
||||
"_prefab": null,
|
||||
"_opacity": 255,
|
||||
"_color": {
|
||||
"__type__": "cc.Color",
|
||||
"r": 255,
|
||||
"g": 255,
|
||||
"b": 255,
|
||||
"a": 255
|
||||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 0,
|
||||
"height": 0
|
||||
},
|
||||
"_anchorPoint": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"_trs": {
|
||||
"__type__": "TypedArray",
|
||||
"ctor": "Float64Array",
|
||||
"array": [
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1
|
||||
]
|
||||
},
|
||||
"_is3DNode": true,
|
||||
"_groupIndex": 0,
|
||||
"groupIndex": 0,
|
||||
"autoReleaseAssets": true,
|
||||
"_id": "4b9c5a7e-c645-48a4-9aca-5df381ce4ef5"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Node",
|
||||
"_name": "Canvas",
|
||||
"_objFlags": 0,
|
||||
"_parent": {
|
||||
"__id__": 1
|
||||
},
|
||||
"_children": [
|
||||
{
|
||||
"__id__": 3
|
||||
}
|
||||
],
|
||||
"_active": true,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 5
|
||||
},
|
||||
{
|
||||
"__id__": 6
|
||||
}
|
||||
],
|
||||
"_prefab": null,
|
||||
"_opacity": 255,
|
||||
"_color": {
|
||||
"__type__": "cc.Color",
|
||||
"r": 255,
|
||||
"g": 255,
|
||||
"b": 255,
|
||||
"a": 255
|
||||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 750,
|
||||
"height": 1334
|
||||
},
|
||||
"_anchorPoint": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0.5,
|
||||
"y": 0.5
|
||||
},
|
||||
"_trs": {
|
||||
"__type__": "TypedArray",
|
||||
"ctor": "Float64Array",
|
||||
"array": [
|
||||
375,
|
||||
667,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1
|
||||
]
|
||||
},
|
||||
"_eulerAngles": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0
|
||||
},
|
||||
"_skewX": 0,
|
||||
"_skewY": 0,
|
||||
"_is3DNode": false,
|
||||
"_groupIndex": 0,
|
||||
"groupIndex": 0,
|
||||
"_id": "a5esZu+45LA5mBpvttspPD"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Node",
|
||||
"_name": "Main Camera",
|
||||
"_objFlags": 0,
|
||||
"_parent": {
|
||||
"__id__": 2
|
||||
},
|
||||
"_children": [],
|
||||
"_active": true,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 4
|
||||
}
|
||||
],
|
||||
"_prefab": null,
|
||||
"_opacity": 255,
|
||||
"_color": {
|
||||
"__type__": "cc.Color",
|
||||
"r": 255,
|
||||
"g": 255,
|
||||
"b": 255,
|
||||
"a": 255
|
||||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 960,
|
||||
"height": 640
|
||||
},
|
||||
"_anchorPoint": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0.5,
|
||||
"y": 0.5
|
||||
},
|
||||
"_trs": {
|
||||
"__type__": "TypedArray",
|
||||
"ctor": "Float64Array",
|
||||
"array": [
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1
|
||||
]
|
||||
},
|
||||
"_eulerAngles": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0
|
||||
},
|
||||
"_skewX": 0,
|
||||
"_skewY": 0,
|
||||
"_is3DNode": false,
|
||||
"_groupIndex": 0,
|
||||
"groupIndex": 0,
|
||||
"_id": "e1WoFrQ79G7r4ZuQE3HlNb"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Camera",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"node": {
|
||||
"__id__": 3
|
||||
},
|
||||
"_enabled": true,
|
||||
"_cullingMask": 4294967295,
|
||||
"_clearFlags": 7,
|
||||
"_backgroundColor": {
|
||||
"__type__": "cc.Color",
|
||||
"r": 0,
|
||||
"g": 0,
|
||||
"b": 0,
|
||||
"a": 255
|
||||
},
|
||||
"_depth": -1,
|
||||
"_zoomRatio": 1,
|
||||
"_targetTexture": null,
|
||||
"_fov": 60,
|
||||
"_orthoSize": 10,
|
||||
"_nearClip": 1,
|
||||
"_farClip": 4096,
|
||||
"_ortho": true,
|
||||
"_rect": {
|
||||
"__type__": "cc.Rect",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"width": 1,
|
||||
"height": 1
|
||||
},
|
||||
"_renderStages": 1,
|
||||
"_alignWithScreen": true,
|
||||
"_id": "81GN3uXINKVLeW4+iKSlim"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Canvas",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"node": {
|
||||
"__id__": 2
|
||||
},
|
||||
"_enabled": true,
|
||||
"_designResolution": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 750,
|
||||
"height": 1334
|
||||
},
|
||||
"_fitWidth": true,
|
||||
"_fitHeight": false,
|
||||
"_id": "59Cd0ovbdF4byw5sbjJDx7"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Widget",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"node": {
|
||||
"__id__": 2
|
||||
},
|
||||
"_enabled": true,
|
||||
"alignMode": 1,
|
||||
"_target": null,
|
||||
"_alignFlags": 45,
|
||||
"_left": 0,
|
||||
"_right": 0,
|
||||
"_top": 0,
|
||||
"_bottom": 0,
|
||||
"_verticalCenter": 0,
|
||||
"_horizontalCenter": 0,
|
||||
"_isAbsLeft": true,
|
||||
"_isAbsRight": true,
|
||||
"_isAbsTop": true,
|
||||
"_isAbsBottom": true,
|
||||
"_isAbsHorizontalCenter": true,
|
||||
"_isAbsVerticalCenter": true,
|
||||
"_originalWidth": 0,
|
||||
"_originalHeight": 0,
|
||||
"_id": "29zXboiXFBKoIV4PQ2liTe"
|
||||
}
|
||||
]
|
8
assets/Scene/OverScene.fire.meta
Normal file
8
assets/Scene/OverScene.fire.meta
Normal file
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
"ver": "1.3.2",
|
||||
"uuid": "4b9c5a7e-c645-48a4-9aca-5df381ce4ef5",
|
||||
"importer": "scene",
|
||||
"asyncLoadAssets": false,
|
||||
"autoReleaseAssets": true,
|
||||
"subMetas": {}
|
||||
}
|
5234
assets/Scene/RankScene.fire
Normal file
5234
assets/Scene/RankScene.fire
Normal file
File diff suppressed because it is too large
Load Diff
8
assets/Scene/RankScene.fire.meta
Normal file
8
assets/Scene/RankScene.fire.meta
Normal file
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
"ver": "1.3.2",
|
||||
"uuid": "2d2f792f-a40c-49bb-a189-ed176a246e49",
|
||||
"importer": "scene",
|
||||
"asyncLoadAssets": false,
|
||||
"autoReleaseAssets": true,
|
||||
"subMetas": {}
|
||||
}
|
13
assets/Script.meta
Normal file
13
assets/Script.meta
Normal file
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
"ver": "1.1.3",
|
||||
"uuid": "4734c20c-0db8-4eb2-92ea-e692f4d70934",
|
||||
"importer": "folder",
|
||||
"isBundle": false,
|
||||
"bundleName": "",
|
||||
"priority": 1,
|
||||
"compressionType": {},
|
||||
"optimizeHotUpdate": {},
|
||||
"inlineSpriteFrames": {},
|
||||
"isRemoteBundle": {},
|
||||
"subMetas": {}
|
||||
}
|
137
assets/Script/Block.ts
Normal file
137
assets/Script/Block.ts
Normal file
|
@ -0,0 +1,137 @@
|
|||
// Learn TypeScript:
|
||||
// - https://docs.cocos.com/creator/manual/en/scripting/typescript.html
|
||||
// Learn Attribute:
|
||||
// - https://docs.cocos.com/creator/manual/en/scripting/reference/attributes.html
|
||||
// Learn life-cycle callbacks:
|
||||
// - https://docs.cocos.com/creator/manual/en/scripting/life-cycle-callbacks.html
|
||||
|
||||
//出现块的类型,问题以及答案
|
||||
var BlockType = cc.Enum({
|
||||
problem_In: 1, //内圈问题
|
||||
problem_Out: 2, //外圈问题
|
||||
correct_In:3, //内圈正确答案
|
||||
correct_Out:4, //外圈正确答案
|
||||
err_In:5, //内圈错误答案
|
||||
err_Out:6, //外圈错误答案
|
||||
});
|
||||
|
||||
const {ccclass, property} = cc._decorator;
|
||||
|
||||
@ccclass
|
||||
export default class Block extends cc.Component {
|
||||
|
||||
@property(cc.Asset)
|
||||
UI: cc.Asset = null;
|
||||
|
||||
_touch: boolean;
|
||||
_start: boolean;
|
||||
_answer: boolean;
|
||||
_inside: boolean;
|
||||
_idNumber: number;
|
||||
GameManager: any;
|
||||
tube_Array: number[][];//管子数组
|
||||
|
||||
// LIFE-CYCLE CALLBACKS:
|
||||
|
||||
onLoad () {
|
||||
// this.init();
|
||||
this.GameManager = this.node.parent.parent.parent.getComponent("GameManager");
|
||||
this._touch = false;
|
||||
this._start = false;
|
||||
this._answer = false;
|
||||
this._inside = true;
|
||||
this.node.on(cc.Node.EventType.TOUCH_START, this.touchStart, this);
|
||||
}
|
||||
|
||||
init(type,id){
|
||||
if(type == BlockType.correct_Out){
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
setId(id){
|
||||
this._idNumber = id;
|
||||
}
|
||||
|
||||
answerShow(texture){
|
||||
this.node.getChildByName("texture").active = true;
|
||||
let textureName = "texture"+texture;
|
||||
// @ts-ignore
|
||||
this.node.getChildByName("texture").getComponent(cc.Sprite).spriteFrame = this.UI._spriteFrames[textureName];
|
||||
cc.tween(this.node.getChildByName("texture"))
|
||||
.to(0.01,{opacity:255})
|
||||
.delay(this.GameManager.config["showTime"]-0.05)
|
||||
.call(() =>{
|
||||
if(this._inside){
|
||||
this.node.getChildByName("texture").opacity = 0;
|
||||
}
|
||||
})
|
||||
.start();
|
||||
}
|
||||
|
||||
lockShow(type,inside){
|
||||
this.node.getChildByName("texture").active = false;
|
||||
this._answer = type;
|
||||
this._inside = inside;
|
||||
this.node.getChildByName("lock").active = true;
|
||||
this._touch = true;
|
||||
}
|
||||
|
||||
lockHide(){
|
||||
this.node.getChildByName("lock").active = false;
|
||||
this._touch = false;
|
||||
}
|
||||
|
||||
show(type,inside,texture){
|
||||
// this._answer = type;
|
||||
this._inside = inside;
|
||||
if(inside) this._answer = type;
|
||||
let textureName = "texture"+texture;
|
||||
this.node.getChildByName("texture").active = true;
|
||||
//正确答案
|
||||
//@ts-ignore
|
||||
this.node.getChildByName("texture").getComponent(cc.Sprite).spriteFrame = this.UI._spriteFrames[textureName];
|
||||
cc.tween(this.node.getChildByName("texture"))
|
||||
.to(0.01,{opacity:255})
|
||||
// .delay(this.GameManager.config["showTime"]-0.1)
|
||||
.call(() =>{
|
||||
if(inside){
|
||||
this._touch = true;
|
||||
}
|
||||
})
|
||||
.start();
|
||||
|
||||
}
|
||||
|
||||
set_Pos(){
|
||||
this._start = true;
|
||||
}
|
||||
|
||||
set_Touch(type){
|
||||
this._touch = type;
|
||||
}
|
||||
|
||||
start () {
|
||||
|
||||
}
|
||||
//开始点击,提高层级
|
||||
touchStart (event) {
|
||||
if(this._touch){
|
||||
if(this._answer){
|
||||
this.node.getChildByName("yes").active = true;
|
||||
let data = {"result":true,"type":this._inside,id:this._idNumber};
|
||||
cc.fx.Notifications.emit("result",data);
|
||||
}
|
||||
else{
|
||||
this.node.getChildByName("err").active = true;
|
||||
let data = {"result":false,"type":this._inside,id:this._idNumber};
|
||||
cc.fx.Notifications.emit("result",data);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// update (dt) {
|
||||
|
||||
// }
|
||||
}
|
10
assets/Script/Block.ts.meta
Normal file
10
assets/Script/Block.ts.meta
Normal file
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"ver": "1.1.0",
|
||||
"uuid": "d63eea97-a92e-4657-94ff-8a733a2b4680",
|
||||
"importer": "typescript",
|
||||
"isPlugin": false,
|
||||
"loadPluginInWeb": true,
|
||||
"loadPluginInNative": true,
|
||||
"loadPluginInEditor": false,
|
||||
"subMetas": {}
|
||||
}
|
10
assets/Script/DynamicAtlasManager.js
Normal file
10
assets/Script/DynamicAtlasManager.js
Normal file
|
@ -0,0 +1,10 @@
|
|||
cc.Class({
|
||||
extends: cc.Component,
|
||||
|
||||
properties: {
|
||||
},
|
||||
|
||||
onLoad () {
|
||||
cc.dynamicAtlasManager.enabled = false;
|
||||
},
|
||||
});
|
10
assets/Script/DynamicAtlasManager.js.meta
Normal file
10
assets/Script/DynamicAtlasManager.js.meta
Normal file
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"ver": "1.1.0",
|
||||
"uuid": "5c9b8159-89a3-4b32-b303-b3d4f7ac1c9f",
|
||||
"importer": "javascript",
|
||||
"isPlugin": false,
|
||||
"loadPluginInWeb": true,
|
||||
"loadPluginInNative": true,
|
||||
"loadPluginInEditor": false,
|
||||
"subMetas": {}
|
||||
}
|
498
assets/Script/GameManager.ts
Normal file
498
assets/Script/GameManager.ts
Normal file
|
@ -0,0 +1,498 @@
|
|||
// 主游戏控制类
|
||||
const {ccclass, property} = cc._decorator;
|
||||
@ccclass
|
||||
export default class GameManager extends cc.Component {
|
||||
@property(cc.Prefab)
|
||||
kuang1_Prefab: cc.Prefab = null;
|
||||
@property(cc.Prefab)
|
||||
kuang2_Prefab: cc.Prefab = null;
|
||||
@property(cc.Node)
|
||||
Block: cc.Node = null;
|
||||
@property(cc.Label)
|
||||
TimeLabel: cc.Label = null;
|
||||
@property(cc.Label)
|
||||
LevelLabel: cc.Label = null;
|
||||
@property(cc.Node)
|
||||
Guide: cc.Node = null;
|
||||
|
||||
@property(cc.Sprite)
|
||||
progress: cc.Sprite = null; //-95 640
|
||||
@property(cc.Node)
|
||||
Top: cc.Node = null;//80 -725
|
||||
|
||||
countTime: number; //游戏总daojishi
|
||||
startTime: number; //游戏开始时间,时间戳
|
||||
pause: boolean ; //游戏暂停
|
||||
gameOver: boolean ; //游戏结束
|
||||
result: number; //当前小局结束标杆
|
||||
|
||||
outside_Array: any; //内圈数组
|
||||
inside_Array: any; //外圈数组
|
||||
level: number; //关卡等级
|
||||
guide_Level: number; //引导等级
|
||||
guide_State: boolean; //引导等级
|
||||
config: {}; //当前关卡配置
|
||||
answerInside: number; //正确答案位置
|
||||
answerOutside: number; //正确答案位置
|
||||
pass: boolean; //是否通关
|
||||
outside: any; //外圈实际执行数组
|
||||
inside: any; //内圈实际执行数组
|
||||
answerInsideTexture: number; //争取答案图片
|
||||
answerOutsideTexture: number; //争取答案图片
|
||||
insideTexture: number[]; //错误答案数组
|
||||
outsideTexture: number[]; //错误答案数组
|
||||
|
||||
|
||||
|
||||
onLoad () {
|
||||
this.guide_State = false;
|
||||
this.level = cc.fx.GameConfig.GM_INFO.level;
|
||||
this.guide_Level = cc.fx.GameConfig.GM_INFO.guide_Level;
|
||||
this.LevelLabel.string = (this.level+1)+"";
|
||||
this.progress.fillRange = cc.fx.GameConfig.GM_INFO.score/24;
|
||||
if(this.progress.fillRange>= 0.2) this.Top.getChildByName("star1").active = true;
|
||||
if(this.progress.fillRange>= 0.5) this.Top.getChildByName("star2").active = true;
|
||||
if(this.progress.fillRange>= 0.8) this.Top.getChildByName("star3").active = true;
|
||||
if((this.level == 0 && this.guide_Level == 4) ||
|
||||
(this.level == 4 && this.guide_Level == 3) ||
|
||||
(this.level == 8 && this.guide_Level == 1)){
|
||||
this.openGuide(false);
|
||||
}
|
||||
else{
|
||||
this.LevelLabel.node.active = true;
|
||||
this.node.getChildByName("Top").getChildByName("lianxi").getComponent(cc.Label).string = "第 轮";
|
||||
this.init();
|
||||
}
|
||||
}
|
||||
|
||||
init(){
|
||||
if(this.level == 4 && this.guide_Level == 2) {
|
||||
cc.fx.GameConfig.GM_INFO.guide_Level -= 1;
|
||||
this.guide_State = true;
|
||||
this.LevelLabel.node.active = false;
|
||||
this.node.getChildByName("Top").getChildByName("lianxi").getComponent(cc.Label).string = "练 习";
|
||||
// this.node.getChildByName("tip").active = true;
|
||||
}
|
||||
|
||||
this.result = 0;
|
||||
this.countTime = 6;
|
||||
this.TimeLabel.string = cc.fx.GameTool.getTimeMargin(this.countTime);
|
||||
this.createBlock();
|
||||
setTimeout(() => {
|
||||
this.createCustom();
|
||||
}, 1000);
|
||||
}
|
||||
|
||||
openGuide(type){
|
||||
this.Guide.active = true;
|
||||
this.guide_State = true;
|
||||
// this.node.getChildByName("tip").active = true;
|
||||
if(!type) cc.fx.GameConfig.GM_INFO.guide_Level -= 1;
|
||||
this.Guide.getChildByName("one").active = false;
|
||||
this.Guide.getChildByName("two").active = false;
|
||||
this.Guide.getChildByName("three").active = false;
|
||||
this.Guide.getChildByName("four").active = false;
|
||||
let name = "one";
|
||||
if(this.level == 0){
|
||||
name = "one";
|
||||
this.LevelLabel.node.active = false;
|
||||
this.node.getChildByName("Top").getChildByName("lianxi").getComponent(cc.Label).string = "练 习";
|
||||
}
|
||||
else if(this.level == 4){
|
||||
name = "two";
|
||||
this.LevelLabel.node.active = false;
|
||||
this.node.getChildByName("Top").getChildByName("lianxi").getComponent(cc.Label).string = "练 习";
|
||||
}
|
||||
else if(this.level == 8){
|
||||
name = "three";
|
||||
this.guide_State = false;
|
||||
}
|
||||
if(type) name = "four";
|
||||
this.Guide.getChildByName(name).active = true;
|
||||
cc.tween(this.Guide.getChildByName(name))
|
||||
.to(0.5,{opacity:255})
|
||||
.start();
|
||||
}
|
||||
|
||||
closeGuide(){
|
||||
if(this.Guide.getChildByName("four").active){
|
||||
this.Guide.active = false;
|
||||
cc.director.loadScene("GameScene");
|
||||
}
|
||||
else{
|
||||
this.Guide.active = false;
|
||||
this.init();
|
||||
}
|
||||
//
|
||||
|
||||
}
|
||||
|
||||
//创建方块地图
|
||||
createBlock(){
|
||||
this.outside_Array = [];
|
||||
this.inside_Array = [];
|
||||
this.outside = [];
|
||||
this.inside = [];
|
||||
for(let i=0; i<16; i++){
|
||||
let block = cc.instantiate(this.kuang1_Prefab);
|
||||
block.getComponent("Block").setId(i);
|
||||
block.parent = this.Block.getChildByName("outside");
|
||||
let x,y = 0;
|
||||
if(i < 5){
|
||||
x = -284 + 142*i; y = 259;
|
||||
}
|
||||
else if(i < 9){
|
||||
x = 284; y = 259 - (i-4)*142;
|
||||
}
|
||||
else if(i < 13){
|
||||
x = 284 - (i-8)*142; y = -309;
|
||||
}
|
||||
else if(i < 16){
|
||||
x = -284; y = -309 + (i-12)*142;
|
||||
}
|
||||
block.setPosition(x,y);
|
||||
this.outside_Array.push(block);
|
||||
}
|
||||
for(let j=3; j<12; j++){
|
||||
let block = cc.instantiate(this.kuang2_Prefab);
|
||||
block.getComponent("Block").setId(j);
|
||||
block.parent = this.Block.getChildByName("inside");
|
||||
block.setPosition(-132+j%3*132,239-parseInt(j/3 + "")*132);
|
||||
this.inside_Array.push(block);
|
||||
}
|
||||
}
|
||||
|
||||
//创建关卡
|
||||
createCustom(){
|
||||
//初始化关卡配置数据
|
||||
this.level = cc.fx.GameConfig.GM_INFO.level;
|
||||
this.LevelLabel.string = (this.level+1)+"";
|
||||
this.config = cc.fx.GameConfig.LEVEL_INFO[this.level];
|
||||
if(this.level == 4 && this.guide_Level == 2) {
|
||||
this.config = cc.fx.GameConfig.LEVEL_INFO[6];
|
||||
}
|
||||
this.pass = false;
|
||||
//放正确答案和错误答案
|
||||
this.answerInsideTexture = Math.floor(Math.random()*14 + 1);
|
||||
//内圈错误答案随机
|
||||
this.insideTexture = [];
|
||||
this.outsideTexture = [];
|
||||
for(let k=0; k<14; k++){
|
||||
if((k+1) != this.answerInsideTexture){
|
||||
this.insideTexture.push(k+1);
|
||||
}
|
||||
}
|
||||
cc.fx.GameTool.shuffleArray(this.insideTexture);
|
||||
this.answerOutsideTexture = this.insideTexture[11];
|
||||
|
||||
//分配正确答案和错误答案位置
|
||||
if(this.config["inside"] > 0){
|
||||
this.result += 1;
|
||||
let random = Math.random()*100;
|
||||
let arrayTemp = [0,1,2,3,5,6,7,8];
|
||||
|
||||
if(this.config["insideType"] == 1){
|
||||
if(random >= 50) this.inside = [0,1,2];
|
||||
else this.inside = [6,7,8];
|
||||
}
|
||||
else if(this.config["insideType"] == 2){
|
||||
if(random >= 50) this.inside = [0,3,6];
|
||||
else this.inside = [2,5,8];
|
||||
}
|
||||
else{
|
||||
this.inside = cc.fx.GameTool.shuffleArray(arrayTemp);
|
||||
this.inside.splice(this.config["inside"],this.inside.length-this.config["inside"]);
|
||||
}
|
||||
this.answerInside = this.inside[Math.floor(Math.random()*this.inside.length)];
|
||||
}
|
||||
//分配外圈正确答案和错误答案位置
|
||||
if(this.config["outside"] > 0){
|
||||
this.result += 1;
|
||||
if(this.config["outsideType"] == 1){
|
||||
this.outside = [1,2,3,5,6,7,9,10,11,13,14,15];
|
||||
}
|
||||
else if(this.config["outsideType"] == 2){
|
||||
this.outside = [0,4,8,12];
|
||||
}
|
||||
else{
|
||||
this.outside = [0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15];
|
||||
}
|
||||
cc.fx.GameTool.shuffleArray(this.outside);
|
||||
this.answerOutside = this.outside[Math.floor(Math.random()*this.outside.length)];
|
||||
if(this.config["outside"] == 2){
|
||||
for(let j=0; j<15; j++){
|
||||
this.outsideTexture.push(this.insideTexture[3]);
|
||||
}
|
||||
}
|
||||
else if(this.config["outside"] == 3){
|
||||
this.outsideTexture = [this.insideTexture[5],this.insideTexture[6],this.insideTexture[5],this.insideTexture[6],this.insideTexture[5]];
|
||||
for(let j=0; j<10; j++){
|
||||
let randomTemp = Math.random()*100;
|
||||
if(randomTemp>50) this.outsideTexture.push(this.insideTexture[5]);
|
||||
else this.outsideTexture.push(this.insideTexture[6]);
|
||||
}
|
||||
cc.fx.GameTool.shuffleArray(this.outsideTexture);
|
||||
}
|
||||
else if(this.config["outside"] == 4){
|
||||
this.outsideTexture = [this.insideTexture[2],this.insideTexture[4],this.insideTexture[6],
|
||||
this.insideTexture[2],this.insideTexture[4],this.insideTexture[6]];
|
||||
for(let j=0; j<9; j++){
|
||||
let randomTemp = Math.random()*100;
|
||||
if(randomTemp<33) this.outsideTexture.push(this.insideTexture[2]);
|
||||
else if(randomTemp<66) this.outsideTexture.push(this.insideTexture[4]);
|
||||
else this.outsideTexture.push(this.insideTexture[6]);
|
||||
}
|
||||
cc.fx.GameTool.shuffleArray(this.outsideTexture);
|
||||
}
|
||||
}
|
||||
this.runBlock();
|
||||
}
|
||||
|
||||
//块执行图片出现消失动画
|
||||
runBlock(){
|
||||
if(this.config["inside"] > 0){
|
||||
this.inside_Array[4].getComponent("Block").answerShow(this.answerInsideTexture);
|
||||
setTimeout(() => {
|
||||
let insideNumber = 0;
|
||||
for(let i=0; i<this.inside.length;i++){
|
||||
if(this.inside[i] == this.answerInside)
|
||||
this.inside_Array[this.inside[i]].getComponent("Block").show(true,true,this.answerInsideTexture);
|
||||
else{
|
||||
this.inside_Array[this.inside[i]].getComponent("Block").show(false,true,this.insideTexture[insideNumber]);
|
||||
insideNumber += 1;
|
||||
}
|
||||
}
|
||||
}, this.config["showTime"]*1000);
|
||||
|
||||
}
|
||||
if(this.config["outside"] > 0){
|
||||
this.outside_Array[this.answerOutside].getComponent("Block").answerShow(this.answerOutsideTexture);
|
||||
if(this.config["outside"] > 1){
|
||||
let outsideNumber = 0;
|
||||
for(let i=0; i<this.outside_Array.length;i++){
|
||||
if(i == this.answerOutside)
|
||||
this.outside_Array[i].getComponent("Block").show(true,false,this.answerOutsideTexture);
|
||||
else {
|
||||
this.outside_Array[i].getComponent("Block").show(false,false,this.outsideTexture[outsideNumber]);
|
||||
outsideNumber += 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
setTimeout(() => {
|
||||
let outsideNumber = 0;
|
||||
for(let i=0; i<this.outside_Array.length;i++){
|
||||
if(i == this.answerOutside)
|
||||
this.outside_Array[i].getComponent("Block").lockShow(true,false);
|
||||
else {
|
||||
this.outside_Array[i].getComponent("Block").lockShow(false,false);
|
||||
outsideNumber += 1;
|
||||
}
|
||||
}
|
||||
}, this.config["showTime"]*1000);
|
||||
}
|
||||
setTimeout(() => {
|
||||
if(!this.guide_State){
|
||||
this.startTime = cc.fx.GameTool.getTime();
|
||||
this.schedule(this.updateCountDownTime,1);
|
||||
}
|
||||
|
||||
}, this.config["showTime"]*1000);
|
||||
}
|
||||
|
||||
//正确
|
||||
openResult(result){
|
||||
this.result -= 1;
|
||||
//非引导状态
|
||||
if(!this.guide_State){
|
||||
this.flipBlock(result);
|
||||
if(this.result == 0){
|
||||
this.unschedule(this.updateCountDownTime);
|
||||
setTimeout(() => {
|
||||
this.setData(result);
|
||||
}, 1000);
|
||||
setTimeout(() => {
|
||||
if(cc.fx.GameConfig.GM_INFO.level < cc.fx.GameConfig.LEVEL_INFO.length-1){
|
||||
cc.fx.GameConfig.GM_INFO.level += 1;
|
||||
cc.director.loadScene("GameScene");
|
||||
}
|
||||
}, 2000);
|
||||
}
|
||||
}
|
||||
//引导状态下
|
||||
else{
|
||||
if(result.result){
|
||||
this.flipBlock(result);
|
||||
setTimeout(() => {
|
||||
if(this.level == 4 && cc.fx.GameConfig.GM_INFO.guide_Level == 2){
|
||||
cc.director.loadScene("GameScene");
|
||||
}
|
||||
else this.openGuide(true);
|
||||
}, 1000);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//翻转形状变成问号
|
||||
flipBlock(result){
|
||||
if(result.type){
|
||||
let pos = this.changePos(true,result.id);
|
||||
if(!this.guide_State) cc.fx.GameConfig.CLICK_DATA.userChoiceInner.push(pos.x,pos.y);
|
||||
for(let i=0; i<this.inside.length;i++){
|
||||
if(this.inside[i] == this.answerInside){
|
||||
this.inside_Array[4].getChildByName("texture").active = true;
|
||||
this.inside_Array[4].getChildByName("texture").opacity = 255;
|
||||
this.inside_Array[this.inside[i]].getChildByName("yes").active = true;
|
||||
let pos = this.changePos(true,this.inside_Array[this.inside[i]].getComponent("Block")._idNumber);
|
||||
if(!this.guide_State) cc.fx.GameConfig.CLICK_DATA.rightChoiceInner.push(pos.x,pos.y);
|
||||
}
|
||||
this.inside_Array[this.inside[i]].getComponent("Block")._touch = false;
|
||||
}
|
||||
if(result.result){
|
||||
this.addScore();
|
||||
}
|
||||
}
|
||||
else{
|
||||
let pos = this.changePos(false,result.id);
|
||||
if(!this.guide_State) cc.fx.GameConfig.CLICK_DATA.userChoiceOuter.push(pos.x,pos.y);
|
||||
for(let i=0; i<this.outside_Array.length;i++){
|
||||
this.outside_Array[i].getComponent("Block").lockHide();
|
||||
this.outside_Array[i].getChildByName("texture").active = true;
|
||||
if(i == this.answerOutside){
|
||||
this.outside_Array[i].getChildByName("yes").active = true;
|
||||
this.outside_Array[i].getComponent("Block").show(true,false,this.answerOutsideTexture);
|
||||
let pos = this.changePos(false,this.outside_Array[i].getComponent("Block")._idNumber);
|
||||
if(!this.guide_State) cc.fx.GameConfig.CLICK_DATA.rightChoiceOuter.push(pos.x,pos.y);
|
||||
}
|
||||
}
|
||||
if(result.result){
|
||||
this.addScore();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//加分 加进度条,加星星
|
||||
addScore(){
|
||||
if(!this.guide_State){
|
||||
cc.fx.GameConfig.GM_INFO.score += 1;
|
||||
var progress = cc.fx.GameConfig.GM_INFO.score/24;
|
||||
if(progress >= 1) progress = 1;
|
||||
cc.tween(this.progress)
|
||||
.to(0.2,{fillRange:progress})
|
||||
.call(()=>{
|
||||
if(this.Top.getChildByName("star1").active == false && progress>= 0.2){
|
||||
this.Top.getChildByName("star1").active = true;
|
||||
this.Top.getChildByName("star1").opacity = 0; this.Top.getChildByName("star1").scale = 0.1;
|
||||
cc.tween(this.Top.getChildByName("star1"))
|
||||
.to(0.3,{opacity:255,scale:1.1})
|
||||
.to(0.1,{opacity:255,scale:0.9})
|
||||
.to(0.1,{opacity:255,scale:1})
|
||||
.start();
|
||||
}
|
||||
if(this.Top.getChildByName("star2").active == false && progress>= 0.5){
|
||||
this.Top.getChildByName("star2").active = true;
|
||||
this.Top.getChildByName("star2").opacity = 0; this.Top.getChildByName("star2").scale = 0.1;
|
||||
cc.tween(this.Top.getChildByName("star2"))
|
||||
.to(0.3,{opacity:255,scale:1.1})
|
||||
.to(0.1,{opacity:255,scale:0.9})
|
||||
.to(0.1,{opacity:255,scale:1})
|
||||
.start();
|
||||
}
|
||||
if(this.Top.getChildByName("star3").active == false && progress>= 0.8){
|
||||
this.Top.getChildByName("star3").active = true;
|
||||
this.Top.getChildByName("star3").opacity = 0; this.Top.getChildByName("star3").scale = 0.1;
|
||||
cc.tween(this.Top.getChildByName("star3"))
|
||||
.to(0.3,{opacity:255,scale:1.1})
|
||||
.to(0.1,{opacity:255,scale:0.9})
|
||||
.to(0.1,{opacity:255,scale:1})
|
||||
.start();
|
||||
}
|
||||
})
|
||||
.start();
|
||||
}
|
||||
}
|
||||
|
||||
//返回首页
|
||||
backScene(){
|
||||
cc.director.loadScene("LoadScene");
|
||||
}
|
||||
//重新开始
|
||||
reStart(){
|
||||
|
||||
}
|
||||
//获取时间戳
|
||||
getTime(){
|
||||
var timestamp = new Date().getTime();
|
||||
return timestamp;
|
||||
}
|
||||
//获胜
|
||||
passLevel(){
|
||||
|
||||
}
|
||||
//失败
|
||||
loseLevel(type){
|
||||
|
||||
}
|
||||
|
||||
changePos(type,num){
|
||||
var x = 0; var y = 0;
|
||||
//内部
|
||||
if(type){
|
||||
y = parseInt(num/3+"");
|
||||
x = num%3;
|
||||
}
|
||||
//外部
|
||||
else{
|
||||
if(num < 5){
|
||||
y=0; x=num;
|
||||
}
|
||||
else if(num < 9){
|
||||
x=5; y=num-4;
|
||||
}
|
||||
else if(num < 13){
|
||||
y=4; x=12-num;
|
||||
}
|
||||
else if(num < 16){
|
||||
x=0; y=16-num;
|
||||
}
|
||||
}
|
||||
var jg = cc.v2(x,y);
|
||||
return jg;
|
||||
}
|
||||
//如果是倒计时 调用此方法
|
||||
updateCountDownTime () {
|
||||
if (this.countTime > 0) {
|
||||
this.countTime -= 1;
|
||||
// this.TimeLabel.string =this.countTime + "";
|
||||
this.TimeLabel.string = cc.fx.GameTool.getTimeMargin(this.countTime);
|
||||
if(this.countTime <= 0){
|
||||
this.unschedule(this.updateCountDownTime);
|
||||
this.node.getChildByName("Mask").active = true;
|
||||
let data = {"result":false,"type":true,"id":null};
|
||||
if(this.config["inside"] > 0) cc.fx.Notifications.emit("result",data);
|
||||
let data2 = {"result":false,"type":false,"id":null};
|
||||
if(this.config["outside"] > 0) cc.fx.Notifications.emit("result",data2);
|
||||
}
|
||||
}
|
||||
}
|
||||
//上传每次操作数据
|
||||
setData(result){
|
||||
cc.fx.GameConfig.CLICK_DATA.success = result.result;
|
||||
cc.fx.GameConfig.CLICK_DATA.round = (cc.fx.GameConfig.GM_INFO.level + 1);
|
||||
cc.fx.GameConfig.CLICK_DATA.duration = new Date().getTime() - this.startTime - 1000;
|
||||
cc.fx.GameTool.setGameData();
|
||||
}
|
||||
|
||||
onEnable () {
|
||||
cc.fx.Notifications.on("result", this.openResult, this);
|
||||
|
||||
}
|
||||
onDisable () {
|
||||
cc.fx.Notifications.off("result", this.openResult, this);
|
||||
}
|
||||
update (dt) {
|
||||
|
||||
}
|
||||
}
|
10
assets/Script/GameManager.ts.meta
Normal file
10
assets/Script/GameManager.ts.meta
Normal file
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"ver": "1.1.0",
|
||||
"uuid": "b0432040-dbde-438c-839c-ba2b5d18a3b5",
|
||||
"importer": "typescript",
|
||||
"isPlugin": false,
|
||||
"loadPluginInWeb": true,
|
||||
"loadPluginInNative": true,
|
||||
"loadPluginInEditor": false,
|
||||
"subMetas": {}
|
||||
}
|
99
assets/Script/GameOver.ts
Normal file
99
assets/Script/GameOver.ts
Normal file
|
@ -0,0 +1,99 @@
|
|||
|
||||
const {ccclass, property} = cc._decorator;
|
||||
|
||||
@ccclass
|
||||
export default class NewClass extends cc.Component {
|
||||
@property(cc.Label)
|
||||
count: cc.Label = null;
|
||||
@property(cc.Label)
|
||||
time: cc.Label = null;
|
||||
@property(cc.Node)
|
||||
selfNode: cc.Node = null;
|
||||
@property(cc.Node)
|
||||
one: cc.Node = null;
|
||||
@property(cc.Node)
|
||||
two: cc.Node = null;
|
||||
@property(cc.Node)
|
||||
three: cc.Node = null;
|
||||
@property(cc.Node)
|
||||
four: cc.Node = null;
|
||||
@property(cc.Node)
|
||||
five: cc.Node = null;
|
||||
listData: any;
|
||||
selfData: any;
|
||||
efficiency: number;
|
||||
level: number;
|
||||
// onLoad () {}
|
||||
start () {
|
||||
this.init();
|
||||
}
|
||||
|
||||
|
||||
//初始化数据
|
||||
init(){
|
||||
this.listData = [];
|
||||
this.selfData = null;
|
||||
// this.getRank();
|
||||
}
|
||||
//打开排行榜
|
||||
openRank(){
|
||||
// alert("跳转");
|
||||
cc.director.loadScene("LoadScene");
|
||||
}
|
||||
//重新开始玩
|
||||
again(){
|
||||
// let levelTemp = cc.fx.GameConfig.GM_INFO.level;
|
||||
cc.fx.GameConfig.GM_INFO_init();
|
||||
// if(cc.fx.GameConfig.GM_INFO.isCustom){
|
||||
// cc.fx.GameConfig.GM_INFO.level = levelTemp;
|
||||
// }
|
||||
cc.director.loadScene("GameScene");
|
||||
|
||||
}
|
||||
//获取排行榜
|
||||
getRank(){
|
||||
//获取排行榜数据 所需数据量
|
||||
let dataFile = {
|
||||
length:5
|
||||
}
|
||||
cc.fx.GameTool.getRank(dataFile,data =>this.getRankData(data));
|
||||
}
|
||||
//设置排行信息
|
||||
getRankData(data){
|
||||
if(data){
|
||||
cc.fx.GameTool.getRankData(data,this,4);
|
||||
cc.fx.GameTool.setPic(this.selfNode.getChildByName("pic").getChildByName("icon"),this.selfData.pic);
|
||||
for(let i=0;i<=4;i++){
|
||||
this.setRank(i,this.listData[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
//根据内容填充排行榜
|
||||
setRank(num,data){
|
||||
var hitNode = null;
|
||||
if(num == 0){
|
||||
hitNode = this.one;
|
||||
}
|
||||
else if(num == 1){
|
||||
hitNode = this.two;
|
||||
}
|
||||
else if(num == 2){
|
||||
hitNode = this.three;
|
||||
}
|
||||
else if(num == 3){
|
||||
hitNode = this.four;
|
||||
}
|
||||
else if(num == 4){
|
||||
hitNode = this.five;
|
||||
}
|
||||
if(hitNode){
|
||||
hitNode.active = true;
|
||||
cc.fx.GameTool.subName(data.nickName,4);
|
||||
hitNode.getChildByName("name").getComponent(cc.Label).string = data.nickName;
|
||||
hitNode.getChildByName("total").getComponent(cc.Label).string = data.totalSunCount;
|
||||
cc.fx.GameTool.setPic(hitNode.getChildByName("pic").getChildByName("icon"),data.pic);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
10
assets/Script/GameOver.ts.meta
Normal file
10
assets/Script/GameOver.ts.meta
Normal file
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"ver": "1.1.0",
|
||||
"uuid": "805c69df-dfdf-4759-97ae-5a7341f424c7",
|
||||
"importer": "typescript",
|
||||
"isPlugin": false,
|
||||
"loadPluginInWeb": true,
|
||||
"loadPluginInNative": true,
|
||||
"loadPluginInEditor": false,
|
||||
"subMetas": {}
|
||||
}
|
53
assets/Script/Load.ts
Normal file
53
assets/Script/Load.ts
Normal file
|
@ -0,0 +1,53 @@
|
|||
|
||||
const {ccclass, property, requireComponent} = cc._decorator;
|
||||
|
||||
@ccclass
|
||||
export default class NewClass extends cc.Component {
|
||||
|
||||
@property(false)
|
||||
localTest: boolean = false;
|
||||
|
||||
@property("")
|
||||
clientTestVersion: string = "1.0.1";
|
||||
|
||||
@property(cc.Label)
|
||||
testVersion: cc.Label = null;
|
||||
|
||||
start () {
|
||||
cc.macro.ENABLE_MULTI_TOUCH = false;
|
||||
window.initMgr();
|
||||
cc.fx.GameConfig.init(this.localTest);
|
||||
|
||||
// cc.fx.AudioManager.Instance.init();
|
||||
// this.testVersion.string = this.clientTestVersion;
|
||||
}
|
||||
|
||||
//开始游戏,跳转至引导页面
|
||||
startGame(){
|
||||
cc.fx.GameConfig.GM_INFO.isCustom = false;
|
||||
cc.director.loadScene("GameScene");
|
||||
// cc.director.loadScene("GuideScene");
|
||||
}
|
||||
//备用,用来测试跳转 指定关卡
|
||||
clickBtn(event,data){
|
||||
cc.fx.GameConfig.GM_INFO.level = parseInt(data);
|
||||
cc.fx.GameConfig.GM_INFO.isCustom = true;
|
||||
cc.director.loadScene("GameScene");
|
||||
}
|
||||
//打开排行榜
|
||||
openRank(){
|
||||
cc.director.loadScene("RankScene");
|
||||
}
|
||||
|
||||
showCustom(){
|
||||
if(this.node.getChildByName("Custom").active){
|
||||
this.node.getChildByName("Custom").active = false;
|
||||
}
|
||||
else{
|
||||
this.node.getChildByName("Custom").active = true;
|
||||
}
|
||||
}
|
||||
|
||||
protected update(dt: number): void {
|
||||
}
|
||||
}
|
10
assets/Script/Load.ts.meta
Normal file
10
assets/Script/Load.ts.meta
Normal file
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"ver": "1.1.0",
|
||||
"uuid": "454ad829-851a-40ea-8ab9-941e828357ca",
|
||||
"importer": "typescript",
|
||||
"isPlugin": false,
|
||||
"loadPluginInWeb": true,
|
||||
"loadPluginInNative": true,
|
||||
"loadPluginInEditor": false,
|
||||
"subMetas": {}
|
||||
}
|
133
assets/Script/RankManager.ts
Normal file
133
assets/Script/RankManager.ts
Normal file
|
@ -0,0 +1,133 @@
|
|||
|
||||
import List from "./module/RankList/List";
|
||||
const { ccclass, property } = cc._decorator;
|
||||
//排行榜
|
||||
@ccclass
|
||||
export default class RankManager extends cc.Component {
|
||||
@property(cc.Node) //用户上方头像
|
||||
Player: cc.Node = null;
|
||||
@property(cc.Node) //用户最下方个人信息
|
||||
selfNode: cc.Node = null;
|
||||
@property(cc.Sprite) //用户头像换图
|
||||
phone: cc.Sprite = null;
|
||||
private rankList: List; //排行榜
|
||||
tween: cc.Tween<cc.Node>; //最上方用户头像动画
|
||||
listData: any; //总列表信息
|
||||
selfData: any; //自己信息
|
||||
rankNumber: number; //用户自己排名 有可能不在排行榜内99+
|
||||
rankTotal: number; //获取排行榜用户数量 现在为100
|
||||
|
||||
onLoad() {
|
||||
this.init();
|
||||
}
|
||||
//初始化数据
|
||||
init(){
|
||||
this.rankList = cc.find("ScrollView", this.node).getComponent(List);
|
||||
this.Player.getChildByName("rank").active = false;
|
||||
this.listData = [];
|
||||
this.selfData = null;
|
||||
this.rankNumber = 100;
|
||||
this.rankTotal= 100;
|
||||
this.selfNode.opacity = 0;
|
||||
}
|
||||
|
||||
start() {
|
||||
this.Player.active = false;
|
||||
this.getRank();
|
||||
}
|
||||
//调用获取排行榜接口
|
||||
getRank(){
|
||||
let dataFile = {
|
||||
length:100
|
||||
}
|
||||
cc.fx.GameTool.getRank(dataFile,data =>this.getRankData(data));
|
||||
}
|
||||
//实际设置排行数据
|
||||
getRankData(data){
|
||||
if(data){
|
||||
// console.log(data);
|
||||
cc.fx.GameTool.getRankData(data,this,6);
|
||||
this.setPic(this.selfData.pic);
|
||||
}
|
||||
}
|
||||
//返回按钮
|
||||
backClick(){
|
||||
cc.director.loadScene("LoadScene");
|
||||
}
|
||||
//最上方用户动画
|
||||
playerAction(){
|
||||
//-254 377 210 453
|
||||
this.Player.getChildByName("rank").active = false;
|
||||
let time = 1;
|
||||
this.tween = cc.tween(this.Player)
|
||||
.to(2,{position:cc.v3(210,453,0)})
|
||||
.call(() =>{
|
||||
this.Player.getChildByName("rank").active = true;
|
||||
this.Player.getChildByName("rank").getChildByName("number")
|
||||
.getComponent(cc.Label).string = parseInt(time*100 + "") + "%";
|
||||
})
|
||||
.start();
|
||||
time = (this.listData.length - this.rankNumber)/this.listData.length;
|
||||
if(this.listData.length >= 99){
|
||||
if(this.rankNumber >= 99){
|
||||
time = (Math.random()*49+1)/100
|
||||
var matchId = cc.sys.localStorage.getItem("matchNumber");
|
||||
if(matchId == null || matchId == undefined){
|
||||
time = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
setTimeout(() => {
|
||||
if(this.tween)this.tween.stop();
|
||||
this.Player.getChildByName("rank").active = true;
|
||||
this.Player.getChildByName("rank").getChildByName("number")
|
||||
.getComponent(cc.Label).string = parseInt(time*100 + "") + "%";
|
||||
}, time*2000);
|
||||
|
||||
}
|
||||
//设置头像 处理的逻辑比较多,不用公共类的了
|
||||
public setPic(pic){
|
||||
this.phone.node.parent.getChildByName("icon").active = false;
|
||||
this.phone.node.active = false;
|
||||
this.Player.active = true;
|
||||
this.Player.opacity = 0;
|
||||
this.Player.getChildByName("mask").getChildByName("icon").active = false;
|
||||
this.Player.getChildByName("mask").getChildByName("phone").active = false;
|
||||
fetch(pic)
|
||||
.then(response => {
|
||||
return response.headers.get('Content-Length');
|
||||
})
|
||||
.then(errNo => {
|
||||
if(errNo == "5093"){
|
||||
this.phone.node.parent.getChildByName("icon").active = true;
|
||||
this.Player.getChildByName("mask").getChildByName("icon").active = true;
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
console.error('Error fetching X-Info:', error);
|
||||
});
|
||||
var self = this;
|
||||
cc.assetManager.loadRemote(pic, {ext:'.png'},(err, texture:cc.Texture2D) => {
|
||||
self.Player.opacity = 255;
|
||||
if(texture){
|
||||
self.phone.node.active = true;
|
||||
self.phone.spriteFrame = new cc.SpriteFrame(texture);
|
||||
self.Player.getChildByName("mask").getChildByName("icon").active = false;
|
||||
self.Player.getChildByName("mask").getChildByName("phone").active = true;
|
||||
self.Player.getChildByName("mask").getChildByName("phone").getComponent(cc.Sprite)
|
||||
.spriteFrame = new cc.SpriteFrame(texture);
|
||||
setTimeout(() => {
|
||||
self.playerAction();
|
||||
}, 500);
|
||||
}
|
||||
else{
|
||||
self.Player.getChildByName("mask").getChildByName("icon").active = true;
|
||||
setTimeout(() => {
|
||||
self.playerAction();
|
||||
}, 500);
|
||||
}
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
}
|
10
assets/Script/RankManager.ts.meta
Normal file
10
assets/Script/RankManager.ts.meta
Normal file
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"ver": "1.1.0",
|
||||
"uuid": "e74a9f7d-2031-4e69-bcb2-9998174088b2",
|
||||
"importer": "typescript",
|
||||
"isPlugin": false,
|
||||
"loadPluginInWeb": true,
|
||||
"loadPluginInNative": true,
|
||||
"loadPluginInEditor": false,
|
||||
"subMetas": {}
|
||||
}
|
13
assets/Script/Sdk.meta
Normal file
13
assets/Script/Sdk.meta
Normal file
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
"ver": "1.1.3",
|
||||
"uuid": "ec0a44ff-c813-4573-8b85-268526211437",
|
||||
"importer": "folder",
|
||||
"isBundle": false,
|
||||
"bundleName": "",
|
||||
"priority": 1,
|
||||
"compressionType": {},
|
||||
"optimizeHotUpdate": {},
|
||||
"inlineSpriteFrames": {},
|
||||
"isRemoteBundle": {},
|
||||
"subMetas": {}
|
||||
}
|
29
assets/Script/Sdk/DouyinEntranceView.ts
Normal file
29
assets/Script/Sdk/DouyinEntranceView.ts
Normal file
|
@ -0,0 +1,29 @@
|
|||
import { MiniGameSdk } from "./MiniGameSdk";
|
||||
const { ccclass, property } = cc._decorator;
|
||||
|
||||
|
||||
@ccclass
|
||||
export class DouyinEntranceView extends cc.Component {
|
||||
start() {
|
||||
|
||||
}
|
||||
|
||||
update(deltaTime: number) {
|
||||
|
||||
}
|
||||
|
||||
onCloseClick() {
|
||||
this.node.active = false;
|
||||
}
|
||||
|
||||
onNavigateToDouyinClick() {
|
||||
|
||||
MiniGameSdk.BytedanceSidebar.navigateToSidebar((success: boolean) => { // 跳转到抖音侧边栏
|
||||
if (success) {
|
||||
console.log('跳转成功');
|
||||
} else {
|
||||
console.log('跳转失败');
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
10
assets/Script/Sdk/DouyinEntranceView.ts.meta
Normal file
10
assets/Script/Sdk/DouyinEntranceView.ts.meta
Normal file
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"ver": "1.1.0",
|
||||
"uuid": "8a024faa-e4af-4cae-9c5c-693bee7120c1",
|
||||
"importer": "typescript",
|
||||
"isPlugin": false,
|
||||
"loadPluginInWeb": true,
|
||||
"loadPluginInNative": true,
|
||||
"loadPluginInEditor": false,
|
||||
"subMetas": {}
|
||||
}
|
340
assets/Script/Sdk/MiniGameManager.ts
Normal file
340
assets/Script/Sdk/MiniGameManager.ts
Normal file
|
@ -0,0 +1,340 @@
|
|||
|
||||
import { MiniGameSdk } from "./MiniGameSdk";
|
||||
const { ccclass, property } = cc._decorator;
|
||||
enum EWechatAD {
|
||||
CUMSTOM_01 = 'adunit-f7c2417eb2c2e473'
|
||||
}
|
||||
|
||||
@ccclass
|
||||
export class MiniGameManager extends cc.Component {
|
||||
|
||||
@property(cc.Node)
|
||||
entranceView: cc.Node = null;
|
||||
/**
|
||||
* 开始游戏前的初始化操作。
|
||||
* 主要负责检查并处理游戏入口按钮的激活状态,以及在特定环境下设置侧边栏的监听器。
|
||||
*
|
||||
* @remarks
|
||||
* 此方法首先将游戏入口视图设为非激活状态,以准备进行后续的检查和设置。
|
||||
* 如果当前环境是抖音小游戏,会检查是否存在侧边栏,并根据检查结果激活或禁用游戏入口按钮。
|
||||
* 对于非抖音小游戏环境,直接激活游戏入口按钮。
|
||||
* 此外,无论环境如何,都会设置一个监听器,以处理来自侧边栏的事件,如成功触发时显示奖励提示。
|
||||
*/
|
||||
private _id:any;
|
||||
private _userData:any;
|
||||
|
||||
private static _instance: MiniGameManager;
|
||||
static get instance(): MiniGameManager {
|
||||
if (!MiniGameManager._instance) {
|
||||
MiniGameManager._instance = new MiniGameManager();
|
||||
}
|
||||
return MiniGameManager._instance;
|
||||
}
|
||||
|
||||
start() {
|
||||
// 禁用游戏入口视图
|
||||
// this.entranceView.active = false;
|
||||
// MiniGameSdk.API.getUserProfile(this.setUserId);
|
||||
// cc.fx.GameTool.setUserInfo("");
|
||||
this.onGetLoginCode();
|
||||
// 尝试获取游戏入口按钮,如果存在则直接返回,不进行后续操作
|
||||
// let buttonEntrance = this.node.getChildByName('Btns')?.getChildByName('Button_EntranceView');
|
||||
// if (buttonEntrance) {
|
||||
// return;
|
||||
// }
|
||||
|
||||
// 如果是字节跳动小游戏环境,检查侧边栏是否存在
|
||||
|
||||
if (MiniGameSdk.isBytedance()) {
|
||||
//抖音环境,检测侧边栏存在
|
||||
MiniGameSdk.BytedanceSidebar.checkSideBar((success: boolean) => {
|
||||
// 根据侧边栏存在性激活或禁用游戏入口按钮
|
||||
// buttonEntrance.active = success;
|
||||
});
|
||||
} else {
|
||||
// 非抖音小游戏环境,直接激活游戏入口按钮
|
||||
// 非抖音环境,正常显示按钮
|
||||
// buttonEntrance.active = true;
|
||||
}
|
||||
|
||||
// 设置监听器,以处理来自侧边栏的交互事件
|
||||
MiniGameSdk.BytedanceSidebar.listenFromSidebar((success: boolean) => {
|
||||
// 如果交互成功,显示奖励提示
|
||||
if (success) {
|
||||
MiniGameSdk.API.showToast('侧边栏奖励', 5);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
update(deltaTime: number) {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 弹出广告横幅。
|
||||
* 此方法用于加载并显示广告横幅。它首先加载指定广告位的横幅广告,然后显示广告。
|
||||
* 加载广告和显示广告是通过MiniGameSdk.AdvertManager的实例方法来实现的。
|
||||
*
|
||||
* @remarks
|
||||
* 此方法提供了两种显示横幅广告的方式:
|
||||
* 1. 默认方式:调用showBanner方法显示广告,系统会自动选择显示位置。
|
||||
* 2. 指定位置方式:可以通过传入额外的参数来指定广告显示在屏幕的顶部或底部,或者通过坐标指定显示位置。
|
||||
*
|
||||
* 示例代码中注释掉了两种显示广告的具体方法,可以根据实际需求选择使用。
|
||||
*/
|
||||
onShowBanner() {
|
||||
// 加载指定广告位的横幅广告。
|
||||
MiniGameSdk.AdvertManager.instance.loadBanner('adunit-4e7ef467e3eaab51');
|
||||
|
||||
// 默认方式显示横幅广告。
|
||||
// 方法1:默认调用
|
||||
MiniGameSdk.AdvertManager.instance.showBanner();
|
||||
|
||||
// 示例:指定屏幕底部正中显示横幅广告。
|
||||
// 方法2:指定屏幕顶部或底部正中
|
||||
// MiniGameSdk.AdvertManager.instance.showBanner('adunit-4e7ef467e3eaab51', MiniGameSdk.EAdBannerLocation.BOTTOM);
|
||||
|
||||
// 示例:通过坐标指定位置显示横幅广告。
|
||||
// 方法2:指定坐标
|
||||
// MiniGameSdk.AdvertManager.instance.showBanner('adunit-4e7ef467e3eaab51', { top: 10, left: 10 });
|
||||
}
|
||||
|
||||
/**
|
||||
* 隐藏广告横幅的函数。
|
||||
*
|
||||
* 该函数调用MiniGameSdk.AdvertManager实例的方法,用于隐藏广告横幅。
|
||||
* 当需要暂时停止展示广告或用户主动请求隐藏广告时,可以调用此函数。
|
||||
*
|
||||
* @remarks
|
||||
* 此函数不接受任何参数,也不返回任何值。
|
||||
* 它单纯地触发广告横幅的隐藏操作,具体实现依赖于AdvertManager的实现。
|
||||
*/
|
||||
onHideBanner() {
|
||||
MiniGameSdk.AdvertManager.instance.hideBanner();
|
||||
}
|
||||
|
||||
/**
|
||||
* 显示插屏广告的函数。
|
||||
*
|
||||
* 此函数调用MiniGameSdk.AdvertManager实例的方法,以显示一个指定的插屏广告。
|
||||
* 它使用了硬编码的广告单元标识符,这意味着它专为特定的广告位设计。
|
||||
* 在实际应用中,可能需要根据应用的配置或用户的特定条件来动态选择广告单元标识符。
|
||||
*/
|
||||
onShowInterstitial() {
|
||||
MiniGameSdk.AdvertManager.instance.showInterstitial('adunit-eadd67851d3050ad');
|
||||
}
|
||||
|
||||
/**
|
||||
* 调用广告管理器加载并展示自定义广告。
|
||||
* 此方法首先通过广告管理器的实例加载指定的自定义广告单元,然后展示这个自定义广告。
|
||||
* 加载和展示广告是广告管理系统中的常见操作,这里通过两步分别完成加载和展示的过程,
|
||||
* 以确保广告在展示前正确且充分地被加载。
|
||||
*/
|
||||
onShowCustom() {
|
||||
// 加载指定的自定义广告单元。
|
||||
MiniGameSdk.AdvertManager.instance.loadCustom(EWechatAD.CUMSTOM_01);
|
||||
// 展示已加载的自定义广告。
|
||||
MiniGameSdk.AdvertManager.instance.showCustom(EWechatAD.CUMSTOM_01);
|
||||
}
|
||||
|
||||
/**
|
||||
* 隐藏自定义广告。
|
||||
*
|
||||
* 本函数调用MiniGameSdk.AdvertManager.instance.hideCustom()来隐藏自定义广告。
|
||||
* 这是对接广告管理系统的一部分,用于控制广告的显示与隐藏。
|
||||
* 在需要隐藏自定义广告的场景下,调用此函数即可实现相应功能。
|
||||
*/
|
||||
onHideCustom() {
|
||||
MiniGameSdk.AdvertManager.instance.hideCustom(EWechatAD.CUMSTOM_01);
|
||||
}
|
||||
|
||||
/**
|
||||
* 触发显示视频广告的函数。
|
||||
* 通过调用MiniGameSdk.AdvertManager.instance.showVideo方法,显示一个视频广告,并根据用户观看广告的情况执行相应的逻辑。
|
||||
*
|
||||
* @remarks
|
||||
* 此函数首先传入一个广告单元ID,用于标识要显示的视频广告。然后传入一个回调函数,该回调函数在用户观看广告后被调用,无论用户是完成了观看、拒绝了观看还是观看过程中发生了错误。
|
||||
* 回调函数接收两个参数:一个是用户观看广告的结果,另一个是用户观看的广告数量。根据观看结果的不同,显示不同的提示信息。
|
||||
*/
|
||||
onShowVideo() {
|
||||
// 广告单元ID,用于标识要显示的视频广告
|
||||
// 广告单元ID的样例
|
||||
//抖音形如: 1re3nfqkmy81m4m8ge
|
||||
//微信形如: adunit-a7718f6e195e42fe
|
||||
MiniGameSdk.AdvertManager.instance.showVideo('1re3nfqkmy81m4m8ge', (res: MiniGameSdk.EAdVideoResult, count: number) => {
|
||||
// 输出用户观看的广告数量
|
||||
console.log('用户看的视频广告个数是:', count);
|
||||
|
||||
// 根据用户观看广告的结果,执行不同的逻辑
|
||||
switch (res) {
|
||||
case MiniGameSdk.EAdVideoResult.ACCEPT:
|
||||
// 用户完成了广告观看,显示奖励提示
|
||||
MiniGameSdk.API.showToast('用户看完广告,可以奖励');
|
||||
break;
|
||||
case MiniGameSdk.EAdVideoResult.REJECT:
|
||||
// 用户拒绝了广告观看,显示不奖励提示
|
||||
MiniGameSdk.API.showToast('用户拒绝掉广告,不奖励');
|
||||
break;
|
||||
case MiniGameSdk.EAdVideoResult.ERROR:
|
||||
// 广告播放发生错误,显示错误提示
|
||||
MiniGameSdk.API.showToast('播放广告发生错误,不奖励');
|
||||
break;
|
||||
default:
|
||||
// 其他情况,不作处理
|
||||
break;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 引导用户分享应用给朋友。
|
||||
*
|
||||
* 通过调用MiniGameSdk的API分享功能,向用户的朋友圈发送邀请,邀请他们一起玩游戏。
|
||||
* 这是一个重要的推广手段,可以增加应用的曝光度和用户量。
|
||||
*
|
||||
* @remarks
|
||||
* 此方法中调用的API依赖于特定的小游戏平台,因此在不同的平台上可能需要不同的实现。
|
||||
*/
|
||||
onShare() {
|
||||
MiniGameSdk.API.shareAppToFriends('来玩游戏吧');
|
||||
}
|
||||
|
||||
/**
|
||||
* 显示一个toast提示。
|
||||
*
|
||||
* 通过调用MiniGameSdk的API方法来显示一个简短的提示信息。toast是一种轻量级的提示方式,用于在界面上短暂地展示一些信息,不影响用户操作。
|
||||
* 这里使用了固定的提示文本 '这是一个toast',在实际应用中,可以根据需要动态设置提示文本。
|
||||
*/
|
||||
onShowToast() {
|
||||
MiniGameSdk.API.showToast('这是一个toast');
|
||||
}
|
||||
|
||||
/**
|
||||
* 触发设备振动功能。
|
||||
*
|
||||
* 该方法用于调用MiniGameSdk提供的API,以实现设备的振动功能。当需要提醒用户或提供触觉反馈时,可以调用此方法。
|
||||
* 例如,在游戏或应用中,当用户完成特定操作或发生特定事件时,可以通过振动给予用户反馈。
|
||||
*
|
||||
* @remarks
|
||||
* 此方法无参数,也不返回任何值。
|
||||
*/
|
||||
onVirbrate() {
|
||||
MiniGameSdk.API.vibrate();
|
||||
}
|
||||
|
||||
/**
|
||||
* 重新启动游戏实例。
|
||||
*
|
||||
* 此函数调用MiniGameSdk中的API重新启动游戏。重新启动操作可能是为了初始化游戏环境、重置游戏状态或处理其他需要重启的场景。
|
||||
* 调用此函数后,游戏将会重新开始,当前的游戏状态将会被清除。
|
||||
*
|
||||
* @remarks
|
||||
* 此函数不接受任何参数。
|
||||
*
|
||||
* @returns 无返回值。
|
||||
*/
|
||||
onReboot() {
|
||||
MiniGameSdk.API.reboot();
|
||||
}
|
||||
|
||||
/**
|
||||
* 当前函数用于在迷你游戏中实现退出功能。
|
||||
* 它调用了MiniGameSdk提供的API方法来触发退出操作。
|
||||
* 该方法通常在需要结束当前迷你游戏或返回到上一级菜单时被调用。
|
||||
*/
|
||||
onExit() {
|
||||
MiniGameSdk.API.exit();
|
||||
}
|
||||
|
||||
/**
|
||||
* 显示分享菜单。
|
||||
*
|
||||
* 通过调用MiniGameSdk的API方法,触发显示分享菜单的操作。此函数旨在提供一个统一的入口,
|
||||
* 以便在需要时轻松调用分享功能,而无需直接与具体的SDK接口交互。
|
||||
*
|
||||
* @remarks
|
||||
* 此方法不接受任何参数,也不返回任何值。
|
||||
*/
|
||||
onShowShareMenu() {
|
||||
MiniGameSdk.API.showShareMenu();
|
||||
}
|
||||
|
||||
/**
|
||||
* 导航到指定的小游戏。
|
||||
*
|
||||
* 本函数用于触发导航到一个特定的小游戏。这需要提供目标小游戏的ID,
|
||||
* 以便系统能够正确地将用户重定向到目标小游戏。
|
||||
*
|
||||
* 注意:这里的'xxx'是占位符,实际使用时需要替换为具体的小游戏ID。
|
||||
*/
|
||||
onNavigate() {
|
||||
MiniGameSdk.API.navigateTo('xxx'); // xxx替换为你的小游戏id
|
||||
}
|
||||
|
||||
/**
|
||||
* 激活字节跳动入口视图。
|
||||
*
|
||||
* 此方法用于将字节跳动入口视图设置为活跃状态。当需要在用户界面中显示字节跳动的入口时,
|
||||
* 可以调用此方法来激活相应的视图元素,使其对用户可见。
|
||||
*/
|
||||
onBytedanceEntranceView() {
|
||||
// this.entranceView.active = true;
|
||||
}
|
||||
|
||||
/**
|
||||
* 请求登录代码
|
||||
*
|
||||
* 本函数用于触发小程序的登录流程,获取微信或头条等第三方平台的登录代码。
|
||||
* 这些代码可以用于后续的用户身份验证和数据同步流程。
|
||||
*/
|
||||
onGetLoginCode() {
|
||||
// 调用MiniGameSdk的API登录方法,传入一个回调函数处理登录结果
|
||||
MiniGameSdk.API.login((code: string, anonymousCode: string) => {
|
||||
// 打印微信或头条的登录代码
|
||||
console.log('Wechat Or Bytedance Code:', code);
|
||||
// 打印头条的匿名登录代码
|
||||
// console.log('Bytedance Anonymous Code:', anonymousCode);
|
||||
if(code){
|
||||
cc.fx.GameTool.getUserId(code, data => this.setUserId(data));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
setUserId(data){
|
||||
cc.fx.GameConfig.GM_INFO.userId = data.data.userId;
|
||||
MiniGameSdk.API.getUserInfo(this.setUserInfo);
|
||||
}
|
||||
|
||||
setUserInfo(data){
|
||||
console.log("获取到的用户信息",data.userInfo);
|
||||
var useData = {
|
||||
"gameId": cc.fx.GameConfig.GM_INFO.gameId,
|
||||
"userId": cc.fx.GameConfig.GM_INFO.userId,
|
||||
"nickName":data.userInfo.nickName,
|
||||
"pic": data.userInfo.avatarUrl
|
||||
|
||||
}
|
||||
console.log("即将上传的用户信息:",cc.fx.GameConfig.GM_INFO.userId,data.userInfo.nickName,data.userInfo.avatarUrl);
|
||||
console.log("Post数据:",useData);
|
||||
cc.fx.HttpUtil.setUserInfo(useData,(res)=>{
|
||||
console.log("上传成功:",res);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建并显示游戏圈按钮
|
||||
*
|
||||
* 本函数通过调用MiniGameSdk的GameClub实例方法,实现游戏俱乐部的创建和显示。
|
||||
* 它首先配置俱乐部的图标类型和位置大小,然后创建俱乐部,最后显示俱乐部。
|
||||
* 这样做是为了在小游戏内创建并展示一个游戏俱乐部的图标,供玩家加入或互动。
|
||||
*/
|
||||
onCreateClub() {
|
||||
// 配置俱乐部图标为绿色,设置图标的位置为顶部200像素,左侧0像素
|
||||
MiniGameSdk.GameClub.instance.create(
|
||||
MiniGameSdk.EGameClubIcon.GREEN,
|
||||
{ top: 200, left: 0 },
|
||||
{ width: 50, height: 50 });
|
||||
// 显示游戏俱乐部图标
|
||||
MiniGameSdk.GameClub.instance.show();
|
||||
}
|
||||
}
|
10
assets/Script/Sdk/MiniGameManager.ts.meta
Normal file
10
assets/Script/Sdk/MiniGameManager.ts.meta
Normal file
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"ver": "1.1.0",
|
||||
"uuid": "0d272a57-5428-450e-a8b9-1574c3d89951",
|
||||
"importer": "typescript",
|
||||
"isPlugin": false,
|
||||
"loadPluginInWeb": true,
|
||||
"loadPluginInNative": true,
|
||||
"loadPluginInEditor": false,
|
||||
"subMetas": {}
|
||||
}
|
1130
assets/Script/Sdk/MiniGameSdk.ts
Normal file
1130
assets/Script/Sdk/MiniGameSdk.ts
Normal file
File diff suppressed because it is too large
Load Diff
10
assets/Script/Sdk/MiniGameSdk.ts.meta
Normal file
10
assets/Script/Sdk/MiniGameSdk.ts.meta
Normal file
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"ver": "1.1.0",
|
||||
"uuid": "c1af99dd-ee03-40f7-9609-d3887d0dd357",
|
||||
"importer": "typescript",
|
||||
"isPlugin": false,
|
||||
"loadPluginInWeb": true,
|
||||
"loadPluginInNative": true,
|
||||
"loadPluginInEditor": false,
|
||||
"subMetas": {}
|
||||
}
|
13
assets/Script/module.meta
Normal file
13
assets/Script/module.meta
Normal file
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
"ver": "1.1.3",
|
||||
"uuid": "eaa8b84d-69d0-4170-9f7d-8179ea948cde",
|
||||
"importer": "folder",
|
||||
"isBundle": false,
|
||||
"bundleName": "",
|
||||
"priority": 1,
|
||||
"compressionType": {},
|
||||
"optimizeHotUpdate": {},
|
||||
"inlineSpriteFrames": {},
|
||||
"isRemoteBundle": {},
|
||||
"subMetas": {}
|
||||
}
|
13
assets/Script/module/Config.meta
Normal file
13
assets/Script/module/Config.meta
Normal file
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
"ver": "1.1.3",
|
||||
"uuid": "8848cd9b-8115-456d-a656-2abcda1dadbe",
|
||||
"importer": "folder",
|
||||
"isBundle": false,
|
||||
"bundleName": "",
|
||||
"priority": 1,
|
||||
"compressionType": {},
|
||||
"optimizeHotUpdate": {},
|
||||
"inlineSpriteFrames": {},
|
||||
"isRemoteBundle": {},
|
||||
"subMetas": {}
|
||||
}
|
335
assets/Script/module/Config/GameConfig.ts
Normal file
335
assets/Script/module/Config/GameConfig.ts
Normal file
|
@ -0,0 +1,335 @@
|
|||
import { WeChat } from "../Share/share";
|
||||
import { GameTool } from "../Tool/GameTool";
|
||||
|
||||
|
||||
const { ccclass, property } = cc._decorator;
|
||||
@ccclass('GameConfig')
|
||||
export class GameConfig {
|
||||
//所有控制信息都通过GameAppStart内控制
|
||||
private static _instance : GameConfig = null;
|
||||
|
||||
static GAME_DATA: any[];
|
||||
//关卡数据
|
||||
|
||||
|
||||
|
||||
static LEVEL_INFO: {
|
||||
id: string; //难度id
|
||||
inside: number; //内圈答案个数
|
||||
insideType: number; //内圈排列形式,1:一排,2:一列,3:随机
|
||||
outside: number; //外圈答案种类个数,大于1时,填满其他图案
|
||||
outsideType: number; //外圈排列形式,1:非四角,2:四角,3:随机
|
||||
showTime: number; //显示时间
|
||||
}[];
|
||||
static CLICK_DATA: {
|
||||
type: number; //上传数据类型
|
||||
success: boolean; //是否正确
|
||||
round: number; //回合数轮次
|
||||
duration: number; //本轮用时
|
||||
rightChoiceOuter: any[]; //外部正确选项坐标
|
||||
userChoiceOuter: any[]; //外部玩家选项坐标
|
||||
rightChoiceInner: any[]; //内部正确选项坐标
|
||||
userChoiceInner: any[];
|
||||
};
|
||||
static GUIDE_INFO: {
|
||||
id: string; //难度id
|
||||
inside: number; //内圈答案个数
|
||||
insideType: number; //内圈排列形式,1:一排,2:一列,3:随机
|
||||
outside: number; //外圈答案种类个数,大于1时,填满其他图案
|
||||
outsideType: number; //外圈排列形式,1:非四角,2:四角,3:随机
|
||||
showTime: number;
|
||||
}[];
|
||||
static GM_INFO: {
|
||||
isCustom: boolean; //选择关卡模式
|
||||
mean_Time: number; //平均放箭速度
|
||||
total: number; //总共对的个数
|
||||
currSeed: number; //用于随机数种子
|
||||
gameId: string; //游戏ID
|
||||
userId: number; //用户ID
|
||||
guide: boolean; //是否有引导
|
||||
url: string; //访问域名
|
||||
success: boolean; //用户游戏成功与否
|
||||
matchId: any; //用于埋点上传的ID
|
||||
custom: number; //用于测试跳关卡
|
||||
round: number; //回合数
|
||||
level: number; //具体游戏难度
|
||||
guide_Level: number; //引导等级
|
||||
startTime: number; //玩家第一步操作
|
||||
random: number; //当前难度随机数
|
||||
stepTimeList: number; //整局游戏用时,由于涉及场景切换,数据需要保留
|
||||
successList: any[]; //整局胜负
|
||||
fen: number; //小局得分
|
||||
score: number; //总得分
|
||||
igniteCount: number; //玩家总计成功点火数
|
||||
min_Steps: number; //每次上一把最小步数
|
||||
min_Time: number; //每一把上次距离洪峰到来时间
|
||||
};
|
||||
|
||||
// static LEVEL_INFO: {
|
||||
// id: string; //地图ID
|
||||
// start: string[][]; //起始状态
|
||||
// goal: string[][]; //目标状态
|
||||
// middle: string[][][]; //中间状态
|
||||
// steps: number; //最大步数
|
||||
// }[];
|
||||
|
||||
|
||||
//游戏内信息
|
||||
static get Instance()
|
||||
{
|
||||
if (this._instance == null)
|
||||
{
|
||||
this._instance = new GameConfig();
|
||||
}
|
||||
return this._instance;
|
||||
}
|
||||
//getSeedRandom
|
||||
static init(Authentication){
|
||||
this.CLICK_init();
|
||||
this.LEVEL_INFO_init();
|
||||
this.GM_INFO_init();
|
||||
var self = this;
|
||||
//GAME_DATA 废弃了,暂时不删除以防后面修改回 一整局传一次
|
||||
this.GAME_DATA = [
|
||||
]
|
||||
|
||||
WeChat.setShare(location.href);
|
||||
if(!Authentication) self.Authentication();
|
||||
}
|
||||
|
||||
//数据备用
|
||||
static GM_INFO_init() {
|
||||
this.GM_INFO = {
|
||||
isCustom: false, //选择关卡模式
|
||||
mean_Time: 0, //平均放箭速度
|
||||
total: 0, //总共对的个数
|
||||
currSeed: 200000, //用于随机数种子
|
||||
gameId: "100019", //游戏ID
|
||||
userId: 0, //用户ID
|
||||
guide: true, //是否有引导
|
||||
url: "https://api.sparkus.cn",//访问域名
|
||||
success: false, //用户游戏成功与否
|
||||
matchId: null, //用于埋点上传的ID
|
||||
custom: 0, //用于测试跳关卡
|
||||
round:0, //回合数
|
||||
level: 0, //具体游戏难度
|
||||
guide_Level:4, //引导等级
|
||||
startTime:-1, //玩家第一步操作
|
||||
random:0, //当前难度随机数
|
||||
stepTimeList:0, //整局游戏用时,由于涉及场景切换,数据需要保留
|
||||
successList:[], //整局胜负
|
||||
fen:0, //小局得分
|
||||
score:0, //总得分
|
||||
igniteCount: 0, //玩家总计成功点火数
|
||||
min_Steps:0, //每次上一把最小步数
|
||||
min_Time:0 //每一把上次距离洪峰到来时间
|
||||
};
|
||||
|
||||
}
|
||||
static GM_INFO_SET(key,value) {
|
||||
this.GM_INFO[key] = value;
|
||||
}
|
||||
static CLICK_init() {
|
||||
this.CLICK_DATA =
|
||||
{
|
||||
type: 1, //上传数据类型
|
||||
success: false, //是否正确
|
||||
round: 0, //回合数轮次
|
||||
duration:0, //本轮用时
|
||||
rightChoiceOuter:[],//外部正确选项坐标
|
||||
userChoiceOuter:[], //外部玩家选项坐标
|
||||
rightChoiceInner:[],//内部正确选项坐标
|
||||
userChoiceInner:[], //内部玩家选项坐标
|
||||
}
|
||||
}
|
||||
|
||||
static CLICK_SET(key,value) {
|
||||
this.CLICK_DATA[key] = value;
|
||||
}
|
||||
|
||||
static LEVEL_INFO_init() {
|
||||
this.LEVEL_INFO = [{
|
||||
"id":"1", //难度id
|
||||
"inside":3, //内圈答案个数
|
||||
"insideType":1, //内圈排列形式,1:一排,2:一列,3:随机
|
||||
"outside":0, //外圈答案种类个数,大于1时,填满其他图案
|
||||
"outsideType":1, //外圈排列形式,1:非四角,2:四角,3:随机
|
||||
"showTime":1.2, //显示时间,秒为单位
|
||||
},
|
||||
{
|
||||
"id":"2", //难度id
|
||||
"inside":3, //内圈答案个数
|
||||
"insideType":2, //内圈排列形式,1:一排,2:一列,3:随机
|
||||
"outside":0, //外圈答案种类个数,大于1时,填满其他图案
|
||||
"outsideType":1, //外圈排列形式,1:非四角,2:四角,3:随机
|
||||
"showTime":1.2, //显示时间,秒为单位
|
||||
},
|
||||
{
|
||||
"id":"3", //难度id
|
||||
"inside":3, //内圈答案个数
|
||||
"insideType":3, //内圈排列形式,1:一排,2:一列,3:随机
|
||||
"outside":0, //外圈答案种类个数,大于1时,填满其他图案
|
||||
"outsideType":1, //外圈排列形式,1:非四角,2:四角,3:随机
|
||||
"showTime":1, //显示时间,秒为单位
|
||||
},
|
||||
{
|
||||
"id":"4", //难度id
|
||||
"inside":4, //内圈答案个数
|
||||
"insideType":3, //内圈排列形式,1:一排,2:一列,3:随机
|
||||
"outside":0, //外圈答案种类个数,大于1时,填满其他图案
|
||||
"outsideType":1, //外圈排列形式,1:非四角,2:四角,3:随机
|
||||
"showTime":1, //显示时间,秒为单位
|
||||
},
|
||||
{
|
||||
"id":"5", //难度id
|
||||
"inside":0, //内圈答案个数
|
||||
"insideType":1, //内圈排列形式,1:一排,2:一列,3:随机
|
||||
"outside":1, //外圈答案种类个数,大于1时,填满其他图案
|
||||
"outsideType":1, //外圈排列形式,1:非四角,2:四角,3:随机
|
||||
"showTime":0.9, //显示时间,秒为单位
|
||||
},
|
||||
{
|
||||
"id":"6", //难度id
|
||||
"inside":0, //内圈答案个数
|
||||
"insideType":1, //内圈排列形式,1:一排,2:一列,3:随机
|
||||
"outside":1, //外圈答案种类个数,大于1时,填满其他图案
|
||||
"outsideType":2, //外圈排列形式,1:非四角,2:四角,3:随机
|
||||
"showTime":0.9, //显示时间,秒为单位
|
||||
},
|
||||
{
|
||||
"id":"7", //难度id
|
||||
"inside":0, //内圈答案个数
|
||||
"insideType":1, //内圈排列形式,1:一排,2:一列,3:随机
|
||||
"outside":2, //外圈答案种类个数,大于1时,填满其他图案
|
||||
"outsideType":1, //外圈排列形式,1:非四角,2:四角,3:随机
|
||||
"showTime":1.2, //显示时间,秒为单位
|
||||
},
|
||||
{
|
||||
"id":"8", //难度id
|
||||
"inside":0, //内圈答案个数
|
||||
"insideType":1, //内圈排列形式,1:一排,2:一列,3:随机
|
||||
"outside":3, //外圈答案种类个数,大于1时,填满其他图案
|
||||
"outsideType":2, //外圈排列形式,1:非四角,2:四角,3:随机
|
||||
"showTime":1.2, //显示时间,秒为单位
|
||||
},
|
||||
{
|
||||
"id":"9", //难度id
|
||||
"inside":3, //内圈答案个数
|
||||
"insideType":1, //内圈排列形式,1:一排,2:一列,3:随机
|
||||
"outside":1, //外圈答案种类个数,大于1时,填满其他图案
|
||||
"outsideType":1, //外圈排列形式,1:非四角,2:四角,3:随机
|
||||
"showTime":1.2, //显示时间,秒为单位
|
||||
},
|
||||
{
|
||||
"id":"10", //难度id
|
||||
"inside":3, //内圈答案个数
|
||||
"insideType":2, //内圈排列形式,1:一排,2:一列,3:随机
|
||||
"outside":1, //外圈答案种类个数,大于1时,填满其他图案
|
||||
"outsideType":2, //外圈排列形式,1:非四角,2:四角,3:随机
|
||||
"showTime":1.2, //显示时间,秒为单位
|
||||
},
|
||||
{
|
||||
"id":"11", //难度id
|
||||
"inside":3, //内圈答案个数
|
||||
"insideType":1, //内圈排列形式,1:一排,2:一列,3:随机
|
||||
"outside":2, //外圈答案种类个数,大于1时,填满其他图案
|
||||
"outsideType":1, //外圈排列形式,1:非四角,2:四角,3:随机
|
||||
"showTime":1.8, //显示时间,秒为单位
|
||||
},
|
||||
{
|
||||
"id":"12", //难度id
|
||||
"inside":3, //内圈答案个数
|
||||
"insideType":2, //内圈排列形式,1:一排,2:一列,3:随机
|
||||
"outside":2, //外圈答案种类个数,大于1时,填满其他图案
|
||||
"outsideType":2, //外圈排列形式,1:非四角,2:四角,3:随机
|
||||
"showTime":1.8, //显示时间,秒为单位
|
||||
},
|
||||
{
|
||||
"id":"13", //难度id
|
||||
"inside":4, //内圈答案个数
|
||||
"insideType":3, //内圈排列形式,1:一排,2:一列,3:随机
|
||||
"outside":3, //外圈答案种类个数,大于1时,填满其他图案
|
||||
"outsideType":3, //外圈排列形式,1:非四角,2:四角,3:随机
|
||||
"showTime":1.8, //显示时间,秒为单位
|
||||
},
|
||||
{
|
||||
"id":"14", //难度id
|
||||
"inside":4, //内圈答案个数
|
||||
"insideType":3, //内圈排列形式,1:一排,2:一列,3:随机
|
||||
"outside":3, //外圈答案种类个数,大于1时,填满其他图案
|
||||
"outsideType":3, //外圈排列形式,1:非四角,2:四角,3:随机
|
||||
"showTime":1.8, //显示时间,秒为单位
|
||||
},
|
||||
{
|
||||
"id":"15", //难度id
|
||||
"inside":5, //内圈答案个数
|
||||
"insideType":3, //内圈排列形式,1:一排,2:一列,3:随机
|
||||
"outside":3, //外圈答案种类个数,大于1时,填满其他图案
|
||||
"outsideType":3, //外圈排列形式,1:非四角,2:四角,3:随机
|
||||
"showTime":1.5, //显示时间,秒为单位
|
||||
},
|
||||
{
|
||||
"id":"16", //难度id
|
||||
"inside":5, //内圈答案个数
|
||||
"insideType":3, //内圈排列形式,1:一排,2:一列,3:随机
|
||||
"outside":3, //外圈答案种类个数,大于1时,填满其他图案
|
||||
"outsideType":3, //外圈排列形式,1:非四角,2:四角,3:随机
|
||||
"showTime":1.5, //显示时间,秒为单位
|
||||
}
|
||||
]
|
||||
|
||||
this.GUIDE_INFO =[
|
||||
{
|
||||
"id":"1", //难度id
|
||||
"inside":3, //内圈答案个数
|
||||
"insideType":1, //内圈排列形式,1:一排,2:一列,3:随机
|
||||
"outside":0, //外圈答案种类个数,大于1时,填满其他图案
|
||||
"outsideType":1, //外圈排列形式,1:非四角,2:四角,3:随机
|
||||
"showTime":10000, //显示时间,秒为单位
|
||||
},
|
||||
{
|
||||
"id":"5", //难度id
|
||||
"inside":0, //内圈答案个数
|
||||
"insideType":1, //内圈排列形式,1:一排,2:一列,3:随机
|
||||
"outside":1, //外圈答案种类个数,大于1时,填满其他图案
|
||||
"outsideType":1, //外圈排列形式,1:非四角,2:四角,3:随机
|
||||
"showTime":10000, //显示时间,秒为单位
|
||||
},
|
||||
{
|
||||
"id":"7", //难度id
|
||||
"inside":0, //内圈答案个数
|
||||
"insideType":1, //内圈排列形式,1:一排,2:一列,3:随机
|
||||
"outside":2, //外圈答案种类个数,大于1时,填满其他图案
|
||||
"outsideType":1, //外圈排列形式,1:非四角,2:四角,3:随机
|
||||
"showTime":10000, //显示时间,秒为单位
|
||||
},
|
||||
]
|
||||
|
||||
// this.LEVEL_INFO = [{"id":"0001", //地图ID
|
||||
// "start":[['r'], ['b'], ['g']], //起始状态
|
||||
// "goal":[[], ['r', 'g'], ['b']], //目标状态
|
||||
// "middle":[[['b', 'r', 'g'], [], []], [['g'], ['b'], ['r']], [['r', 'b'], ['g'], []]],//中间状态
|
||||
// "steps":17 //最大步数
|
||||
// }];
|
||||
|
||||
|
||||
// 0 12 3
|
||||
// 312 0 0 2 3 1 13 2 0
|
||||
|
||||
|
||||
// [2], [1], [3]
|
||||
// [[2, 1, 3], [], []]
|
||||
|
||||
|
||||
// [[], [2, 3], [1]]
|
||||
// [[1, 2], [], [3]]
|
||||
// [[[1], [2, 3], []],
|
||||
// [[1], [], [3, 2]]]
|
||||
}
|
||||
|
||||
|
||||
static Authentication(){
|
||||
cc.fx.GameTool.Authentication();
|
||||
}
|
||||
}
|
||||
|
10
assets/Script/module/Config/GameConfig.ts.meta
Normal file
10
assets/Script/module/Config/GameConfig.ts.meta
Normal file
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"ver": "1.1.0",
|
||||
"uuid": "c5692be7-8703-45e4-9f67-23b54d290356",
|
||||
"importer": "typescript",
|
||||
"isPlugin": false,
|
||||
"loadPluginInWeb": true,
|
||||
"loadPluginInNative": true,
|
||||
"loadPluginInEditor": false,
|
||||
"subMetas": {}
|
||||
}
|
13
assets/Script/module/Crypto.meta
Normal file
13
assets/Script/module/Crypto.meta
Normal file
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
"ver": "1.1.3",
|
||||
"uuid": "13a0b173-d59e-4a9d-b5e3-4dbe4dc37cc1",
|
||||
"importer": "folder",
|
||||
"isBundle": false,
|
||||
"bundleName": "",
|
||||
"priority": 1,
|
||||
"compressionType": {},
|
||||
"optimizeHotUpdate": {},
|
||||
"inlineSpriteFrames": {},
|
||||
"isRemoteBundle": {},
|
||||
"subMetas": {}
|
||||
}
|
248
assets/Script/module/Crypto/HttpUtil.ts
Normal file
248
assets/Script/module/Crypto/HttpUtil.ts
Normal file
|
@ -0,0 +1,248 @@
|
|||
|
||||
const {ccclass, property} = cc._decorator;
|
||||
import CryptoJS = require('./crypto-js.min.js'); //引用AES源码js
|
||||
|
||||
const BASE_URL = "https://api.sparkus.cn";
|
||||
//只负责网络接口 次类只负责和后端交互,不负责处理数据 数据处理在GameTool
|
||||
@ccclass
|
||||
export default class HttpUtil extends cc.Component {
|
||||
//排行榜
|
||||
static async rankData(type,callback,data): Promise<any> {
|
||||
const time = Math.floor((new Date().getTime()) / 1000)
|
||||
const url = HttpUtil.apiSign(`/api/get/rank/data?gameId=${config.gameId}&dataType=${type}&time=${time}`, data)
|
||||
this.post(url,data,callback,0);
|
||||
}
|
||||
|
||||
static async uploadUserLogData(data,callback): Promise<any> {
|
||||
const url = '/log/collect/data';
|
||||
this.post(url,data,callback,3);
|
||||
}
|
||||
//暂时用不到
|
||||
static async getUserRecord(data,callback): Promise<any> {
|
||||
const time = Math.floor((new Date().getTime()) / 1000)
|
||||
const url = HttpUtil.apiSign(`/api/get/user/data?gameId=${config.gameId}&time=${time}`, data)
|
||||
this.post(url,data,callback,0);
|
||||
}
|
||||
|
||||
static async get(url, callback,count) {
|
||||
let repeat = count?count:0;
|
||||
const response = await this.fetchData(url, null, 'GET',repeat);
|
||||
callback && callback(response);
|
||||
}
|
||||
|
||||
static async post(url, data, callback,count) {
|
||||
let repeat = count?count:0;
|
||||
const response = await this.fetchData(url, data, 'POST',repeat);
|
||||
callback && callback(response);
|
||||
}
|
||||
|
||||
static async fetchData(url, data, method,repeat) {
|
||||
const fullUrl = `${BASE_URL}${url}`;
|
||||
const headers = { 'Content-Type': 'application/json' };
|
||||
const options = {
|
||||
method,
|
||||
headers,
|
||||
body: data ? JSON.stringify(data) : null,
|
||||
};
|
||||
|
||||
try {
|
||||
var response = await this.fetchWithTimeout(fullUrl,options);
|
||||
if (!response.ok) {
|
||||
throw new Error(`HTTP_______________error! status: ${response.status}`);
|
||||
}
|
||||
return await response.json();
|
||||
} catch (error) {
|
||||
console.error('Fetch_______________error:', error);
|
||||
if(repeat > 0){
|
||||
repeat -= 1;
|
||||
const timeOut = (3-repeat)*5000;
|
||||
setTimeout(async () => {
|
||||
response = await this.fetchData(url, data, method,repeat);
|
||||
}, timeOut);
|
||||
}
|
||||
else{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static async fetchWithTimeout(resource, options = {}) {
|
||||
const controller = new AbortController();
|
||||
const id = setTimeout(() => controller.abort(), 5000);
|
||||
const response = await fetch(resource, {
|
||||
...options,
|
||||
signal: controller.signal
|
||||
});
|
||||
clearTimeout(id);
|
||||
|
||||
return response;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @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 }) {
|
||||
return response.data
|
||||
}
|
||||
// 响应拦截器
|
||||
// Rq.interceptors.response.use(responseHandler)
|
||||
const config = {
|
||||
gameId: "100019",
|
||||
secretKey: "15ELeamO",
|
||||
EK:"hui231%1"
|
||||
};
|
||||
|
||||
interface CrypotoType {
|
||||
encryptByDES: any
|
||||
decryptByDES: any
|
||||
hmacSha256: any
|
||||
}
|
||||
|
||||
class Crypoto implements CrypotoType {
|
||||
// 加密的向明值,自己根据项目实际情况定,需要跟后端开发保持一致
|
||||
private keyHex = this.getHetKey()
|
||||
private getHetKey() {
|
||||
return CryptoJS.enc.Utf8.parse(config.EK);
|
||||
}
|
||||
|
||||
/** DES加密 */
|
||||
encryptByDES(message: string, secret?: string) {
|
||||
if(!message) {
|
||||
return message
|
||||
}
|
||||
const key = secret? CryptoJS.enc.Utf8.parse(secret): this.keyHex
|
||||
const encrypted = CryptoJS.DES.encrypt(message, key, {
|
||||
mode: CryptoJS.mode.ECB,
|
||||
padding: CryptoJS.pad.Pkcs7
|
||||
});
|
||||
return encrypted.toString()
|
||||
}
|
||||
|
||||
/** DES解密 */
|
||||
decryptByDES(message: string, secret?: string) {
|
||||
const key = secret? CryptoJS.enc.Utf8.parse(secret): this.keyHex
|
||||
|
||||
const decrypted = CryptoJS.DES.decrypt({
|
||||
ciphertext: CryptoJS.enc.Base64.parse(message)
|
||||
}, key, {
|
||||
mode: CryptoJS.mode.ECB,
|
||||
padding: CryptoJS.pad.Pkcs7
|
||||
})
|
||||
|
||||
return decrypted.toString(CryptoJS.enc.Utf8)
|
||||
}
|
||||
|
||||
/** hmacSHA256加密 */
|
||||
hmacSha256(message: string, secret?: string) {
|
||||
const keyHex = secret? CryptoJS.enc.Utf8.parse(secret): this.keyHex
|
||||
|
||||
const hash = CryptoJS.HmacSHA256(message, keyHex);
|
||||
return hash.toString()
|
||||
}
|
||||
|
||||
/** hmacSHA256验证 */
|
||||
verifyHmacSha256(message: string, signature: string) {
|
||||
const hash = CryptoJS.HmacSHA256(message, this.keyHex);
|
||||
return hash.toString() === signature
|
||||
}
|
||||
|
||||
/** CBC加密 */
|
||||
encryptCBC(word: string) {
|
||||
if (!word) {
|
||||
return word;
|
||||
}
|
||||
const srcs = CryptoJS.enc.Utf8.parse(word);
|
||||
const encrypted = CryptoJS.AES.encrypt(srcs, this.keyHex, {
|
||||
iv: this.keyHex,
|
||||
mode: CryptoJS.mode.CBC,
|
||||
padding: CryptoJS.pad.ZeroPadding
|
||||
});
|
||||
return encrypted.toString();
|
||||
}
|
||||
|
||||
/** CBC解密 */
|
||||
decryptCBC(word: string) {
|
||||
if (!word) {
|
||||
return word;
|
||||
}
|
||||
const encryptedHexStr = CryptoJS.enc.Hex.parse(word);
|
||||
const srcs = CryptoJS.enc.Base64.stringify(encryptedHexStr);
|
||||
const decrypt = CryptoJS.AES.decrypt(srcs, this.keyHex, {
|
||||
iv: this.keyHex,
|
||||
mode: CryptoJS.mode.CBC,
|
||||
padding: CryptoJS.pad.ZeroPadding
|
||||
});
|
||||
const decryptedStr = decrypt.toString(CryptoJS.enc.Utf8);
|
||||
return decryptedStr.toString();
|
||||
}
|
||||
}
|
||||
const fxCry = new Crypoto();
|
||||
|
||||
function isEmpty(data) {
|
||||
return data === "" || data === null || data === undefined || data.length === 0 || JSON.stringify(data) == "{}"
|
||||
}
|
||||
|
||||
function getQueryString(obj) {
|
||||
// 首先对对象的键进行排序并过滤空值
|
||||
const sortedKeys = Object.keys(obj).sort();
|
||||
const sortedObj = {};
|
||||
for (let i = 0; i < sortedKeys.length; i++) {
|
||||
if (isEmpty(obj[sortedKeys[i]])) {
|
||||
continue;
|
||||
}
|
||||
sortedObj[sortedKeys[i]] = obj[sortedKeys[i]];
|
||||
}
|
||||
|
||||
// 然后将排序后的对象转换为查询字符串
|
||||
const params = [];
|
||||
for (const key in sortedObj) {
|
||||
params.push(`${encodeURIComponent(key)}=${encodeURIComponent(sortedObj[key])}`);
|
||||
}
|
||||
return params.join('&');
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 组装签名字符串
|
||||
* @param string url: 请求地址
|
||||
* @param string postStr: post参数的a=1&b=2
|
||||
* @returns
|
||||
*/
|
||||
|
||||
function genSignStr(url: string, postStr: string): string {
|
||||
let lessUrl = url.replace('?', '')
|
||||
lessUrl = lessUrl + "&" + postStr
|
||||
return encodeURIComponent(fxCry.hmacSha256(lessUrl))
|
||||
}
|
||||
// 对参数进行统一urlencode
|
||||
function urlencode(url: string): string {
|
||||
const [baseUrl, queryString] = url.split("?", 2);
|
||||
const params = new URLSearchParams(queryString);
|
||||
return `${baseUrl}?${params.toString()}`;
|
||||
}
|
||||
|
||||
|
||||
|
10
assets/Script/module/Crypto/HttpUtil.ts.meta
Normal file
10
assets/Script/module/Crypto/HttpUtil.ts.meta
Normal file
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"ver": "1.1.0",
|
||||
"uuid": "771a3d9a-4013-4654-a777-fbaea0c93280",
|
||||
"importer": "typescript",
|
||||
"isPlugin": false,
|
||||
"loadPluginInWeb": true,
|
||||
"loadPluginInNative": true,
|
||||
"loadPluginInEditor": false,
|
||||
"subMetas": {}
|
||||
}
|
3
assets/Script/module/Crypto/crypto-js.min.js
vendored
Normal file
3
assets/Script/module/Crypto/crypto-js.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
10
assets/Script/module/Crypto/crypto-js.min.js.meta
Normal file
10
assets/Script/module/Crypto/crypto-js.min.js.meta
Normal file
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"ver": "1.1.0",
|
||||
"uuid": "e64e1a97-c93f-4257-ab34-80341d8ff79d",
|
||||
"importer": "javascript",
|
||||
"isPlugin": false,
|
||||
"loadPluginInWeb": true,
|
||||
"loadPluginInNative": true,
|
||||
"loadPluginInEditor": false,
|
||||
"subMetas": {}
|
||||
}
|
13
assets/Script/module/GameStart.meta
Normal file
13
assets/Script/module/GameStart.meta
Normal file
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
"ver": "1.1.3",
|
||||
"uuid": "b4e113c6-a987-4133-bfa0-3355d8ab4bd1",
|
||||
"importer": "folder",
|
||||
"isBundle": false,
|
||||
"bundleName": "",
|
||||
"priority": 1,
|
||||
"compressionType": {},
|
||||
"optimizeHotUpdate": {},
|
||||
"inlineSpriteFrames": {},
|
||||
"isRemoteBundle": {},
|
||||
"subMetas": {}
|
||||
}
|
108
assets/Script/module/GameStart/GameAppStart.ts
Normal file
108
assets/Script/module/GameStart/GameAppStart.ts
Normal file
|
@ -0,0 +1,108 @@
|
|||
import { GameConfig } from "../Config/GameConfig";
|
||||
import HttpUtil from "../Crypto/HttpUtil";
|
||||
import AudioManager from "../Music/AudioManager";
|
||||
import { Notifications } from "../Notification/Notification";
|
||||
import { StorageMessage } from "../Storage/Storage";
|
||||
import { GameTool } from "../Tool/GameTool";
|
||||
|
||||
|
||||
window.initMgr = function() {
|
||||
if(cc.fx)
|
||||
{
|
||||
return;
|
||||
}
|
||||
cc.fx = {};
|
||||
|
||||
|
||||
//基础状态信息
|
||||
cc.fx.StateInfo = {
|
||||
debugMode: true,
|
||||
networkConnected: true, //网络状态
|
||||
networkType: 'none', //网络类型
|
||||
isOnForeground: true //当前是否是在前台
|
||||
};
|
||||
|
||||
//应用系统信息
|
||||
//配置文件
|
||||
|
||||
cc.fx.GameConfig = GameConfig;
|
||||
cc.fx.HttpUtil = HttpUtil;
|
||||
cc.fx.GameTool = GameTool;
|
||||
cc.fx.AudioManager = AudioManager;
|
||||
cc.fx.Notifications = Notifications;
|
||||
cc.fx.StorageMessage = StorageMessage;
|
||||
|
||||
cc.fx.ShareInfo = {
|
||||
queryId : -1 //分享id
|
||||
};
|
||||
|
||||
cc.fx.Message = {
|
||||
control: "10001", //传递操作控制
|
||||
startGame:"10002", //传递开始建筑
|
||||
next: "10003" , //传递执行下一个格子洪水流过
|
||||
changePath: "10004", //传递操作控制
|
||||
changeMap: "10005", //改变那地图
|
||||
nextWater: "10006" , //传递执行下一个格子洪水流过
|
||||
addEnd: "10007" , //添加结束点
|
||||
setData: "10008" , //上传分数
|
||||
guideNext: "10009" , //引导进入下一步
|
||||
showResult: "10010", //展示治水结果
|
||||
removeTip: "10011" //执行撤回或者后退动作,移除提示
|
||||
}
|
||||
|
||||
/*
|
||||
* 客户端埋点分享类型
|
||||
*/
|
||||
cc.fx.BurialShareType = {
|
||||
Default : "default", //默认分享类型,分享到群
|
||||
Invite : "invite", // 邀请好友
|
||||
|
||||
DailyInviteRoomJoin:'invite_join_room', //邀请好友加入
|
||||
DailyInviteFriend : 'invite_friend', // 日常邀请好友
|
||||
DailyInviteGroup : 'invate_group', // 日常分享群
|
||||
DailyInviteGroupAlive: 'invate_alive', //日常分享群复活
|
||||
DailyInviteGroupReward: 'invate_rewared',//分享奖励翻倍
|
||||
DailyInviteGroupBox: 'invate_box', //宝箱分享奖励
|
||||
DailyInviteGroupBall: 'invate_ball', //分享领取球球
|
||||
|
||||
MatchResult : 'matchResult', // 比赛结算分享
|
||||
MatchFix5: 'MatchFix5', // 5元红包赛
|
||||
MatchFix20: 'MatchFix20', // 20元红包赛
|
||||
MatchFix100: 'MatchFix100', // 100元红包赛
|
||||
MatchFix500: 'MatchFix500', // 500元红包赛
|
||||
NewerRedEnvelope: 'newerRedEnvelope', // 新手红包
|
||||
CoinRoomResult: 'coinRoomResult', // 金币桌结算
|
||||
HighRate : "highRate",//高倍分享
|
||||
CoinRoomWinStreak: 'coinRoomWinStreak', // 连胜
|
||||
CoinRoomBankruptcy1: 'coinRoomBankruptcy1', // 金币桌破产
|
||||
CoinRoomBankruptcy2: 'coinRoomBankruptcy2', // 金币桌破产
|
||||
CoinRoomBankruptcy3: 'coinRoomBankruptcy3', // 金币桌破产
|
||||
};
|
||||
|
||||
/*
|
||||
* 分享到哪儿给奖励 group frined all
|
||||
*/
|
||||
cc.fx.ShareWhereReward = {
|
||||
Group :"group", //微信群
|
||||
Friend : "friend",//好友
|
||||
All : "all", //不区分
|
||||
};
|
||||
|
||||
//用于存储消息的ID
|
||||
cc.fx.storageType = cc.Enum({
|
||||
storageTypeCustom: 1000101, //用于存储关卡等级
|
||||
});
|
||||
|
||||
//用于存储提示语 按照步骤提示
|
||||
cc.fx.tipType = cc.Enum({
|
||||
tipOne: '神农氏回到家中,开始整理今天收集来的物品。当他第一次拿出或说出一种植物时,请告诉他这是新植物。',
|
||||
tipTwo: '如果他拿出或说出的植物你今天看到过,请告诉他上次是看到的;如果你听他说过,则请告诉他上次是听到的。', //用于存储关卡等级
|
||||
tipErrNew: '这是这局游戏第一次出现{植物}',
|
||||
tipErrOld: '{植物}刚才出现过呢',
|
||||
tipErrHear: '上次遇到{植物}时,似乎不是听到的吧',
|
||||
tipErrSee: '上次遇到{植物}时,似乎不是看到的吧',
|
||||
tipErrLast: '之前确实看到过{植物},但最近一次似乎不是看到的呢',
|
||||
|
||||
});
|
||||
|
||||
};
|
10
assets/Script/module/GameStart/GameAppStart.ts.meta
Normal file
10
assets/Script/module/GameStart/GameAppStart.ts.meta
Normal file
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"ver": "1.1.0",
|
||||
"uuid": "61d4c718-db3b-4b31-8221-f16bea3cf030",
|
||||
"importer": "typescript",
|
||||
"isPlugin": false,
|
||||
"loadPluginInWeb": true,
|
||||
"loadPluginInNative": true,
|
||||
"loadPluginInEditor": false,
|
||||
"subMetas": {}
|
||||
}
|
13
assets/Script/module/Music.meta
Normal file
13
assets/Script/module/Music.meta
Normal file
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
"ver": "1.1.3",
|
||||
"uuid": "0487cacb-b94a-4ab6-a301-b6402ab0ac5d",
|
||||
"importer": "folder",
|
||||
"isBundle": false,
|
||||
"bundleName": "",
|
||||
"priority": 1,
|
||||
"compressionType": {},
|
||||
"optimizeHotUpdate": {},
|
||||
"inlineSpriteFrames": {},
|
||||
"isRemoteBundle": {},
|
||||
"subMetas": {}
|
||||
}
|
245
assets/Script/module/Music/AudioManager.ts
Normal file
245
assets/Script/module/Music/AudioManager.ts
Normal file
|
@ -0,0 +1,245 @@
|
|||
|
||||
|
||||
const {ccclass, property} = cc._decorator;
|
||||
@ccclass
|
||||
export default class AudioManager extends cc.Component {
|
||||
static _instance: any;
|
||||
//背景音乐
|
||||
@property(cc.AudioClip)
|
||||
audioGameBgm0: cc.AudioClip = null;
|
||||
|
||||
@property(cc.AudioClip)
|
||||
chehui: cc.AudioClip = null;
|
||||
@property(cc.AudioClip)
|
||||
jineng: cc.AudioClip = null;
|
||||
@property(cc.AudioClip)
|
||||
qingkong: cc.AudioClip = null;
|
||||
@property(cc.AudioClip)
|
||||
fangxiang: cc.AudioClip = null;
|
||||
@property(cc.AudioClip)
|
||||
build: cc.AudioClip = null;
|
||||
@property(cc.AudioClip)
|
||||
win: cc.AudioClip = null;
|
||||
@property(cc.AudioClip)
|
||||
lose: cc.AudioClip = null;
|
||||
|
||||
|
||||
|
||||
|
||||
mAudioMap: {};
|
||||
bgMusicVolume: number;
|
||||
effectMusicVolume: number;
|
||||
mMusicSwitch: number;
|
||||
mEffectSwitch: number;
|
||||
brickSound: any;
|
||||
reward: boolean;
|
||||
finish: boolean;
|
||||
rewardCount: number;
|
||||
mMusicKey: any;
|
||||
|
||||
onLoad() {
|
||||
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 () {
|
||||
this.mAudioMap = {};
|
||||
/**
|
||||
* 默认音量大小
|
||||
* @type {number}
|
||||
*/
|
||||
this.bgMusicVolume = 0.1;
|
||||
this.effectMusicVolume = 1;
|
||||
|
||||
this.mMusicSwitch = 1;
|
||||
this.mEffectSwitch = 1;
|
||||
}
|
||||
play (audioSource, loop, callback, isBgMusic) {
|
||||
// if (isBgMusic && !this.mMusicSwitch) return;
|
||||
// if (!isBgMusic && !this.mEffectSwitch) return;
|
||||
var volume = isBgMusic ? this.bgMusicVolume : this.effectMusicVolume;
|
||||
|
||||
// if (cc.sys.isBrowser) {
|
||||
// if(audioSource == this.brickSound){
|
||||
// volume = 0.1;
|
||||
// }
|
||||
volume = 1;
|
||||
cc.audioEngine.setEffectsVolume(1);
|
||||
cc.audioEngine.setMusicVolume(1);
|
||||
if(audioSource.name == "lose"){
|
||||
cc.audioEngine.setEffectsVolume(0.5);
|
||||
}
|
||||
else{
|
||||
cc.audioEngine.setEffectsVolume(1);
|
||||
}
|
||||
var context = cc.audioEngine.playEffect(audioSource, loop);
|
||||
if (callback){
|
||||
cc.audioEngine.setFinishCallback(context, function(){
|
||||
callback.call(this);
|
||||
}.bind(this));
|
||||
}
|
||||
// cc.wwx.OutPut.log('play audio effect isBrowser: ' + context.src);
|
||||
|
||||
this.mAudioMap[audioSource] = context;
|
||||
return audioSource;
|
||||
// } else {
|
||||
// return audioSource;
|
||||
// }
|
||||
}
|
||||
|
||||
save () {
|
||||
// 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);
|
||||
}
|
||||
|
||||
// static get Instance()
|
||||
// {
|
||||
// if (this._instance == null)
|
||||
// {
|
||||
// this._instance = new AudioManager();
|
||||
// }
|
||||
// return this._instance;
|
||||
// }
|
||||
|
||||
preload () {
|
||||
if (!(cc.sys.platform === cc.sys.WECHAT_GAME)) { return; }
|
||||
|
||||
var musics = [
|
||||
this.audioGameBgm0,
|
||||
];
|
||||
musics.forEach(function(path) {
|
||||
})
|
||||
}
|
||||
|
||||
getAudioMusicSwitch()
|
||||
{
|
||||
return this.mMusicSwitch;
|
||||
|
||||
}
|
||||
getAudioEffectSwitch()
|
||||
{
|
||||
return this.mEffectSwitch;
|
||||
}
|
||||
trunAudioSound(on)
|
||||
{
|
||||
this.switchMusic(on);
|
||||
this.switchEffect(on)
|
||||
}
|
||||
switchMusic (on) {
|
||||
if (this.mMusicSwitch != (on?1:0))
|
||||
{
|
||||
this.mMusicSwitch = 1-this.mMusicSwitch;
|
||||
// this.save();
|
||||
}
|
||||
if(on)
|
||||
{
|
||||
this.playMusicGame();
|
||||
}
|
||||
else
|
||||
{
|
||||
this.stopMusic();
|
||||
}
|
||||
}
|
||||
switchEffect (on) {
|
||||
if (this.mEffectSwitch != (on?1:0)){
|
||||
this.mEffectSwitch = 1-this.mEffectSwitch;
|
||||
// this.save();
|
||||
|
||||
}
|
||||
}
|
||||
onHide () {
|
||||
cc.audioEngine.pauseAll();
|
||||
}
|
||||
|
||||
onShow () {
|
||||
cc.audioEngine.resumeAll();
|
||||
}
|
||||
|
||||
//播放音效
|
||||
playEffect(name,callback){
|
||||
if(this[name])
|
||||
return this.play(this[name], false,callback,this.mEffectSwitch);
|
||||
}
|
||||
playMusic (key, callback, loop) {
|
||||
loop = typeof loop == 'undefined' || loop ? true : false;
|
||||
this.stopMusic();
|
||||
this.mMusicKey = this.play(key, loop, callback, true);
|
||||
}
|
||||
/**
|
||||
* 游戏背景音乐
|
||||
*/
|
||||
playMusicGame () {
|
||||
this.playMusic(this.audioGameBgm0,{},true);
|
||||
}
|
||||
/**
|
||||
* 停止背景音乐播放
|
||||
*/
|
||||
stopMusic () {
|
||||
// cc.wwx.OutPut.log('stopMusic audio effect wx: ' + this.mMusicKey);
|
||||
|
||||
var context = this.mAudioMap[this.mMusicKey];
|
||||
|
||||
if (typeof(context) != 'undefined') {
|
||||
if (cc.sys.isBrowser) {
|
||||
cc.audioEngine.stop(context);
|
||||
} else {
|
||||
context.stop();
|
||||
}
|
||||
cc.audioEngine.stop(context);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* 游戏开始音效
|
||||
*
|
||||
*/
|
||||
playGameStart()
|
||||
{
|
||||
|
||||
}
|
||||
/*
|
||||
* 失败的游戏结束
|
||||
*/
|
||||
playGameOver()
|
||||
{
|
||||
|
||||
}
|
||||
/*
|
||||
* 成功的游戏结束
|
||||
*/
|
||||
playGameResultFailed()
|
||||
{
|
||||
|
||||
}
|
||||
/*
|
||||
* 成功的游戏结束
|
||||
*/
|
||||
playGameResultSuccess()
|
||||
{
|
||||
|
||||
}
|
||||
/**
|
||||
* 报警的音效
|
||||
*/
|
||||
|
||||
/**
|
||||
* 按钮
|
||||
*/
|
||||
playAudioButton () {
|
||||
// return this.play(this.audioButtonClick, false,null,this.mEffectSwitch);
|
||||
}
|
||||
};
|
||||
|
||||
// export { AudioManager };
|
10
assets/Script/module/Music/AudioManager.ts.meta
Normal file
10
assets/Script/module/Music/AudioManager.ts.meta
Normal file
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"ver": "1.1.0",
|
||||
"uuid": "58403fe7-d7a2-426b-9b19-84d3236731a8",
|
||||
"importer": "typescript",
|
||||
"isPlugin": false,
|
||||
"loadPluginInWeb": true,
|
||||
"loadPluginInNative": true,
|
||||
"loadPluginInEditor": false,
|
||||
"subMetas": {}
|
||||
}
|
13
assets/Script/module/Notification.meta
Normal file
13
assets/Script/module/Notification.meta
Normal file
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
"ver": "1.1.3",
|
||||
"uuid": "ff6560d9-676d-42ad-8ec7-e44acb84ad9e",
|
||||
"importer": "folder",
|
||||
"isBundle": false,
|
||||
"bundleName": "",
|
||||
"priority": 1,
|
||||
"compressionType": {},
|
||||
"optimizeHotUpdate": {},
|
||||
"inlineSpriteFrames": {},
|
||||
"isRemoteBundle": {},
|
||||
"subMetas": {}
|
||||
}
|
45
assets/Script/module/Notification/Notification.ts
Normal file
45
assets/Script/module/Notification/Notification.ts
Normal file
|
@ -0,0 +1,45 @@
|
|||
//全局通知
|
||||
var Notifications = {
|
||||
_eventMap: [],
|
||||
on: function (masgId, callback, target) {
|
||||
if (this._eventMap[masgId] === undefined) {
|
||||
this._eventMap[masgId] = [];
|
||||
}
|
||||
this._eventMap[masgId].push({ callback: callback, target: target });
|
||||
},
|
||||
|
||||
emit: function (masgId, parameter) {
|
||||
let array = this._eventMap[masgId];
|
||||
if (array === undefined) return;
|
||||
|
||||
for (let i = 0; i < array.length; i++) {
|
||||
let element = array[i];
|
||||
if (element) element.callback.call(element.target, parameter);
|
||||
}
|
||||
},
|
||||
|
||||
off: function (masgId, callback) {
|
||||
let array = this._eventMap[masgId];
|
||||
if (array === undefined) return;
|
||||
for (let i = 0; i < array.length; i++) {
|
||||
let element = array[i];
|
||||
if (element && element.callback === callback) {
|
||||
array[i] = undefined;
|
||||
break;
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
offMasgId: function (masgId) {
|
||||
this._eventMap[masgId] = undefined;
|
||||
},
|
||||
|
||||
removeAllMsg: function () {
|
||||
for (let k in this._eventMap) {
|
||||
if (this._eventMap[k]) {
|
||||
this.offMasgId(k);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
export { Notifications };
|
10
assets/Script/module/Notification/Notification.ts.meta
Normal file
10
assets/Script/module/Notification/Notification.ts.meta
Normal file
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"ver": "1.1.0",
|
||||
"uuid": "55403563-1a5a-4f2f-9eb8-82c762641837",
|
||||
"importer": "typescript",
|
||||
"isPlugin": false,
|
||||
"loadPluginInWeb": true,
|
||||
"loadPluginInNative": true,
|
||||
"loadPluginInEditor": false,
|
||||
"subMetas": {}
|
||||
}
|
13
assets/Script/module/RankList.meta
Normal file
13
assets/Script/module/RankList.meta
Normal file
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
"ver": "1.1.3",
|
||||
"uuid": "d3520299-33dc-43d2-b522-d424efb5575d",
|
||||
"importer": "folder",
|
||||
"isBundle": false,
|
||||
"bundleName": "",
|
||||
"priority": 1,
|
||||
"compressionType": {},
|
||||
"optimizeHotUpdate": {},
|
||||
"inlineSpriteFrames": {},
|
||||
"isRemoteBundle": {},
|
||||
"subMetas": {}
|
||||
}
|
76
assets/Script/module/RankList/ItemRender.ts
Normal file
76
assets/Script/module/RankList/ItemRender.ts
Normal file
|
@ -0,0 +1,76 @@
|
|||
|
||||
import List, { ListType } from "./List";
|
||||
|
||||
const { ccclass, property } = cc._decorator;
|
||||
|
||||
@ccclass
|
||||
export default class ItemRender extends cc.Component {
|
||||
/**数据 */
|
||||
public data:any = null;
|
||||
/**索引 0表示第一项*/
|
||||
public itemIndex:number = 0;
|
||||
|
||||
/**数据改变时调用 */
|
||||
public dataChanged(){
|
||||
cc.fx.GameTool.subName(this.data.name,6);
|
||||
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("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("two").active = false;
|
||||
this.node.getChildByName("rank").getChildByName("three").active = false;
|
||||
if(this.data.rank == 1){
|
||||
this.node.getChildByName("rank").getChildByName("one").active = true;
|
||||
this.node.getChildByName("rankLab").active = false;
|
||||
}
|
||||
else if(this.data.rank == 2){
|
||||
this.node.getChildByName("rank").getChildByName("two").active = true;
|
||||
this.node.getChildByName("rankLab").active = false;
|
||||
}
|
||||
else if(this.data.rank == 3){
|
||||
this.node.getChildByName("rank").getChildByName("three").active = true;
|
||||
this.node.getChildByName("rankLab").active = false;
|
||||
}else{
|
||||
this.node.getChildByName("rankLab").active = true;
|
||||
}
|
||||
this.setPic();
|
||||
}
|
||||
|
||||
public setPic(){
|
||||
this.node.getChildByName("pic").getChildByName("icon").active = false;
|
||||
this.node.getChildByName("pic").getChildByName("pic").active= false;
|
||||
var self = this;
|
||||
let url = this.data.pic;
|
||||
fetch(url)
|
||||
.then(response => {
|
||||
return response.headers.get('Content-Length');
|
||||
})
|
||||
|
||||
.then(errNo => {
|
||||
// console.log(this.data.rank,'X-Info:', errNo); // 输出X-ErrNo的值
|
||||
if(errNo == "5093"){
|
||||
// console.log(this.data.rank,"没头像");
|
||||
this.node.getChildByName("pic").getChildByName("icon").active = true;
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
// console.error('Error fetching X-Info:', error);
|
||||
});
|
||||
cc.assetManager.loadRemote(url, {ext:'.png'},(err, texture:cc.Texture2D) => {
|
||||
if(texture){
|
||||
this.node.getChildByName("pic").getChildByName("pic").active= true;
|
||||
var sprite = this.node.getChildByName("pic").getChildByName("pic").getComponent(cc.Sprite);
|
||||
sprite.spriteFrame = new cc.SpriteFrame(texture);
|
||||
// console.log(this.data.rank,"设置头像成功",err);
|
||||
}
|
||||
else{
|
||||
// console.log("设置头像失败",url);
|
||||
console.log(err,texture)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
}
|
10
assets/Script/module/RankList/ItemRender.ts.meta
Normal file
10
assets/Script/module/RankList/ItemRender.ts.meta
Normal file
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"ver": "1.1.0",
|
||||
"uuid": "ca0f9934-a015-436e-9402-f8e30d4c5de6",
|
||||
"importer": "typescript",
|
||||
"isPlugin": false,
|
||||
"loadPluginInWeb": true,
|
||||
"loadPluginInNative": true,
|
||||
"loadPluginInEditor": false,
|
||||
"subMetas": {}
|
||||
}
|
592
assets/Script/module/RankList/List.ts
Normal file
592
assets/Script/module/RankList/List.ts
Normal file
|
@ -0,0 +1,592 @@
|
|||
// Learn TypeScript:
|
||||
// - https://docs.cocos.com/creator/manual/en/scripting/typescript.html
|
||||
// Learn Attribute:
|
||||
// - https://docs.cocos.com/creator/manual/en/scripting/reference/attributes.html
|
||||
// Learn life-cycle callbacks:
|
||||
// - https://docs.cocos.com/creator/manual/en/scripting/life-cycle-callbacks.html
|
||||
|
||||
import ItemRender from "./ItemRender"
|
||||
|
||||
const { ccclass, property } = cc._decorator;
|
||||
|
||||
/**列表排列方式 */
|
||||
export enum ListType {
|
||||
/**水平排列 */
|
||||
Horizontal = 1,
|
||||
/**垂直排列 */
|
||||
Vertical = 2,
|
||||
/**网格排列 */
|
||||
Grid = 3
|
||||
}
|
||||
|
||||
/**网格布局中的方向 */
|
||||
export enum StartAxisType {
|
||||
/**水平排列 */
|
||||
Horizontal = 1,
|
||||
/**垂直排列 */
|
||||
Vertical = 2,
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表
|
||||
* 根据cocos_example的listView改动而来
|
||||
* @author chenkai 2020.7.8
|
||||
* @example
|
||||
* 1.创建cocos的ScrollView组件,添加List,设置List属性即可
|
||||
*
|
||||
*/
|
||||
@ccclass
|
||||
export default class List extends cc.Component {
|
||||
|
||||
//==================== 属性面板 =========================
|
||||
/**列表选项 */
|
||||
@property({ type: cc.Node, tooltip: "列表项" })
|
||||
public itemRender: cc.Node = null;
|
||||
|
||||
/**排列方式 */
|
||||
@property({ type: cc.Enum(ListType), tooltip: "排列方式" })
|
||||
public type: ListType = ListType.Vertical;
|
||||
|
||||
/**网格布局中的方向 */
|
||||
@property({ type: cc.Enum(StartAxisType), tooltip: "网格布局中的方向", visible() { return this.type == ListType.Grid } })
|
||||
public startAxis: StartAxisType = StartAxisType.Horizontal;
|
||||
|
||||
/**列表项之间X间隔 */
|
||||
@property({ type: cc.Integer, tooltip: "列表项X间隔", visible() { return (this.type == ListType.Horizontal || this.type == ListType.Grid) } })
|
||||
public spaceX: number = 0;
|
||||
|
||||
/**列表项之间Y间隔 */
|
||||
@property({ type: cc.Integer, tooltip: "列表项Y间隔", visible() { return this.type == ListType.Vertical || this.type == ListType.Grid } })
|
||||
public spaceY: number = 0;
|
||||
|
||||
/**上间距 */
|
||||
@property({ type: cc.Integer, tooltip: "上间距", visible() { return (this.type == ListType.Vertical || this.type == ListType.Grid) } })
|
||||
public padding_top: number = 0;
|
||||
|
||||
/**下间距 */
|
||||
@property({ type: cc.Integer, tooltip: "下间距", visible() { return (this.type == ListType.Vertical || this.type == ListType.Grid) } })
|
||||
public padding_buttom: number = 0;
|
||||
|
||||
/**左间距 */
|
||||
@property({ type: cc.Integer, tooltip: "左间距", visible() { return (this.type == ListType.Horizontal || this.type == ListType.Grid) } })
|
||||
public padding_left: number = 0;
|
||||
|
||||
|
||||
|
||||
@property(cc.Integer)
|
||||
public _padding: number = 0;
|
||||
|
||||
/**右间距 */
|
||||
@property({ type: cc.Integer, tooltip: "右间距", visible() { return (this.type == ListType.Horizontal || this.type == ListType.Grid) } })
|
||||
public padding_right: number = 0;
|
||||
|
||||
//====================== 滚动容器 ===============================
|
||||
/**列表滚动容器 */
|
||||
public scrollView: cc.ScrollView = null;
|
||||
/**scrollView的内容容器 */
|
||||
private content: cc.Node = null;
|
||||
|
||||
//======================== 列表项 ===========================
|
||||
/**列表项数据 */
|
||||
private itemDataList: Array<any> = [];
|
||||
/**应创建的实例数量 */
|
||||
private spawnCount: number = 0;
|
||||
/**存放列表项实例的数组 */
|
||||
private itemList: Array<cc.Node> = [];
|
||||
/**item的高度 */
|
||||
private itemHeight: number = 0;
|
||||
/**item的宽度 */
|
||||
private itemWidth: number = 0;
|
||||
/**存放不再使用中的列表项 */
|
||||
private itemPool: Array<cc.Node> = [];
|
||||
|
||||
//======================= 计算参数 ==========================
|
||||
/**距离scrollView中心点的距离,超过这个距离的item会被重置,一般设置为 scrollVIew.height/2 + item.heigt/2 + space,因为这个距离item正好超出scrollView显示范围 */
|
||||
private halfScrollView: number = 0;
|
||||
/**上一次content的X值,用于和现在content的X值比较,得出是向左还是向右滚动 */
|
||||
private lastContentPosX: number = 0;
|
||||
/**上一次content的Y值,用于和现在content的Y值比较,得出是向上还是向下滚动 */
|
||||
private lastContentPosY: number = 0;
|
||||
/**网格行数 */
|
||||
private gridRow: number = 0;
|
||||
/**网格列数 */
|
||||
private gridCol: number = 0;
|
||||
/**刷新时间,单位s */
|
||||
private updateTimer: number = 0;
|
||||
/**刷新间隔,单位s */
|
||||
private updateInterval: number = 0.1;
|
||||
/**是否滚动容器 */
|
||||
private bScrolling: boolean = false;
|
||||
/**刷新的函数 */
|
||||
private updateFun: Function = function () { };
|
||||
|
||||
onLoad() {
|
||||
this.itemHeight = this.itemRender.height;
|
||||
this.itemWidth = this.itemRender.width;
|
||||
this.scrollView = this.node.getComponent(cc.ScrollView);
|
||||
this.content = this.scrollView.content;
|
||||
this.content.anchorX = 0;
|
||||
this.content.anchorY = 1;
|
||||
this.content.removeAllChildren();
|
||||
this.scrollView.node.on("scrolling", this.onScrolling, this);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表数据 (列表数据复制使用,如果列表数据改变,则需要重新设置一遍数据)
|
||||
* @param itemDataList item数据列表
|
||||
*/
|
||||
public setData(itemDataList: Array<any>) {
|
||||
this.itemDataList = itemDataList.slice();
|
||||
this.updateContent();
|
||||
|
||||
}
|
||||
|
||||
/**计算列表的各项参数 */
|
||||
private countListParam() {
|
||||
let dataLen = this.itemDataList.length;
|
||||
if (this.type == ListType.Vertical) {
|
||||
this.scrollView.horizontal = false;
|
||||
this.scrollView.vertical = true;
|
||||
this.content.width = this.content.parent.width;
|
||||
this.content.height = dataLen * this.itemHeight + (dataLen - 1) * this.spaceY + this.padding_top + this.padding_buttom;
|
||||
this.spawnCount = Math.round(this.scrollView.node.height / (this.itemHeight + this.spaceY)) + 2; //计算创建的item实例数量,比当前scrollView容器能放下的item数量再加上2个
|
||||
this.halfScrollView = this.scrollView.node.height / 2 + this.itemHeight / 2 + this.spaceY; //计算bufferZone,item的显示范围
|
||||
this.updateFun = this.updateV;
|
||||
} else if (this.type == ListType.Horizontal) {
|
||||
this.scrollView.horizontal = true;
|
||||
this.scrollView.vertical = false;
|
||||
this.content.width = dataLen * this.itemWidth + (dataLen - 1) * this.spaceX + this.padding_left + this.padding_right;
|
||||
this.content.height = this.content.parent.height;
|
||||
this.spawnCount = Math.round(this.scrollView.node.width / (this.itemWidth + this.spaceX)) + 2;
|
||||
this.halfScrollView = this.scrollView.node.width / 2 + this.itemWidth / 2 + this.spaceX;
|
||||
this.updateFun = this.udpateH;
|
||||
} else if (this.type == ListType.Grid) {
|
||||
if (this.startAxis == StartAxisType.Vertical) {
|
||||
this.scrollView.horizontal = false;
|
||||
this.scrollView.vertical = true;
|
||||
this.content.width = this.content.parent.width;
|
||||
//如果left和right间隔过大,导致放不下一个item,则left和right都设置为0,相当于不生效
|
||||
if (this.padding_left + this.padding_right + this.itemWidth + this.spaceX > this.content.width) {
|
||||
this.padding_left = 0;
|
||||
this.padding_right = 0;
|
||||
console.error("padding_left或padding_right过大");
|
||||
}
|
||||
|
||||
this.gridCol = Math.floor((this.content.width - this.padding_left - this.padding_right) / (this.itemWidth + this.spaceX));
|
||||
this.gridRow = Math.ceil(dataLen / this.gridCol);
|
||||
this.content.height = this.gridRow * this.itemHeight + (this.gridRow - 1) * this.spaceY + this.padding_top + this.padding_buttom;
|
||||
this.spawnCount = Math.round(this.scrollView.node.height / (this.itemHeight + this.spaceY)) * this.gridCol + this.gridCol * 2;
|
||||
this.halfScrollView = this.scrollView.node.height / 2 + this.itemHeight / 2 + this.spaceY;
|
||||
this.updateFun = this.updateGrid_V;
|
||||
} else if (this.startAxis == StartAxisType.Horizontal) {
|
||||
this.scrollView.horizontal = true;
|
||||
this.scrollView.vertical = false;
|
||||
//计算高间隔
|
||||
this.content.height = this.content.parent.height;
|
||||
//如果left和right间隔过大,导致放不下一个item,则left和right都设置为0,相当于不生效
|
||||
if (this.padding_top + this.padding_buttom + this.itemHeight + this.spaceY > this.content.height) {
|
||||
this.padding_top = 0;
|
||||
this.padding_buttom = 0;
|
||||
console.error("padding_top或padding_buttom过大");
|
||||
}
|
||||
|
||||
this.gridRow = Math.floor((this.content.height - this.padding_top - this.padding_buttom) / (this.itemHeight + this.spaceY));
|
||||
this.gridCol = Math.ceil(dataLen / this.gridRow);
|
||||
this.content.width = this.gridCol * this.itemWidth + (this.gridCol - 1) * this.spaceX + this.padding_left + this.padding_right;
|
||||
this.spawnCount = Math.round(this.scrollView.node.width / (this.itemWidth + this.spaceX)) * this.gridRow + this.gridRow * 2;
|
||||
this.halfScrollView = this.scrollView.node.width / 2 + this.itemWidth / 2 + this.spaceX;
|
||||
this.updateFun = this.updateGrid_H;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建列表
|
||||
* @param startIndex 起始显示的数据索引 0表示第一项
|
||||
* @param offset scrollView偏移量
|
||||
*/
|
||||
private createList(startIndex: number, offset: cc.Vec2) {
|
||||
//当需要显示的数据长度 > 虚拟列表长度, 删除最末尾几个数据时,列表需要重置位置到scrollView最底端
|
||||
if (this.itemDataList.length > this.spawnCount && (startIndex + this.spawnCount - 1) >= this.itemDataList.length) {
|
||||
startIndex = this.itemDataList.length - this.spawnCount;
|
||||
offset = this.scrollView.getMaxScrollOffset();
|
||||
|
||||
//当需要显示的数据长度 <= 虚拟列表长度, 隐藏多余的虚拟列表项
|
||||
} else if (this.itemDataList.length <= this.spawnCount) {
|
||||
startIndex = 0;
|
||||
}
|
||||
|
||||
for (let i = 0; i < this.spawnCount; i++) {
|
||||
let item: cc.Node;
|
||||
//需要显示的数据索引在数据范围内,则item实例显示出来
|
||||
if (i + startIndex < this.itemDataList.length) {
|
||||
if (this.itemList[i] == null) {
|
||||
item = this.getItem();
|
||||
this.itemList.push(item);
|
||||
item.parent = this.content;
|
||||
} else {
|
||||
item = this.itemList[i];
|
||||
}
|
||||
//需要显示的数据索引超过了数据范围,则item实例隐藏起来
|
||||
} else {
|
||||
//item实例数量 > 需要显示的数据量
|
||||
if (this.itemList.length > (this.itemDataList.length - startIndex)) {
|
||||
item = this.itemList.pop();
|
||||
item.removeFromParent();
|
||||
this.itemPool.push(item);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
let itemRender: ItemRender = item.getComponent(ItemRender);
|
||||
itemRender.itemIndex = i + startIndex;
|
||||
itemRender.data = this.itemDataList[i + startIndex];
|
||||
itemRender.dataChanged();
|
||||
|
||||
if (this.type == ListType.Vertical) {
|
||||
//因为content的锚点X是0,所以item的x值是content.with/2表示居中,锚点Y是1,所以item的y值从content顶部向下是0到负无穷。所以item.y= -item.height/2时,是在content的顶部。
|
||||
item.setPosition(this.content.width / 2, -item.height * (0.5 + i + startIndex) - this.spaceY * (i + startIndex) - this.padding_top);
|
||||
} else if (this.type == ListType.Horizontal) {
|
||||
item.setPosition(item.width * (0.5 + i + startIndex) + this.spaceX * (i + startIndex) + this.padding_left, -this.content.height / 2);
|
||||
} else if (this.type == ListType.Grid) {
|
||||
if (this.startAxis == StartAxisType.Vertical) {
|
||||
var row = Math.floor((i + startIndex) / this.gridCol);
|
||||
var col = (i + startIndex) % this.gridCol;
|
||||
item.setPosition(item.width * (0.5 + col) + this.spaceX * col + this.padding_left, -item.height * (0.5 + row) - this.spaceY * row - this.padding_top);
|
||||
item.opacity = 255;
|
||||
} else if (this.startAxis == StartAxisType.Horizontal) {
|
||||
var row = (i + startIndex) % this.gridRow;
|
||||
var col = Math.floor((i + startIndex) / this.gridRow);
|
||||
item.setPosition(item.width * (0.5 + col) + this.spaceX * col + this.padding_left, -item.height * (0.5 + row) - this.spaceY * row - this.padding_top);
|
||||
item.opacity = 255;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
this.scrollView.scrollToOffset(offset);
|
||||
}
|
||||
|
||||
/**获取一个列表项 */
|
||||
private getItem() {
|
||||
if (this.itemPool.length == 0) {
|
||||
return cc.instantiate(this.itemRender);
|
||||
} else {
|
||||
return this.itemPool.pop();
|
||||
}
|
||||
}
|
||||
|
||||
update(dt) {
|
||||
if (this.bScrolling == false) {
|
||||
return;
|
||||
}
|
||||
this.updateTimer += dt;
|
||||
if (this.updateTimer < this.updateInterval) {
|
||||
return;
|
||||
}
|
||||
this.updateTimer = 0;
|
||||
this.bScrolling = false;
|
||||
this.updateFun();
|
||||
}
|
||||
|
||||
onScrolling() {
|
||||
this.bScrolling = true;
|
||||
}
|
||||
|
||||
/**垂直排列 */
|
||||
private updateV() {
|
||||
let items = this.itemList;
|
||||
let item;
|
||||
let bufferZone = this.halfScrollView;
|
||||
let isUp = this.scrollView.content.y > this.lastContentPosY;
|
||||
let offset = (this.itemHeight + this.spaceY) * items.length;
|
||||
for (let i = 0; i < items.length; i++) {
|
||||
item = items[i];
|
||||
let viewPos = this.getPositionInView(item);
|
||||
if (isUp) {
|
||||
//item上滑时,超出了scrollView上边界,将item移动到下方复用,item移动到下方的位置必须不超过content的下边界
|
||||
if (viewPos.y > bufferZone && item.y - offset - this.padding_buttom > -this.content.height) {
|
||||
let itemRender: ItemRender = item.getComponent(ItemRender);
|
||||
let itemIndex = itemRender.itemIndex + items.length;
|
||||
itemRender.itemIndex = itemIndex;
|
||||
itemRender.data = this.itemDataList[itemIndex];
|
||||
itemRender.dataChanged();
|
||||
item.y = item.y - offset;
|
||||
}
|
||||
} else {
|
||||
//item下滑时,超出了scrollView下边界,将item移动到上方复用,item移动到上方的位置必须不超过content的上边界
|
||||
if (viewPos.y < -bufferZone && item.y + offset + this.padding_top < 0) {
|
||||
let itemRender: ItemRender = item.getComponent(ItemRender);
|
||||
let itemIndex = itemRender.itemIndex - items.length;
|
||||
itemRender.itemIndex = itemIndex;
|
||||
itemRender.data = this.itemDataList[itemIndex];
|
||||
itemRender.dataChanged();
|
||||
item.y = item.y + offset;
|
||||
}
|
||||
}
|
||||
}
|
||||
this.lastContentPosY = this.scrollView.content.y;
|
||||
}
|
||||
|
||||
/**水平排列 */
|
||||
private udpateH() {
|
||||
let items = this.itemList;
|
||||
let item;
|
||||
let bufferZone = this.halfScrollView;
|
||||
let isRight = this.scrollView.content.x > this.lastContentPosX;
|
||||
let offset = (this.itemWidth + this.spaceX) * items.length;
|
||||
for (let i = 0; i < items.length; i++) {
|
||||
item = items[i];
|
||||
let viewPos = this.getPositionInView(item);
|
||||
if (isRight) {
|
||||
//item右滑时,超出了scrollView右边界,将item移动到左方复用,item移动到左方的位置必须不超过content的左边界
|
||||
if (viewPos.x > bufferZone && item.x - offset - this.padding_left > 0) {
|
||||
let itemRender: ItemRender = item.getComponent(ItemRender);
|
||||
let itemIndex = itemRender.itemIndex - items.length;
|
||||
itemRender.itemIndex = itemIndex;
|
||||
itemRender.data = this.itemDataList[itemIndex];
|
||||
itemRender.dataChanged();
|
||||
item.x = item.x - offset;
|
||||
}
|
||||
} else {
|
||||
//item左滑时,超出了scrollView左边界,将item移动到右方复用,item移动到右方的位置必须不超过content的右边界
|
||||
if (viewPos.x < -bufferZone && item.x + offset + this.padding_right < this.content.width) {
|
||||
let itemRender: ItemRender = item.getComponent(ItemRender);
|
||||
let itemIndex = itemRender.itemIndex + items.length;
|
||||
itemRender.itemIndex = itemIndex;
|
||||
itemRender.data = this.itemDataList[itemIndex];
|
||||
itemRender.dataChanged();
|
||||
item.x = item.x + offset;
|
||||
}
|
||||
}
|
||||
}
|
||||
this.lastContentPosX = this.scrollView.content.x;
|
||||
}
|
||||
|
||||
/**网格垂直排列 */
|
||||
private updateGrid_V() {
|
||||
let items = this.itemList;
|
||||
let item: cc.Node;
|
||||
let bufferZone = this.halfScrollView;
|
||||
let isUp = this.scrollView.content.y > this.lastContentPosY;
|
||||
let offset = (this.itemHeight + this.spaceY) * (this.spawnCount / this.gridCol);
|
||||
for (let i = 0; i < items.length; i++) {
|
||||
item = items[i];
|
||||
let viewPos = this.getPositionInView(item);
|
||||
if (isUp) {
|
||||
//item上滑时,超出了scrollView上边界,将item移动到下方复用,item移动到下方的位置必须不超过content的下边界
|
||||
if (viewPos.y > bufferZone && item.y - offset - this.padding_buttom > -this.content.height) {
|
||||
let itemRender: ItemRender = item.getComponent(ItemRender);
|
||||
let itemIndex = itemRender.itemIndex + (this.spawnCount / this.gridCol) * this.gridCol;
|
||||
if (this.itemDataList[itemIndex] != null) {
|
||||
item.y = item.y - offset;
|
||||
itemRender.itemIndex = itemIndex;
|
||||
itemRender.data = this.itemDataList[itemIndex];
|
||||
itemRender.dataChanged();
|
||||
item.opacity = 255;
|
||||
} else {
|
||||
item.y = item.y - offset;
|
||||
itemRender.itemIndex = itemIndex;
|
||||
item.opacity = 0;
|
||||
}
|
||||
}
|
||||
} else {//item下滑时,超出了scrollView下边界,将item移动到上方复用,item移动到上方的位置必须不超过content的上边界
|
||||
if (viewPos.y < -bufferZone && item.y + offset + this.padding_top < 0) {
|
||||
let itemRender: ItemRender = item.getComponent(ItemRender);
|
||||
let itemIndex = itemRender.itemIndex - (this.spawnCount / this.gridCol) * this.gridCol;
|
||||
if (this.itemDataList[itemIndex] != null) {
|
||||
item.y = item.y + offset;
|
||||
itemRender.itemIndex = itemIndex;
|
||||
itemRender.data = this.itemDataList[itemIndex];
|
||||
itemRender.dataChanged();
|
||||
item.opacity = 255;
|
||||
} else {
|
||||
item.y = item.y + offset;
|
||||
itemRender.itemIndex = itemIndex;
|
||||
item.opacity = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
this.lastContentPosY = this.scrollView.content.y;
|
||||
}
|
||||
|
||||
/**网格水平排列 */
|
||||
private updateGrid_H() {
|
||||
let items = this.itemList;
|
||||
let item;
|
||||
let bufferZone = this.halfScrollView;
|
||||
let isRight = this.scrollView.content.x > this.lastContentPosX;
|
||||
let offset = (this.itemWidth + this.spaceX) * (this.spawnCount / this.gridRow);
|
||||
for (let i = 0; i < items.length; i++) {
|
||||
item = items[i];
|
||||
let viewPos = this.getPositionInView(item);
|
||||
if (isRight) {
|
||||
//item右滑时,超出了scrollView右边界,将item移动到左方复用,item移动到左方的位置必须不超过content的左边界
|
||||
if (viewPos.x > bufferZone && item.x - offset - this.padding_left > 0) {
|
||||
let itemRender: ItemRender = item.getComponent(ItemRender);
|
||||
let itemIndex = itemRender.itemIndex - (this.spawnCount / this.gridRow) * this.gridRow;
|
||||
if (this.itemDataList[itemIndex] != null) {
|
||||
item.x = item.x - offset;
|
||||
itemRender.itemIndex = itemIndex;
|
||||
itemRender.data = this.itemDataList[itemIndex];
|
||||
itemRender.dataChanged();
|
||||
item.opacity = 255;
|
||||
} else {
|
||||
item.x = item.x - offset;
|
||||
itemRender.itemIndex = itemIndex;
|
||||
item.opacity = 0;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
//item左滑时,超出了scrollView左边界,将item移动到右方复用,item移动到右方的位置必须不超过content的右边界
|
||||
if (viewPos.x < -bufferZone && item.x + offset + this.padding_right < this.content.width) {
|
||||
let itemRender: ItemRender = item.getComponent(ItemRender);
|
||||
let itemIndex = itemRender.itemIndex + (this.spawnCount / this.gridRow) * this.gridRow;
|
||||
if (this.itemDataList[itemIndex] != null) {
|
||||
item.x = item.x + offset;
|
||||
itemRender.itemIndex = itemIndex;
|
||||
itemRender.data = this.itemDataList[itemIndex];
|
||||
itemRender.dataChanged();
|
||||
item.opacity = 255;
|
||||
} else {
|
||||
item.x = item.x + offset;
|
||||
itemRender.itemIndex = itemIndex;
|
||||
item.opacity = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
this.lastContentPosX = this.scrollView.content.x;
|
||||
}
|
||||
|
||||
/**获取item在scrollView的局部坐标 */
|
||||
private getPositionInView(item) {
|
||||
let worldPos = item.parent.convertToWorldSpaceAR(item.position);
|
||||
let viewPos = this.scrollView.node.convertToNodeSpaceAR(worldPos);
|
||||
return viewPos;
|
||||
}
|
||||
|
||||
/**获取列表数据 */
|
||||
public getListData() {
|
||||
return this.itemDataList;
|
||||
}
|
||||
|
||||
/**
|
||||
* 增加一项数据到列表的末尾
|
||||
* @param data 数据
|
||||
*/
|
||||
public addItem(data: any) {
|
||||
this.itemDataList.push(data);
|
||||
this.updateContent();
|
||||
}
|
||||
|
||||
/**
|
||||
* 增加一项数据到列表指定位置
|
||||
* @param index 位置,0表示第1项
|
||||
* @param data 数据
|
||||
*/
|
||||
public addItemAt(index: number, data: any) {
|
||||
if (this.itemDataList[index] != null || this.itemDataList.length == index) {
|
||||
this.itemDataList.splice(index, 1, data);
|
||||
this.updateContent();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除一项数据
|
||||
* @param index 删除项的位置 ,0表示第1项
|
||||
*/
|
||||
public deleteItem(index: number) {
|
||||
if (this.itemDataList[index] != null) {
|
||||
this.itemDataList.splice(index, 1);
|
||||
this.updateContent();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 改变一项数据
|
||||
* @param index 位置,0表示第1项
|
||||
* @param data 替换的数据
|
||||
*/
|
||||
public changeItem(index: number, data: any) {
|
||||
if (this.itemDataList[index] != null) {
|
||||
this.itemDataList[index] = data;
|
||||
this.updateContent();
|
||||
}
|
||||
}
|
||||
|
||||
/**获取第一个Item的位置 */
|
||||
private updateContent() {
|
||||
//显示列表实例为0个
|
||||
if (this.itemList.length == 0) {
|
||||
this.countListParam();
|
||||
this.createList(0, new cc.Vec2(0, 0));
|
||||
//显示列表的实例不为0个,则需要重新排列item实例数组
|
||||
} else {
|
||||
if (this.type == ListType.Vertical) {
|
||||
this.itemList.sort((a: any, b: any) => {
|
||||
return b.y - a.y;
|
||||
});
|
||||
} else if (this.type == ListType.Horizontal) {
|
||||
this.itemList.sort((a: any, b: any) => {
|
||||
return a.x - b.x;
|
||||
});
|
||||
} else if (this.type == ListType.Grid) {
|
||||
if (this.startAxis == StartAxisType.Vertical) {
|
||||
this.itemList.sort((a: any, b: any) => {
|
||||
return a.x - b.x;
|
||||
});
|
||||
this.itemList.sort((a: any, b: any) => {
|
||||
return b.y - a.y;
|
||||
});
|
||||
} else if (this.startAxis == StartAxisType.Horizontal) {
|
||||
this.itemList.sort((a: any, b: any) => {
|
||||
return b.y - a.y;
|
||||
});
|
||||
this.itemList.sort((a: any, b: any) => {
|
||||
return a.x - b.x;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
this.countListParam();
|
||||
|
||||
//获取第一个item实例需要显示的数据索引
|
||||
var startIndex = this.itemList[0].getComponent(ItemRender).itemIndex;
|
||||
|
||||
if (this.type == ListType.Grid && this.startAxis == StartAxisType.Vertical) {
|
||||
startIndex += (startIndex + this.spawnCount) % this.gridCol;
|
||||
} else if (this.type == ListType.Grid && this.startAxis == StartAxisType.Horizontal) {
|
||||
startIndex += (startIndex + this.spawnCount) % this.gridRow;
|
||||
}
|
||||
|
||||
//getScrollOffset()和scrollToOffset()的x值是相反的
|
||||
var offset: cc.Vec2 = this.scrollView.getScrollOffset();
|
||||
offset.x = - offset.x;
|
||||
|
||||
this.createList(startIndex, offset);
|
||||
}
|
||||
}
|
||||
|
||||
/**销毁 */
|
||||
public onDestroy() {
|
||||
//清理列表项
|
||||
let len = this.itemList.length;
|
||||
for (let i = 0; i < len; i++) {
|
||||
if (cc.isValid(this.itemList[i], true)) {
|
||||
this.itemList[i].destroy();
|
||||
}
|
||||
}
|
||||
this.itemList.length = 0;
|
||||
//清理对象池
|
||||
len = this.itemPool.length;
|
||||
for (let i = 0; i < len; i++) {
|
||||
if (cc.isValid(this.itemPool[i], true)) {
|
||||
this.itemPool[i].destroy();
|
||||
}
|
||||
}
|
||||
this.itemPool.length = 0;
|
||||
//清理列表数据
|
||||
this.itemDataList.length = 0;
|
||||
}
|
||||
}
|
10
assets/Script/module/RankList/List.ts.meta
Normal file
10
assets/Script/module/RankList/List.ts.meta
Normal file
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"ver": "1.1.0",
|
||||
"uuid": "d54211e0-2d28-4528-88e3-e5fd7c9b59a2",
|
||||
"importer": "typescript",
|
||||
"isPlugin": false,
|
||||
"loadPluginInWeb": true,
|
||||
"loadPluginInNative": true,
|
||||
"loadPluginInEditor": false,
|
||||
"subMetas": {}
|
||||
}
|
13
assets/Script/module/Share.meta
Normal file
13
assets/Script/module/Share.meta
Normal 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": {}
|
||||
}
|
BIN
assets/Script/module/Share.zip
Normal file
BIN
assets/Script/module/Share.zip
Normal file
Binary file not shown.
6
assets/Script/module/Share.zip.meta
Normal file
6
assets/Script/module/Share.zip.meta
Normal file
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"ver": "1.0.3",
|
||||
"uuid": "b42c4fc1-4cd1-4b12-b206-930cea3d49ca",
|
||||
"importer": "asset",
|
||||
"subMetas": {}
|
||||
}
|
101
assets/Script/module/Share/share.ts
Normal file
101
assets/Script/module/Share/share.ts
Normal file
|
@ -0,0 +1,101 @@
|
|||
|
||||
|
||||
var shareConfig = {
|
||||
gameId: "100019",
|
||||
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;
|
||||
if (cc.sys.platform == cc.sys.WECHAT_GAME) {
|
||||
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("分享好友成功回调");
|
||||
}
|
||||
});
|
||||
setTimeout(() => {
|
||||
wx.updateTimelineShareData({
|
||||
title: '逻辑性认知测评', // 分享标题
|
||||
link: shareConfig.shareLine, // 分享链接,该链接域名或路径必须与当前页面对应的公众号JS安全域名一致
|
||||
imgUrl: 'https://static.sparkus.cn/public/shennong.jpg', // 分享图标
|
||||
success: function () {
|
||||
// 设置成功
|
||||
console.log("分享朋友圈成功回调");
|
||||
}
|
||||
})
|
||||
}, 500);
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
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,0);
|
||||
}
|
||||
|
||||
|
||||
static containsNanana(str) {
|
||||
return /test/i.test(str);
|
||||
}
|
||||
|
||||
static removeQueryParams(url) {
|
||||
return url.replace(/\?.*$/, '');
|
||||
}
|
||||
|
||||
}
|
10
assets/Script/module/Share/share.ts.meta
Normal file
10
assets/Script/module/Share/share.ts.meta
Normal 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": {}
|
||||
}
|
13
assets/Script/module/Storage.meta
Normal file
13
assets/Script/module/Storage.meta
Normal file
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
"ver": "1.1.3",
|
||||
"uuid": "2af8f2ef-b8a0-43ad-a144-ef4a887f2fa9",
|
||||
"importer": "folder",
|
||||
"isBundle": false,
|
||||
"bundleName": "",
|
||||
"priority": 1,
|
||||
"compressionType": {},
|
||||
"optimizeHotUpdate": {},
|
||||
"inlineSpriteFrames": {},
|
||||
"isRemoteBundle": {},
|
||||
"subMetas": {}
|
||||
}
|
27
assets/Script/module/Storage/Storage.ts
Normal file
27
assets/Script/module/Storage/Storage.ts
Normal file
|
@ -0,0 +1,27 @@
|
|||
//缓存浏览器数据
|
||||
var StorageMessage = {
|
||||
getStorage : function(key){
|
||||
var result = null;
|
||||
if(cc.sys.localStorage.getItem(key)){
|
||||
var result = cc.sys.localStorage.getItem(key);
|
||||
}
|
||||
|
||||
if(result){
|
||||
result = JSON.parse(result);
|
||||
}
|
||||
return result;
|
||||
},
|
||||
setStorage : function(key,value){
|
||||
//主动拉起分享接口
|
||||
var temp = JSON.stringify(value);
|
||||
cc.sys.localStorage.setItem(key, temp)
|
||||
},
|
||||
removeStorage : function(key){
|
||||
//主动删除消息接口
|
||||
if(cc.sys.localStorage.getItem(key)){
|
||||
cc.sys.localStorage.removeItem(key)
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
export { StorageMessage };
|
10
assets/Script/module/Storage/Storage.ts.meta
Normal file
10
assets/Script/module/Storage/Storage.ts.meta
Normal file
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"ver": "1.1.0",
|
||||
"uuid": "10029dfc-5454-4977-bd11-8809e8f48cac",
|
||||
"importer": "typescript",
|
||||
"isPlugin": false,
|
||||
"loadPluginInWeb": true,
|
||||
"loadPluginInNative": true,
|
||||
"loadPluginInEditor": false,
|
||||
"subMetas": {}
|
||||
}
|
13
assets/Script/module/Tool.meta
Normal file
13
assets/Script/module/Tool.meta
Normal file
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
"ver": "1.1.3",
|
||||
"uuid": "2a81f82d-8d16-44af-b947-44eea4dde54f",
|
||||
"importer": "folder",
|
||||
"isBundle": false,
|
||||
"bundleName": "",
|
||||
"priority": 1,
|
||||
"compressionType": {},
|
||||
"optimizeHotUpdate": {},
|
||||
"inlineSpriteFrames": {},
|
||||
"isRemoteBundle": {},
|
||||
"subMetas": {}
|
||||
}
|
370
assets/Script/module/Tool/GameTool.ts
Normal file
370
assets/Script/module/Tool/GameTool.ts
Normal file
|
@ -0,0 +1,370 @@
|
|||
|
||||
//最大工具类 各种公共方法,以及处理上传,获取后端接口数据
|
||||
var GameTool = {
|
||||
_startTime: 0,
|
||||
_endTime: 0,
|
||||
_totalTime: 0,
|
||||
//获取userId
|
||||
Authentication(){
|
||||
let name = "user_" + cc.fx.GameConfig.GM_INFO.gameId;
|
||||
var data = JSON.parse(localStorage.getItem(name));
|
||||
if(data == "undifend" || data==null || data == ""){
|
||||
let url = "https://api.sparkus.cn/api/user/auth/login?domain=hui32579WdYPsgYq&callback="+
|
||||
encodeURIComponent(location.href);
|
||||
console.log("链接没ID准备跳转",url);
|
||||
window.location.href = url;
|
||||
|
||||
}
|
||||
else{
|
||||
if(!this.isNumber(data.userId)){
|
||||
let url = "https://api.sparkus.cn/api/user/auth/login?domain=hui32579WdYPsgYq&callback="+
|
||||
encodeURIComponent(location.href);
|
||||
console.log("链接不合法",url);
|
||||
window.location.href = url;
|
||||
}
|
||||
else{
|
||||
cc.fx.StorageMessage.setStorage(name,data);
|
||||
cc.fx.GameConfig.GM_INFO.userId = parseInt(data.userId);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
isNumber(value) {
|
||||
var result = false;
|
||||
result = typeof value === 'number';
|
||||
if(result) if(value < 200000) result = false;
|
||||
return result;
|
||||
},
|
||||
|
||||
containsTrain(str) {
|
||||
return /from=train/i.test(str);
|
||||
},
|
||||
|
||||
|
||||
//埋点上传
|
||||
setGameData(){
|
||||
//GAME_DATA 初始化 每次清零
|
||||
cc.fx.GameConfig.GAME_DATA = [];
|
||||
cc.fx.GameConfig.GAME_DATA.push(cc.fx.GameConfig.CLICK_DATA);
|
||||
cc.fx.GameConfig.CLICK_init();
|
||||
let data = cc.fx.GameConfig.GAME_DATA;
|
||||
let matchId = this.getMatchId();
|
||||
let postData = {
|
||||
"gameId":cc.fx.GameConfig.GM_INFO.gameId,
|
||||
"userId":cc.fx.GameConfig.GM_INFO.userId,
|
||||
"matchId":matchId,
|
||||
"data": data
|
||||
};
|
||||
|
||||
console.log("上传数据:",data);
|
||||
cc.fx.HttpUtil.uploadUserLogData(postData,function(){})
|
||||
},
|
||||
//上传排行榜 type为1
|
||||
setRank(data){
|
||||
//GAME_DATA 初始化 每次清零
|
||||
let postData = {
|
||||
"gameId":cc.fx.GameConfig.GM_INFO.gameId,
|
||||
"userId":cc.fx.GameConfig.GM_INFO.userId,
|
||||
"type":1,
|
||||
"score": data.score,
|
||||
"accuracy": data.date,
|
||||
"success": cc.fx.GameConfig.GM_INFO.success
|
||||
};
|
||||
cc.fx.HttpUtil.rankData(1,function(){},postData);
|
||||
},
|
||||
//获取排行榜 type为2
|
||||
getRank(data,callback){
|
||||
let rankLength = data.length;
|
||||
let postData = {
|
||||
"gameId":cc.fx.GameConfig.GM_INFO.gameId,
|
||||
"userId":cc.fx.GameConfig.GM_INFO.userId,
|
||||
"page":1,
|
||||
"pageSize":rankLength
|
||||
};
|
||||
//回调进getRankData
|
||||
cc.fx.HttpUtil.rankData(2,data =>{callback(data)},postData);
|
||||
|
||||
},
|
||||
//获取matchId 用于上传每次点击数据里面记录id方便查询
|
||||
getMatchId (){
|
||||
let matchId = cc.sys.localStorage.getItem("matchId");
|
||||
let tempId = matchId;
|
||||
if(matchId == "undifend" || matchId==null){
|
||||
matchId = this.setMatchId();
|
||||
}
|
||||
else{
|
||||
if(this.containsNanana(matchId) == true){
|
||||
matchId = this.setMatchId();
|
||||
}
|
||||
else{
|
||||
let char = parseInt(tempId.substring(10,tempId.length));
|
||||
if(cc.fx.GameConfig.GM_INFO.level == 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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(this.containsNanana(matchId) == true){
|
||||
matchId = this.setMatchId();
|
||||
}
|
||||
return matchId;
|
||||
},
|
||||
//检测matchId 如果有缓存以前的nanana数据清除
|
||||
containsNanana(str) {
|
||||
return /na/i.test(str);
|
||||
},
|
||||
//重新设置MatchId
|
||||
setMatchId (){
|
||||
// 定义包含可用字符的字符集
|
||||
const characters = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789';
|
||||
// 创建一个数组以保存随机字符
|
||||
const uuidArray = [];
|
||||
// 循环10次 生成10位的UUID
|
||||
for (let i = 0; i < 10; i++) {
|
||||
// 生成随机索引,范围是字符集的长度
|
||||
const randomIndex = Math.floor(Math.random() * characters.length);
|
||||
// 从字符集中获取随机字符
|
||||
const randomChar = characters.charAt(randomIndex);
|
||||
// 将字符添加到数组中
|
||||
uuidArray.push(randomChar);
|
||||
}
|
||||
let data = uuidArray.join('') + 1 + "";
|
||||
cc.sys.localStorage.setItem("matchNumber",1);
|
||||
cc.sys.localStorage.setItem("matchId",data);
|
||||
cc.fx.GameConfig.GM_INFO.matchId = data;
|
||||
return data;
|
||||
},
|
||||
//截取名字
|
||||
subName(name,length){
|
||||
if(name.length > length){
|
||||
name = name.substring(0,length) + "..."
|
||||
}
|
||||
return name;
|
||||
},
|
||||
//设置头像
|
||||
setPic(node,pic){
|
||||
node.active = false;
|
||||
let url = pic;
|
||||
setTimeout(() => {
|
||||
fetch(url)
|
||||
.then(response => {
|
||||
return response.headers.get('Content-Length');
|
||||
})
|
||||
.then(errNo => {
|
||||
if(errNo == "5093"){
|
||||
node.active = true;
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
// console.error('Error fetching X-Info:', error);
|
||||
});
|
||||
}, 100);
|
||||
cc.assetManager.loadRemote(url, {ext:'.png'},(err, texture:cc.Texture2D) => {
|
||||
if(texture){
|
||||
node.active = true;
|
||||
node.getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(texture);
|
||||
}
|
||||
else{
|
||||
console.log(err,texture)
|
||||
}
|
||||
})
|
||||
},
|
||||
//第一个参数把目标带进来处理,第二个参数为名字长度,不同场景不同需求
|
||||
//名字4短,小排行,名字6长,大排行
|
||||
getRankData(data,target,nameLength){
|
||||
target.listData = data.data.list;
|
||||
target.selfData = data.data.info;
|
||||
let rankData = [];
|
||||
let self = false;
|
||||
cc.fx.GameTool.setPic(target.selfNode.getChildByName("pic").getChildByName("icon"),target.selfData.pic);
|
||||
for(let i=0;i<=target.listData.length-1;i++){
|
||||
rankData.push({rank:(i+1), name:target.listData[i].nickName, total:target.listData[i].score,time:null, pic:target.listData[i].pic});
|
||||
if(cc.fx.GameConfig.GM_INFO.userId == target.listData[i].userId){
|
||||
self = true;
|
||||
target.rankNumber = i;
|
||||
target.selfNode.getChildByName("rankLab").getComponent(cc.Label).string =(i+1) + "";
|
||||
}
|
||||
if(i == (target.listData.length-1) && self == false){
|
||||
target.rankNumber = i;
|
||||
target.selfNode.getChildByName("rankLab").getComponent(cc.Label).string = "99+";
|
||||
}
|
||||
}
|
||||
cc.fx.GameTool.subName(target.selfData.nickName,nameLength);
|
||||
target.selfNode.getChildByName("nameLab").getComponent(cc.Label).string = target.selfData.nickName;
|
||||
target.selfNode.getChildByName("totalLab").getComponent(cc.Label).string = target.selfData.score;
|
||||
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){
|
||||
case "1":
|
||||
target.selfNode.getChildByName("rank").getChildByName("one").active = true;
|
||||
break;
|
||||
case "2":
|
||||
target.selfNode.getChildByName("rank").getChildByName("two").active = true;
|
||||
break;
|
||||
case "3":
|
||||
target.selfNode.getChildByName("rank").getChildByName("three").active = true;
|
||||
break;
|
||||
}
|
||||
// 大排行
|
||||
if(nameLength == 6){
|
||||
target.rankList.setData(rankData);
|
||||
target.selfNode.opacity = 255;
|
||||
if(target.selfData.totalSunCount == 0) target.selfNode.opacity = 0;
|
||||
}
|
||||
},
|
||||
|
||||
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);
|
||||
},
|
||||
|
||||
|
||||
getSetScreenResolutionFlag: function () {
|
||||
let size = cc.winSize;
|
||||
let width = size.width;
|
||||
let height = size.height;
|
||||
if ((height / width) > (16.2 / 9)) return false;
|
||||
return true;
|
||||
},
|
||||
//判断全面屏适配
|
||||
setFit: function (canvas) {
|
||||
let flag = cc.fx.GameTool.getSetScreenResolutionFlag();
|
||||
if (flag) {
|
||||
// console.log("不是全面屏");
|
||||
} else {
|
||||
// console.log("是全面屏");
|
||||
}
|
||||
return flag;
|
||||
},
|
||||
//获取游戏信息
|
||||
getGameInfo: function(node){
|
||||
var jg = false;
|
||||
return jg;
|
||||
},
|
||||
//设置游戏信息
|
||||
setGameInfo: function(pd){
|
||||
|
||||
},
|
||||
|
||||
//打乱数组
|
||||
shuffleArray(arr) {
|
||||
return arr.sort(() => Math.random() - 0.5);
|
||||
},
|
||||
|
||||
//打字机效果
|
||||
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) => {
|
||||
let total = 0;
|
||||
total = second;
|
||||
let hour = 0;
|
||||
hour = parseInt((total / 3600) + "");//计算整数小时数
|
||||
let afterHour = total - hour * 60 * 60;//取得算出小时数后剩余的秒数
|
||||
let min = parseInt((afterHour / 60)+"");//计算整数分
|
||||
let m = "" + min;
|
||||
if(min < 10) m = "0"+min;
|
||||
let afterMin = total - hour * 60 * 60 - min * 60;//取得算出分后剩余的秒数
|
||||
let miao = afterMin + "";
|
||||
if(afterMin < 10) miao = "0" + afterMin;
|
||||
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
|
||||
},
|
||||
|
||||
//输入秒,返回需要展示时间格式
|
||||
getTimeLondon:(second) => {
|
||||
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(){
|
||||
var timestamp = (new Date().getTime())
|
||||
return timestamp;
|
||||
},
|
||||
pushLister:function () {
|
||||
|
||||
},
|
||||
removeAllLister:function () {
|
||||
|
||||
},
|
||||
|
||||
};
|
||||
export { GameTool };
|
10
assets/Script/module/Tool/GameTool.ts.meta
Normal file
10
assets/Script/module/Tool/GameTool.ts.meta
Normal file
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"ver": "1.1.0",
|
||||
"uuid": "43bfc27a-ff6e-45b3-87c7-504d0f781397",
|
||||
"importer": "typescript",
|
||||
"isPlugin": false,
|
||||
"loadPluginInWeb": true,
|
||||
"loadPluginInNative": true,
|
||||
"loadPluginInEditor": false,
|
||||
"subMetas": {}
|
||||
}
|
13
assets/Shader.meta
Normal file
13
assets/Shader.meta
Normal file
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
"ver": "1.1.3",
|
||||
"uuid": "afa9e39a-94ca-477f-8a2a-25082d9092c3",
|
||||
"importer": "folder",
|
||||
"isBundle": false,
|
||||
"bundleName": "",
|
||||
"priority": 1,
|
||||
"compressionType": {},
|
||||
"optimizeHotUpdate": {},
|
||||
"inlineSpriteFrames": {},
|
||||
"isRemoteBundle": {},
|
||||
"subMetas": {}
|
||||
}
|
13
assets/Texture.meta
Normal file
13
assets/Texture.meta
Normal file
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
"ver": "1.1.3",
|
||||
"uuid": "7b81d4e8-ec84-4716-968d-500ac1d78a54",
|
||||
"importer": "folder",
|
||||
"isBundle": false,
|
||||
"bundleName": "",
|
||||
"priority": 1,
|
||||
"compressionType": {},
|
||||
"optimizeHotUpdate": {},
|
||||
"inlineSpriteFrames": {},
|
||||
"isRemoteBundle": {},
|
||||
"subMetas": {}
|
||||
}
|
BIN
assets/Texture/HelloWorld.png
Normal file
BIN
assets/Texture/HelloWorld.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 37 KiB |
38
assets/Texture/HelloWorld.png.meta
Normal file
38
assets/Texture/HelloWorld.png.meta
Normal file
|
@ -0,0 +1,38 @@
|
|||
{
|
||||
"ver": "2.3.7",
|
||||
"uuid": "6aa0aa6a-ebee-4155-a088-a687a6aadec4",
|
||||
"importer": "texture",
|
||||
"type": "sprite",
|
||||
"wrapMode": "clamp",
|
||||
"filterMode": "bilinear",
|
||||
"premultiplyAlpha": false,
|
||||
"genMipmaps": false,
|
||||
"packable": true,
|
||||
"width": 195,
|
||||
"height": 270,
|
||||
"platformSettings": {},
|
||||
"subMetas": {
|
||||
"HelloWorld": {
|
||||
"ver": "1.0.6",
|
||||
"uuid": "31bc895a-c003-4566-a9f3-2e54ae1c17dc",
|
||||
"importer": "sprite-frame",
|
||||
"rawTextureUuid": "6aa0aa6a-ebee-4155-a088-a687a6aadec4",
|
||||
"trimType": "auto",
|
||||
"trimThreshold": 1,
|
||||
"rotated": false,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"trimX": 0,
|
||||
"trimY": 0,
|
||||
"width": 195,
|
||||
"height": 270,
|
||||
"rawWidth": 195,
|
||||
"rawHeight": 270,
|
||||
"borderTop": 0,
|
||||
"borderBottom": 0,
|
||||
"borderLeft": 0,
|
||||
"borderRight": 0,
|
||||
"subMetas": {}
|
||||
}
|
||||
}
|
||||
}
|
BIN
assets/Texture/singleColor.png
Normal file
BIN
assets/Texture/singleColor.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 82 B |
38
assets/Texture/singleColor.png.meta
Normal file
38
assets/Texture/singleColor.png.meta
Normal file
|
@ -0,0 +1,38 @@
|
|||
{
|
||||
"ver": "2.3.7",
|
||||
"uuid": "a8027877-d8d6-4645-97a0-52d4a0123dba",
|
||||
"importer": "texture",
|
||||
"type": "sprite",
|
||||
"wrapMode": "clamp",
|
||||
"filterMode": "bilinear",
|
||||
"premultiplyAlpha": false,
|
||||
"genMipmaps": false,
|
||||
"packable": true,
|
||||
"width": 2,
|
||||
"height": 2,
|
||||
"platformSettings": {},
|
||||
"subMetas": {
|
||||
"singleColor": {
|
||||
"ver": "1.0.6",
|
||||
"uuid": "410fb916-8721-4663-bab8-34397391ace7",
|
||||
"importer": "sprite-frame",
|
||||
"rawTextureUuid": "a8027877-d8d6-4645-97a0-52d4a0123dba",
|
||||
"trimType": "auto",
|
||||
"trimThreshold": 1,
|
||||
"rotated": false,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"trimX": 0,
|
||||
"trimY": 0,
|
||||
"width": 2,
|
||||
"height": 2,
|
||||
"rawWidth": 2,
|
||||
"rawHeight": 2,
|
||||
"borderTop": 0,
|
||||
"borderBottom": 0,
|
||||
"borderLeft": 0,
|
||||
"borderRight": 0,
|
||||
"subMetas": {}
|
||||
}
|
||||
}
|
||||
}
|
13
assets/animation.meta
Normal file
13
assets/animation.meta
Normal file
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
"ver": "1.1.3",
|
||||
"uuid": "7c1d6faa-66b9-4423-aa04-8c38a15768cf",
|
||||
"importer": "folder",
|
||||
"isBundle": false,
|
||||
"bundleName": "",
|
||||
"priority": 1,
|
||||
"compressionType": {},
|
||||
"optimizeHotUpdate": {},
|
||||
"inlineSpriteFrames": {},
|
||||
"isRemoteBundle": {},
|
||||
"subMetas": {}
|
||||
}
|
13
assets/migration.meta
Normal file
13
assets/migration.meta
Normal file
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
"ver": "1.1.3",
|
||||
"uuid": "2e3d6223-9889-4122-8121-c6d837f5367e",
|
||||
"importer": "folder",
|
||||
"isBundle": false,
|
||||
"bundleName": "",
|
||||
"priority": 1,
|
||||
"compressionType": {},
|
||||
"optimizeHotUpdate": {},
|
||||
"inlineSpriteFrames": {},
|
||||
"isRemoteBundle": {},
|
||||
"subMetas": {}
|
||||
}
|
17
assets/migration/use_v2.1-2.2.1_cc.Toggle_event.js
Normal file
17
assets/migration/use_v2.1-2.2.1_cc.Toggle_event.js
Normal file
|
@ -0,0 +1,17 @@
|
|||
/*
|
||||
* This script is automatically generated by Cocos Creator and is only used for projects compatible with the v2.1.0 ~ 2.2.1 version.
|
||||
* You do not need to manually add this script in any other project.
|
||||
* If you don't use cc.Toggle in your project, you can delete this script directly.
|
||||
* If your project is hosted in VCS such as git, submit this script together.
|
||||
*
|
||||
* 此脚本由 Cocos Creator 自动生成,仅用于兼容 v2.1.0 ~ 2.2.1 版本的工程,
|
||||
* 你无需在任何其它项目中手动添加此脚本。
|
||||
* 如果你的项目中没用到 Toggle,可直接删除该脚本。
|
||||
* 如果你的项目有托管于 git 等版本库,请将此脚本一并上传。
|
||||
*/
|
||||
|
||||
if (cc.Toggle) {
|
||||
// Whether to trigger 'toggle' and 'checkEvents' events when modifying 'toggle.isChecked' in the code
|
||||
// 在代码中修改 'toggle.isChecked' 时是否触发 'toggle' 与 'checkEvents' 事件
|
||||
cc.Toggle._triggerEventInScript_isChecked = true;
|
||||
}
|
10
assets/migration/use_v2.1-2.2.1_cc.Toggle_event.js.meta
Normal file
10
assets/migration/use_v2.1-2.2.1_cc.Toggle_event.js.meta
Normal file
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"ver": "1.1.0",
|
||||
"uuid": "7a231473-d1df-4b05-8620-6376c36252c1",
|
||||
"importer": "javascript",
|
||||
"isPlugin": false,
|
||||
"loadPluginInWeb": true,
|
||||
"loadPluginInNative": true,
|
||||
"loadPluginInEditor": false,
|
||||
"subMetas": {}
|
||||
}
|
13
assets/music.meta
Normal file
13
assets/music.meta
Normal file
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
"ver": "1.1.3",
|
||||
"uuid": "6ebfe2d9-539a-4853-8b16-fca5c89cf2ce",
|
||||
"importer": "folder",
|
||||
"isBundle": false,
|
||||
"bundleName": "",
|
||||
"priority": 1,
|
||||
"compressionType": {},
|
||||
"optimizeHotUpdate": {},
|
||||
"inlineSpriteFrames": {},
|
||||
"isRemoteBundle": {},
|
||||
"subMetas": {}
|
||||
}
|
13
assets/prefab.meta
Normal file
13
assets/prefab.meta
Normal file
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
"ver": "1.1.3",
|
||||
"uuid": "bf3935ca-518a-42f4-84e4-ad96badfd1b4",
|
||||
"importer": "folder",
|
||||
"isBundle": false,
|
||||
"bundleName": "",
|
||||
"priority": 1,
|
||||
"compressionType": {},
|
||||
"optimizeHotUpdate": {},
|
||||
"inlineSpriteFrames": {},
|
||||
"isRemoteBundle": {},
|
||||
"subMetas": {}
|
||||
}
|
5181
assets/prefab/Canvas.prefab
Normal file
5181
assets/prefab/Canvas.prefab
Normal file
File diff suppressed because it is too large
Load Diff
9
assets/prefab/Canvas.prefab.meta
Normal file
9
assets/prefab/Canvas.prefab.meta
Normal file
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
"ver": "1.3.2",
|
||||
"uuid": "badb56f7-1c07-4fbb-87e6-5bfd805fe81b",
|
||||
"importer": "prefab",
|
||||
"optimizationPolicy": "AUTO",
|
||||
"asyncLoadAssets": false,
|
||||
"readonly": false,
|
||||
"subMetas": {}
|
||||
}
|
1364
assets/prefab/RankListItem.prefab
Normal file
1364
assets/prefab/RankListItem.prefab
Normal file
File diff suppressed because it is too large
Load Diff
9
assets/prefab/RankListItem.prefab.meta
Normal file
9
assets/prefab/RankListItem.prefab.meta
Normal file
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
"ver": "1.3.2",
|
||||
"uuid": "a264c8df-80f6-474f-9fe5-28b7ae529d95",
|
||||
"importer": "prefab",
|
||||
"optimizationPolicy": "AUTO",
|
||||
"asyncLoadAssets": false,
|
||||
"readonly": false,
|
||||
"subMetas": {}
|
||||
}
|
578
assets/prefab/kuang1.prefab
Normal file
578
assets/prefab/kuang1.prefab
Normal file
|
@ -0,0 +1,578 @@
|
|||
[
|
||||
{
|
||||
"__type__": "cc.Prefab",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"_native": "",
|
||||
"data": {
|
||||
"__id__": 1
|
||||
},
|
||||
"optimizationPolicy": 0,
|
||||
"asyncLoadAssets": false,
|
||||
"readonly": false
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Node",
|
||||
"_name": "kuang1",
|
||||
"_objFlags": 0,
|
||||
"_parent": null,
|
||||
"_children": [
|
||||
{
|
||||
"__id__": 2
|
||||
},
|
||||
{
|
||||
"__id__": 5
|
||||
},
|
||||
{
|
||||
"__id__": 8
|
||||
},
|
||||
{
|
||||
"__id__": 11
|
||||
}
|
||||
],
|
||||
"_active": true,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 14
|
||||
},
|
||||
{
|
||||
"__id__": 15
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 16
|
||||
},
|
||||
"_opacity": 255,
|
||||
"_color": {
|
||||
"__type__": "cc.Color",
|
||||
"r": 255,
|
||||
"g": 255,
|
||||
"b": 255,
|
||||
"a": 255
|
||||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 114,
|
||||
"height": 114
|
||||
},
|
||||
"_anchorPoint": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0.5,
|
||||
"y": 0.5
|
||||
},
|
||||
"_trs": {
|
||||
"__type__": "TypedArray",
|
||||
"ctor": "Float64Array",
|
||||
"array": [
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1
|
||||
]
|
||||
},
|
||||
"_eulerAngles": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0
|
||||
},
|
||||
"_skewX": 0,
|
||||
"_skewY": 0,
|
||||
"_is3DNode": false,
|
||||
"_groupIndex": 0,
|
||||
"groupIndex": 0,
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Node",
|
||||
"_name": "texture",
|
||||
"_objFlags": 0,
|
||||
"_parent": {
|
||||
"__id__": 1
|
||||
},
|
||||
"_children": [],
|
||||
"_active": false,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 3
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 4
|
||||
},
|
||||
"_opacity": 255,
|
||||
"_color": {
|
||||
"__type__": "cc.Color",
|
||||
"r": 255,
|
||||
"g": 255,
|
||||
"b": 255,
|
||||
"a": 255
|
||||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 114,
|
||||
"height": 114
|
||||
},
|
||||
"_anchorPoint": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0.5,
|
||||
"y": 0.5
|
||||
},
|
||||
"_trs": {
|
||||
"__type__": "TypedArray",
|
||||
"ctor": "Float64Array",
|
||||
"array": [
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1
|
||||
]
|
||||
},
|
||||
"_eulerAngles": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0
|
||||
},
|
||||
"_skewX": 0,
|
||||
"_skewY": 0,
|
||||
"_is3DNode": false,
|
||||
"_groupIndex": 0,
|
||||
"groupIndex": 0,
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Sprite",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"node": {
|
||||
"__id__": 2
|
||||
},
|
||||
"_enabled": true,
|
||||
"_materials": [
|
||||
{
|
||||
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
|
||||
}
|
||||
],
|
||||
"_srcBlendFactor": 770,
|
||||
"_dstBlendFactor": 771,
|
||||
"_spriteFrame": null,
|
||||
"_type": 0,
|
||||
"_sizeMode": 1,
|
||||
"_fillType": 0,
|
||||
"_fillCenter": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"_fillStart": 0,
|
||||
"_fillRange": 0,
|
||||
"_isTrimmedMode": true,
|
||||
"_atlas": null,
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.PrefabInfo",
|
||||
"root": {
|
||||
"__id__": 1
|
||||
},
|
||||
"asset": {
|
||||
"__id__": 0
|
||||
},
|
||||
"fileId": "cb+RD2JWVCkJUw7HZjeVJw",
|
||||
"sync": false
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Node",
|
||||
"_name": "lock",
|
||||
"_objFlags": 0,
|
||||
"_parent": {
|
||||
"__id__": 1
|
||||
},
|
||||
"_children": [],
|
||||
"_active": false,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 6
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 7
|
||||
},
|
||||
"_opacity": 255,
|
||||
"_color": {
|
||||
"__type__": "cc.Color",
|
||||
"r": 255,
|
||||
"g": 255,
|
||||
"b": 255,
|
||||
"a": 255
|
||||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 46,
|
||||
"height": 74
|
||||
},
|
||||
"_anchorPoint": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0.5,
|
||||
"y": 0.5
|
||||
},
|
||||
"_trs": {
|
||||
"__type__": "TypedArray",
|
||||
"ctor": "Float64Array",
|
||||
"array": [
|
||||
0.607,
|
||||
1.821,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1
|
||||
]
|
||||
},
|
||||
"_eulerAngles": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0
|
||||
},
|
||||
"_skewX": 0,
|
||||
"_skewY": 0,
|
||||
"_is3DNode": false,
|
||||
"_groupIndex": 0,
|
||||
"groupIndex": 0,
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Sprite",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"node": {
|
||||
"__id__": 5
|
||||
},
|
||||
"_enabled": true,
|
||||
"_materials": [
|
||||
{
|
||||
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
|
||||
}
|
||||
],
|
||||
"_srcBlendFactor": 770,
|
||||
"_dstBlendFactor": 771,
|
||||
"_spriteFrame": {
|
||||
"__uuid__": "48f0add1-7741-4b9a-b25e-186ad457e4ac"
|
||||
},
|
||||
"_type": 0,
|
||||
"_sizeMode": 1,
|
||||
"_fillType": 0,
|
||||
"_fillCenter": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"_fillStart": 0,
|
||||
"_fillRange": 0,
|
||||
"_isTrimmedMode": true,
|
||||
"_atlas": {
|
||||
"__uuid__": "e883b928-b637-44d9-af8d-b83e856a59f7"
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.PrefabInfo",
|
||||
"root": {
|
||||
"__id__": 1
|
||||
},
|
||||
"asset": {
|
||||
"__id__": 0
|
||||
},
|
||||
"fileId": "b2FjX80FNLLphA9TbTenI5",
|
||||
"sync": false
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Node",
|
||||
"_name": "yes",
|
||||
"_objFlags": 0,
|
||||
"_parent": {
|
||||
"__id__": 1
|
||||
},
|
||||
"_children": [],
|
||||
"_active": false,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 9
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 10
|
||||
},
|
||||
"_opacity": 255,
|
||||
"_color": {
|
||||
"__type__": "cc.Color",
|
||||
"r": 255,
|
||||
"g": 255,
|
||||
"b": 255,
|
||||
"a": 255
|
||||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 74,
|
||||
"height": 60
|
||||
},
|
||||
"_anchorPoint": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0.5,
|
||||
"y": 0.5
|
||||
},
|
||||
"_trs": {
|
||||
"__type__": "TypedArray",
|
||||
"ctor": "Float64Array",
|
||||
"array": [
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1
|
||||
]
|
||||
},
|
||||
"_eulerAngles": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0
|
||||
},
|
||||
"_skewX": 0,
|
||||
"_skewY": 0,
|
||||
"_is3DNode": false,
|
||||
"_groupIndex": 0,
|
||||
"groupIndex": 0,
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Sprite",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"node": {
|
||||
"__id__": 8
|
||||
},
|
||||
"_enabled": true,
|
||||
"_materials": [
|
||||
{
|
||||
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
|
||||
}
|
||||
],
|
||||
"_srcBlendFactor": 770,
|
||||
"_dstBlendFactor": 771,
|
||||
"_spriteFrame": {
|
||||
"__uuid__": "907b33f0-998c-44e2-b2a3-697e56dc3ebb"
|
||||
},
|
||||
"_type": 0,
|
||||
"_sizeMode": 1,
|
||||
"_fillType": 0,
|
||||
"_fillCenter": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"_fillStart": 0,
|
||||
"_fillRange": 0,
|
||||
"_isTrimmedMode": true,
|
||||
"_atlas": {
|
||||
"__uuid__": "e883b928-b637-44d9-af8d-b83e856a59f7"
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.PrefabInfo",
|
||||
"root": {
|
||||
"__id__": 1
|
||||
},
|
||||
"asset": {
|
||||
"__id__": 0
|
||||
},
|
||||
"fileId": "6aiWrN5ntPEZ1DTfyuRYrh",
|
||||
"sync": false
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Node",
|
||||
"_name": "err",
|
||||
"_objFlags": 0,
|
||||
"_parent": {
|
||||
"__id__": 1
|
||||
},
|
||||
"_children": [],
|
||||
"_active": false,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 12
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 13
|
||||
},
|
||||
"_opacity": 255,
|
||||
"_color": {
|
||||
"__type__": "cc.Color",
|
||||
"r": 255,
|
||||
"g": 255,
|
||||
"b": 255,
|
||||
"a": 255
|
||||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 57,
|
||||
"height": 49
|
||||
},
|
||||
"_anchorPoint": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0.5,
|
||||
"y": 0.5
|
||||
},
|
||||
"_trs": {
|
||||
"__type__": "TypedArray",
|
||||
"ctor": "Float64Array",
|
||||
"array": [
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1
|
||||
]
|
||||
},
|
||||
"_eulerAngles": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0
|
||||
},
|
||||
"_skewX": 0,
|
||||
"_skewY": 0,
|
||||
"_is3DNode": false,
|
||||
"_groupIndex": 0,
|
||||
"groupIndex": 0,
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Sprite",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"node": {
|
||||
"__id__": 11
|
||||
},
|
||||
"_enabled": true,
|
||||
"_materials": [
|
||||
{
|
||||
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
|
||||
}
|
||||
],
|
||||
"_srcBlendFactor": 770,
|
||||
"_dstBlendFactor": 771,
|
||||
"_spriteFrame": {
|
||||
"__uuid__": "4dd594fe-a599-468b-a82e-4a36f5133ec1"
|
||||
},
|
||||
"_type": 0,
|
||||
"_sizeMode": 1,
|
||||
"_fillType": 0,
|
||||
"_fillCenter": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"_fillStart": 0,
|
||||
"_fillRange": 0,
|
||||
"_isTrimmedMode": true,
|
||||
"_atlas": {
|
||||
"__uuid__": "e883b928-b637-44d9-af8d-b83e856a59f7"
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.PrefabInfo",
|
||||
"root": {
|
||||
"__id__": 1
|
||||
},
|
||||
"asset": {
|
||||
"__id__": 0
|
||||
},
|
||||
"fileId": "5fygkPzHdC16MoH5hPg3LA",
|
||||
"sync": false
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Sprite",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"node": {
|
||||
"__id__": 1
|
||||
},
|
||||
"_enabled": true,
|
||||
"_materials": [
|
||||
{
|
||||
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
|
||||
}
|
||||
],
|
||||
"_srcBlendFactor": 770,
|
||||
"_dstBlendFactor": 771,
|
||||
"_spriteFrame": null,
|
||||
"_type": 0,
|
||||
"_sizeMode": 1,
|
||||
"_fillType": 0,
|
||||
"_fillCenter": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"_fillStart": 0,
|
||||
"_fillRange": 0,
|
||||
"_isTrimmedMode": true,
|
||||
"_atlas": null,
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "d63eeqXqS5GV5T/inM6K0aA",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"node": {
|
||||
"__id__": 1
|
||||
},
|
||||
"_enabled": true,
|
||||
"UI": {
|
||||
"__uuid__": "e883b928-b637-44d9-af8d-b83e856a59f7"
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.PrefabInfo",
|
||||
"root": {
|
||||
"__id__": 1
|
||||
},
|
||||
"asset": {
|
||||
"__id__": 0
|
||||
},
|
||||
"fileId": "",
|
||||
"sync": false
|
||||
}
|
||||
]
|
9
assets/prefab/kuang1.prefab.meta
Normal file
9
assets/prefab/kuang1.prefab.meta
Normal file
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
"ver": "1.3.2",
|
||||
"uuid": "b48b18b9-75c5-4181-93d6-b21930056fdc",
|
||||
"importer": "prefab",
|
||||
"optimizationPolicy": "AUTO",
|
||||
"asyncLoadAssets": false,
|
||||
"readonly": false,
|
||||
"subMetas": {}
|
||||
}
|
578
assets/prefab/kuang2.prefab
Normal file
578
assets/prefab/kuang2.prefab
Normal file
|
@ -0,0 +1,578 @@
|
|||
[
|
||||
{
|
||||
"__type__": "cc.Prefab",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"_native": "",
|
||||
"data": {
|
||||
"__id__": 1
|
||||
},
|
||||
"optimizationPolicy": 0,
|
||||
"asyncLoadAssets": false,
|
||||
"readonly": false
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Node",
|
||||
"_name": "kuang2",
|
||||
"_objFlags": 0,
|
||||
"_parent": null,
|
||||
"_children": [
|
||||
{
|
||||
"__id__": 2
|
||||
},
|
||||
{
|
||||
"__id__": 5
|
||||
},
|
||||
{
|
||||
"__id__": 8
|
||||
},
|
||||
{
|
||||
"__id__": 11
|
||||
}
|
||||
],
|
||||
"_active": true,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 14
|
||||
},
|
||||
{
|
||||
"__id__": 15
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 16
|
||||
},
|
||||
"_opacity": 255,
|
||||
"_color": {
|
||||
"__type__": "cc.Color",
|
||||
"r": 255,
|
||||
"g": 255,
|
||||
"b": 255,
|
||||
"a": 255
|
||||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 114,
|
||||
"height": 114
|
||||
},
|
||||
"_anchorPoint": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0.5,
|
||||
"y": 0.5
|
||||
},
|
||||
"_trs": {
|
||||
"__type__": "TypedArray",
|
||||
"ctor": "Float64Array",
|
||||
"array": [
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1
|
||||
]
|
||||
},
|
||||
"_eulerAngles": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0
|
||||
},
|
||||
"_skewX": 0,
|
||||
"_skewY": 0,
|
||||
"_is3DNode": false,
|
||||
"_groupIndex": 0,
|
||||
"groupIndex": 0,
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Node",
|
||||
"_name": "texture",
|
||||
"_objFlags": 0,
|
||||
"_parent": {
|
||||
"__id__": 1
|
||||
},
|
||||
"_children": [],
|
||||
"_active": false,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 3
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 4
|
||||
},
|
||||
"_opacity": 255,
|
||||
"_color": {
|
||||
"__type__": "cc.Color",
|
||||
"r": 255,
|
||||
"g": 255,
|
||||
"b": 255,
|
||||
"a": 255
|
||||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 100,
|
||||
"height": 100
|
||||
},
|
||||
"_anchorPoint": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0.5,
|
||||
"y": 0.5
|
||||
},
|
||||
"_trs": {
|
||||
"__type__": "TypedArray",
|
||||
"ctor": "Float64Array",
|
||||
"array": [
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1
|
||||
]
|
||||
},
|
||||
"_eulerAngles": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0
|
||||
},
|
||||
"_skewX": 0,
|
||||
"_skewY": 0,
|
||||
"_is3DNode": false,
|
||||
"_groupIndex": 0,
|
||||
"groupIndex": 0,
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Sprite",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"node": {
|
||||
"__id__": 2
|
||||
},
|
||||
"_enabled": true,
|
||||
"_materials": [
|
||||
{
|
||||
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
|
||||
}
|
||||
],
|
||||
"_srcBlendFactor": 770,
|
||||
"_dstBlendFactor": 771,
|
||||
"_spriteFrame": null,
|
||||
"_type": 0,
|
||||
"_sizeMode": 1,
|
||||
"_fillType": 0,
|
||||
"_fillCenter": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"_fillStart": 0,
|
||||
"_fillRange": 0,
|
||||
"_isTrimmedMode": true,
|
||||
"_atlas": null,
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.PrefabInfo",
|
||||
"root": {
|
||||
"__id__": 1
|
||||
},
|
||||
"asset": {
|
||||
"__id__": 0
|
||||
},
|
||||
"fileId": "23WEB0XcVFr77K2a8TMpQf",
|
||||
"sync": false
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Node",
|
||||
"_name": "lock",
|
||||
"_objFlags": 0,
|
||||
"_parent": {
|
||||
"__id__": 1
|
||||
},
|
||||
"_children": [],
|
||||
"_active": false,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 6
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 7
|
||||
},
|
||||
"_opacity": 255,
|
||||
"_color": {
|
||||
"__type__": "cc.Color",
|
||||
"r": 255,
|
||||
"g": 255,
|
||||
"b": 255,
|
||||
"a": 255
|
||||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 46,
|
||||
"height": 74
|
||||
},
|
||||
"_anchorPoint": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0.5,
|
||||
"y": 0.5
|
||||
},
|
||||
"_trs": {
|
||||
"__type__": "TypedArray",
|
||||
"ctor": "Float64Array",
|
||||
"array": [
|
||||
0.607,
|
||||
1.821,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1
|
||||
]
|
||||
},
|
||||
"_eulerAngles": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0
|
||||
},
|
||||
"_skewX": 0,
|
||||
"_skewY": 0,
|
||||
"_is3DNode": false,
|
||||
"_groupIndex": 0,
|
||||
"groupIndex": 0,
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Sprite",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"node": {
|
||||
"__id__": 5
|
||||
},
|
||||
"_enabled": true,
|
||||
"_materials": [
|
||||
{
|
||||
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
|
||||
}
|
||||
],
|
||||
"_srcBlendFactor": 770,
|
||||
"_dstBlendFactor": 771,
|
||||
"_spriteFrame": {
|
||||
"__uuid__": "48f0add1-7741-4b9a-b25e-186ad457e4ac"
|
||||
},
|
||||
"_type": 0,
|
||||
"_sizeMode": 1,
|
||||
"_fillType": 0,
|
||||
"_fillCenter": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"_fillStart": 0,
|
||||
"_fillRange": 0,
|
||||
"_isTrimmedMode": true,
|
||||
"_atlas": {
|
||||
"__uuid__": "e883b928-b637-44d9-af8d-b83e856a59f7"
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.PrefabInfo",
|
||||
"root": {
|
||||
"__id__": 1
|
||||
},
|
||||
"asset": {
|
||||
"__id__": 0
|
||||
},
|
||||
"fileId": "6c4kkHqqBGk7Uzo0NLuWTe",
|
||||
"sync": false
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Node",
|
||||
"_name": "yes",
|
||||
"_objFlags": 0,
|
||||
"_parent": {
|
||||
"__id__": 1
|
||||
},
|
||||
"_children": [],
|
||||
"_active": false,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 9
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 10
|
||||
},
|
||||
"_opacity": 255,
|
||||
"_color": {
|
||||
"__type__": "cc.Color",
|
||||
"r": 255,
|
||||
"g": 255,
|
||||
"b": 255,
|
||||
"a": 255
|
||||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 74,
|
||||
"height": 60
|
||||
},
|
||||
"_anchorPoint": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0.5,
|
||||
"y": 0.5
|
||||
},
|
||||
"_trs": {
|
||||
"__type__": "TypedArray",
|
||||
"ctor": "Float64Array",
|
||||
"array": [
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1
|
||||
]
|
||||
},
|
||||
"_eulerAngles": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0
|
||||
},
|
||||
"_skewX": 0,
|
||||
"_skewY": 0,
|
||||
"_is3DNode": false,
|
||||
"_groupIndex": 0,
|
||||
"groupIndex": 0,
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Sprite",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"node": {
|
||||
"__id__": 8
|
||||
},
|
||||
"_enabled": true,
|
||||
"_materials": [
|
||||
{
|
||||
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
|
||||
}
|
||||
],
|
||||
"_srcBlendFactor": 770,
|
||||
"_dstBlendFactor": 771,
|
||||
"_spriteFrame": {
|
||||
"__uuid__": "907b33f0-998c-44e2-b2a3-697e56dc3ebb"
|
||||
},
|
||||
"_type": 0,
|
||||
"_sizeMode": 1,
|
||||
"_fillType": 0,
|
||||
"_fillCenter": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"_fillStart": 0,
|
||||
"_fillRange": 0,
|
||||
"_isTrimmedMode": true,
|
||||
"_atlas": {
|
||||
"__uuid__": "e883b928-b637-44d9-af8d-b83e856a59f7"
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.PrefabInfo",
|
||||
"root": {
|
||||
"__id__": 1
|
||||
},
|
||||
"asset": {
|
||||
"__id__": 0
|
||||
},
|
||||
"fileId": "8fLsGa13pEq5tEAv7CeQA9",
|
||||
"sync": false
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Node",
|
||||
"_name": "err",
|
||||
"_objFlags": 0,
|
||||
"_parent": {
|
||||
"__id__": 1
|
||||
},
|
||||
"_children": [],
|
||||
"_active": false,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 12
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 13
|
||||
},
|
||||
"_opacity": 255,
|
||||
"_color": {
|
||||
"__type__": "cc.Color",
|
||||
"r": 255,
|
||||
"g": 255,
|
||||
"b": 255,
|
||||
"a": 255
|
||||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 57,
|
||||
"height": 49
|
||||
},
|
||||
"_anchorPoint": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0.5,
|
||||
"y": 0.5
|
||||
},
|
||||
"_trs": {
|
||||
"__type__": "TypedArray",
|
||||
"ctor": "Float64Array",
|
||||
"array": [
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1
|
||||
]
|
||||
},
|
||||
"_eulerAngles": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0
|
||||
},
|
||||
"_skewX": 0,
|
||||
"_skewY": 0,
|
||||
"_is3DNode": false,
|
||||
"_groupIndex": 0,
|
||||
"groupIndex": 0,
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Sprite",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"node": {
|
||||
"__id__": 11
|
||||
},
|
||||
"_enabled": true,
|
||||
"_materials": [
|
||||
{
|
||||
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
|
||||
}
|
||||
],
|
||||
"_srcBlendFactor": 770,
|
||||
"_dstBlendFactor": 771,
|
||||
"_spriteFrame": {
|
||||
"__uuid__": "4dd594fe-a599-468b-a82e-4a36f5133ec1"
|
||||
},
|
||||
"_type": 0,
|
||||
"_sizeMode": 1,
|
||||
"_fillType": 0,
|
||||
"_fillCenter": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"_fillStart": 0,
|
||||
"_fillRange": 0,
|
||||
"_isTrimmedMode": true,
|
||||
"_atlas": {
|
||||
"__uuid__": "e883b928-b637-44d9-af8d-b83e856a59f7"
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.PrefabInfo",
|
||||
"root": {
|
||||
"__id__": 1
|
||||
},
|
||||
"asset": {
|
||||
"__id__": 0
|
||||
},
|
||||
"fileId": "81rn3gLHtJJZCY62CJzWlY",
|
||||
"sync": false
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Sprite",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"node": {
|
||||
"__id__": 1
|
||||
},
|
||||
"_enabled": true,
|
||||
"_materials": [
|
||||
{
|
||||
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
|
||||
}
|
||||
],
|
||||
"_srcBlendFactor": 770,
|
||||
"_dstBlendFactor": 771,
|
||||
"_spriteFrame": null,
|
||||
"_type": 0,
|
||||
"_sizeMode": 1,
|
||||
"_fillType": 0,
|
||||
"_fillCenter": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"_fillStart": 0,
|
||||
"_fillRange": 0,
|
||||
"_isTrimmedMode": true,
|
||||
"_atlas": null,
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "d63eeqXqS5GV5T/inM6K0aA",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"node": {
|
||||
"__id__": 1
|
||||
},
|
||||
"_enabled": true,
|
||||
"UI": {
|
||||
"__uuid__": "e883b928-b637-44d9-af8d-b83e856a59f7"
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.PrefabInfo",
|
||||
"root": {
|
||||
"__id__": 1
|
||||
},
|
||||
"asset": {
|
||||
"__id__": 0
|
||||
},
|
||||
"fileId": "",
|
||||
"sync": false
|
||||
}
|
||||
]
|
9
assets/prefab/kuang2.prefab.meta
Normal file
9
assets/prefab/kuang2.prefab.meta
Normal file
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
"ver": "1.3.2",
|
||||
"uuid": "5e344685-dbe0-4509-8b66-27ddb72e2d23",
|
||||
"importer": "prefab",
|
||||
"optimizationPolicy": "AUTO",
|
||||
"asyncLoadAssets": false,
|
||||
"readonly": false,
|
||||
"subMetas": {}
|
||||
}
|
13
assets/res.meta
Normal file
13
assets/res.meta
Normal file
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
"ver": "1.1.3",
|
||||
"uuid": "2880dc26-5b38-48bd-baba-daaec97499cb",
|
||||
"importer": "folder",
|
||||
"isBundle": false,
|
||||
"bundleName": "",
|
||||
"priority": 1,
|
||||
"compressionType": {},
|
||||
"optimizeHotUpdate": {},
|
||||
"inlineSpriteFrames": {},
|
||||
"isRemoteBundle": {},
|
||||
"subMetas": {}
|
||||
}
|
25
assets/resources.meta
Normal file
25
assets/resources.meta
Normal file
|
@ -0,0 +1,25 @@
|
|||
{
|
||||
"ver": "1.1.3",
|
||||
"uuid": "52e78fe3-9095-42ad-8e4d-f9bb12dc69ce",
|
||||
"importer": "folder",
|
||||
"isBundle": true,
|
||||
"bundleName": "resources",
|
||||
"priority": 8,
|
||||
"compressionType": {
|
||||
"web-mobile": "default",
|
||||
"wechatgame": "default"
|
||||
},
|
||||
"optimizeHotUpdate": {
|
||||
"web-mobile": false,
|
||||
"wechatgame": false
|
||||
},
|
||||
"inlineSpriteFrames": {
|
||||
"web-mobile": false,
|
||||
"wechatgame": false
|
||||
},
|
||||
"isRemoteBundle": {
|
||||
"web-mobile": false,
|
||||
"wechatgame": true
|
||||
},
|
||||
"subMetas": {}
|
||||
}
|
13
assets/resources/Json.meta
Normal file
13
assets/resources/Json.meta
Normal file
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
"ver": "1.1.3",
|
||||
"uuid": "066e91c2-fc55-407c-b061-9e4de4a9f224",
|
||||
"importer": "folder",
|
||||
"isBundle": false,
|
||||
"bundleName": "",
|
||||
"priority": 1,
|
||||
"compressionType": {},
|
||||
"optimizeHotUpdate": {},
|
||||
"inlineSpriteFrames": {},
|
||||
"isRemoteBundle": {},
|
||||
"subMetas": {}
|
||||
}
|
18
assets/resources/Json/CLICK_DATA.json
Normal file
18
assets/resources/Json/CLICK_DATA.json
Normal file
|
@ -0,0 +1,18 @@
|
|||
{
|
||||
"data" :
|
||||
{
|
||||
"type": 1,
|
||||
"success": false,
|
||||
"round": 0,
|
||||
"totalSunCount": 0,
|
||||
"movedSunCount": 0,
|
||||
"sunSpeed": 0,
|
||||
"overlapSunCount": 0,
|
||||
"colorList": [],
|
||||
"duration": 0,
|
||||
"difficultyLevel": 0,
|
||||
"sunList": [],
|
||||
"stepTimeList": [],
|
||||
"remainder": 120
|
||||
}
|
||||
}
|
6
assets/resources/Json/CLICK_DATA.json.meta
Normal file
6
assets/resources/Json/CLICK_DATA.json.meta
Normal file
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"ver": "1.0.2",
|
||||
"uuid": "e1d57e63-4f2f-467d-9c55-0a889d5533a8",
|
||||
"importer": "json",
|
||||
"subMetas": {}
|
||||
}
|
14
assets/resources/Json/GM_INFO.json
Normal file
14
assets/resources/Json/GM_INFO.json
Normal file
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
"data":{
|
||||
"mean_Time": 0,
|
||||
"total": 0,
|
||||
"currSeed": 203213,
|
||||
"gameId": 100009,
|
||||
"userId": 0,
|
||||
"guide": true,
|
||||
"url": "http://api.sparkus.cn",
|
||||
"success": false,
|
||||
"matchId": null,
|
||||
"custom": 0
|
||||
}
|
||||
}
|
6
assets/resources/Json/GM_INFO.json.meta
Normal file
6
assets/resources/Json/GM_INFO.json.meta
Normal file
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"ver": "1.0.2",
|
||||
"uuid": "2d69a479-18ec-4787-b35f-e9a9b3247435",
|
||||
"importer": "json",
|
||||
"subMetas": {}
|
||||
}
|
205
assets/resources/Json/LEVEL_INFO.json
Normal file
205
assets/resources/Json/LEVEL_INFO.json
Normal file
|
@ -0,0 +1,205 @@
|
|||
{
|
||||
"data" : [
|
||||
{
|
||||
"number": 3,
|
||||
"moveNumber": 0,
|
||||
"moveSpeed": 0,
|
||||
"maxDistance": 200,
|
||||
"maxMove": 1200,
|
||||
"repeat": 0
|
||||
},
|
||||
{
|
||||
"number": 4,
|
||||
"moveNumber": 0,
|
||||
"moveSpeed": 0,
|
||||
"maxDistance": 200,
|
||||
"maxMove": 1200,
|
||||
"repeat": 0
|
||||
},
|
||||
{
|
||||
"number": 4,
|
||||
"moveNumber": 0,
|
||||
"moveSpeed": 0,
|
||||
"maxDistance": 200,
|
||||
"maxMove": 1200,
|
||||
"repeat": 1
|
||||
},
|
||||
{
|
||||
"number": 5,
|
||||
"moveNumber": 1,
|
||||
"moveSpeed": 6,
|
||||
"maxDistance": 200,
|
||||
"maxMove": 1200,
|
||||
"repeat": 0
|
||||
},
|
||||
{
|
||||
"number": 5,
|
||||
"moveNumber": 0,
|
||||
"moveSpeed": 6,
|
||||
"maxDistance": 200,
|
||||
"maxMove": 1200,
|
||||
"repeat": 1
|
||||
},
|
||||
{
|
||||
"number": 6,
|
||||
"moveNumber": 0,
|
||||
"moveSpeed": 6,
|
||||
"maxDistance": 200,
|
||||
"maxMove": 1200,
|
||||
"repeat": 1
|
||||
},
|
||||
{
|
||||
"number": 6,
|
||||
"moveNumber": 3,
|
||||
"moveSpeed": 4,
|
||||
"maxDistance": 200,
|
||||
"maxMove": 1200,
|
||||
"repeat": 0
|
||||
},
|
||||
{
|
||||
"number": 7,
|
||||
"moveNumber": 0,
|
||||
"moveSpeed": 4,
|
||||
"maxDistance": 200,
|
||||
"maxMove": 1200,
|
||||
"repeat": 0
|
||||
},
|
||||
{
|
||||
"number": 7,
|
||||
"moveNumber": 3,
|
||||
"moveSpeed": 4,
|
||||
"maxDistance": 200,
|
||||
"maxMove": 1200,
|
||||
"repeat": 0
|
||||
},
|
||||
{
|
||||
"number": 7,
|
||||
"moveNumber": 3,
|
||||
"moveSpeed": 6,
|
||||
"maxDistance": 200,
|
||||
"maxMove": 1200,
|
||||
"repeat": 1
|
||||
},
|
||||
{
|
||||
"number": 8,
|
||||
"moveNumber": 3,
|
||||
"moveSpeed": 6,
|
||||
"maxDistance": 200,
|
||||
"maxMove": 1200,
|
||||
"repeat": 0
|
||||
},
|
||||
{
|
||||
"number": 8,
|
||||
"moveNumber": 5,
|
||||
"moveSpeed": 6,
|
||||
"maxDistance": 200,
|
||||
"maxMove": 1200,
|
||||
"repeat": 1
|
||||
},
|
||||
{
|
||||
"number": 9,
|
||||
"moveNumber": 3,
|
||||
"moveSpeed": 6,
|
||||
"maxDistance": 200,
|
||||
"maxMove": 1200,
|
||||
"repeat": 0
|
||||
},
|
||||
{
|
||||
"number": 9,
|
||||
"moveNumber": 5,
|
||||
"moveSpeed": 6,
|
||||
"maxDistance": 200,
|
||||
"maxMove": 1200,
|
||||
"repeat": 1
|
||||
},
|
||||
{
|
||||
"number": 10,
|
||||
"moveNumber": 5,
|
||||
"moveSpeed": 6,
|
||||
"maxDistance": 200,
|
||||
"maxMove": 1200,
|
||||
"repeat": 1
|
||||
},
|
||||
{
|
||||
"number": 3,
|
||||
"moveNumber": 0,
|
||||
"moveSpeed": 6,
|
||||
"maxDistance": 200,
|
||||
"maxMove": 1200,
|
||||
"repeat": 0
|
||||
},
|
||||
{
|
||||
"number": 4,
|
||||
"moveNumber": 0,
|
||||
"moveSpeed": 0,
|
||||
"maxDistance": 200,
|
||||
"maxMove": 1200,
|
||||
"repeat": 0
|
||||
},
|
||||
{
|
||||
"number": 4,
|
||||
"moveNumber": 1,
|
||||
"moveSpeed": 6,
|
||||
"maxDistance": 200,
|
||||
"maxMove": 1200,
|
||||
"repeat": 0
|
||||
},
|
||||
{
|
||||
"number": 4,
|
||||
"moveNumber": 0,
|
||||
"moveSpeed": 6,
|
||||
"maxDistance": 200,
|
||||
"maxMove": 1200,
|
||||
"repeat": 1
|
||||
},
|
||||
{
|
||||
"number": 4,
|
||||
"moveNumber": 1,
|
||||
"moveSpeed": 6,
|
||||
"maxDistance": 200,
|
||||
"maxMove": 1200,
|
||||
"repeat": 1
|
||||
},
|
||||
{
|
||||
"number": 5,
|
||||
"moveNumber": 1,
|
||||
"moveSpeed": 6,
|
||||
"maxDistance": 200,
|
||||
"maxMove": 1200,
|
||||
"repeat": 0
|
||||
},
|
||||
{
|
||||
"number": 5,
|
||||
"moveNumber": 0,
|
||||
"moveSpeed": 6,
|
||||
"maxDistance": 200,
|
||||
"maxMove": 1200,
|
||||
"repeat": 1
|
||||
},
|
||||
{
|
||||
"number": 5,
|
||||
"moveNumber": 1,
|
||||
"moveSpeed": 6,
|
||||
"maxDistance": 200,
|
||||
"maxMove": 1200,
|
||||
"repeat": 1
|
||||
},
|
||||
{
|
||||
"number": 5,
|
||||
"moveNumber": 2,
|
||||
"moveSpeed": 6,
|
||||
"maxDistance": 200,
|
||||
"maxMove": 1200,
|
||||
"repeat": 1
|
||||
},
|
||||
{
|
||||
"number": 5,
|
||||
"moveNumber": 3,
|
||||
"moveSpeed": 6,
|
||||
"maxDistance": 200,
|
||||
"maxMove": 1200,
|
||||
"repeat": 1
|
||||
}
|
||||
|
||||
]
|
||||
}
|
6
assets/resources/Json/LEVEL_INFO.json.meta
Normal file
6
assets/resources/Json/LEVEL_INFO.json.meta
Normal file
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"ver": "1.0.2",
|
||||
"uuid": "2cddbdcb-5dba-4b13-960c-9ebe6d17a7db",
|
||||
"importer": "json",
|
||||
"subMetas": {}
|
||||
}
|
13
assets/resources/UI.meta
Normal file
13
assets/resources/UI.meta
Normal file
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
"ver": "1.1.3",
|
||||
"uuid": "07f848f0-b267-4197-ad13-369b4960e8fd",
|
||||
"importer": "folder",
|
||||
"isBundle": false,
|
||||
"bundleName": "",
|
||||
"priority": 1,
|
||||
"compressionType": {},
|
||||
"optimizeHotUpdate": {},
|
||||
"inlineSpriteFrames": {},
|
||||
"isRemoteBundle": {},
|
||||
"subMetas": {}
|
||||
}
|
506
assets/resources/UI/publicUI.plist
Normal file
506
assets/resources/UI/publicUI.plist
Normal file
|
@ -0,0 +1,506 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>frames</key>
|
||||
<dict>
|
||||
<key>daan.png</key>
|
||||
<dict>
|
||||
<key>aliases</key>
|
||||
<array/>
|
||||
<key>spriteOffset</key>
|
||||
<string>{0,1}</string>
|
||||
<key>spriteSize</key>
|
||||
<string>{46,74}</string>
|
||||
<key>spriteSourceSize</key>
|
||||
<string>{114,114}</string>
|
||||
<key>textureRect</key>
|
||||
<string>{{719,1285},{46,74}}</string>
|
||||
<key>textureRotated</key>
|
||||
<false/>
|
||||
</dict>
|
||||
<key>err.png</key>
|
||||
<dict>
|
||||
<key>aliases</key>
|
||||
<array/>
|
||||
<key>spriteOffset</key>
|
||||
<string>{0,0}</string>
|
||||
<key>spriteSize</key>
|
||||
<string>{57,49}</string>
|
||||
<key>spriteSourceSize</key>
|
||||
<string>{57,49}</string>
|
||||
<key>textureRect</key>
|
||||
<string>{{715,1361},{57,49}}</string>
|
||||
<key>textureRotated</key>
|
||||
<false/>
|
||||
</dict>
|
||||
<key>gezi.png</key>
|
||||
<dict>
|
||||
<key>aliases</key>
|
||||
<array/>
|
||||
<key>spriteOffset</key>
|
||||
<string>{0,0}</string>
|
||||
<key>spriteSize</key>
|
||||
<string>{682,682}</string>
|
||||
<key>spriteSourceSize</key>
|
||||
<string>{682,682}</string>
|
||||
<key>textureRect</key>
|
||||
<string>{{1,1},{682,682}}</string>
|
||||
<key>textureRotated</key>
|
||||
<false/>
|
||||
</dict>
|
||||
<key>kuang1.jpg</key>
|
||||
<dict>
|
||||
<key>aliases</key>
|
||||
<array/>
|
||||
<key>spriteOffset</key>
|
||||
<string>{0,0}</string>
|
||||
<key>spriteSize</key>
|
||||
<string>{114,114}</string>
|
||||
<key>spriteSourceSize</key>
|
||||
<string>{114,114}</string>
|
||||
<key>textureRect</key>
|
||||
<string>{{605,887},{114,114}}</string>
|
||||
<key>textureRotated</key>
|
||||
<false/>
|
||||
</dict>
|
||||
<key>kuang2.jpg</key>
|
||||
<dict>
|
||||
<key>aliases</key>
|
||||
<array/>
|
||||
<key>spriteOffset</key>
|
||||
<string>{0,0}</string>
|
||||
<key>spriteSize</key>
|
||||
<string>{114,114}</string>
|
||||
<key>spriteSourceSize</key>
|
||||
<string>{114,114}</string>
|
||||
<key>textureRect</key>
|
||||
<string>{{517,1303},{114,114}}</string>
|
||||
<key>textureRotated</key>
|
||||
<false/>
|
||||
</dict>
|
||||
<key>kuang3.jpg</key>
|
||||
<dict>
|
||||
<key>aliases</key>
|
||||
<array/>
|
||||
<key>spriteOffset</key>
|
||||
<string>{0,0}</string>
|
||||
<key>spriteSize</key>
|
||||
<string>{132,132}</string>
|
||||
<key>spriteSourceSize</key>
|
||||
<string>{132,132}</string>
|
||||
<key>textureRect</key>
|
||||
<string>{{605,753},{132,132}}</string>
|
||||
<key>textureRotated</key>
|
||||
<false/>
|
||||
</dict>
|
||||
<key>progress.png</key>
|
||||
<dict>
|
||||
<key>aliases</key>
|
||||
<array/>
|
||||
<key>spriteOffset</key>
|
||||
<string>{0,0}</string>
|
||||
<key>spriteSize</key>
|
||||
<string>{344,88}</string>
|
||||
<key>spriteSourceSize</key>
|
||||
<string>{344,88}</string>
|
||||
<key>textureRect</key>
|
||||
<string>{{515,685},{344,88}}</string>
|
||||
<key>textureRotated</key>
|
||||
<true/>
|
||||
</dict>
|
||||
<key>start.png</key>
|
||||
<dict>
|
||||
<key>aliases</key>
|
||||
<array/>
|
||||
<key>spriteOffset</key>
|
||||
<string>{0,0}</string>
|
||||
<key>spriteSize</key>
|
||||
<string>{270,72}</string>
|
||||
<key>spriteSourceSize</key>
|
||||
<string>{270,72}</string>
|
||||
<key>textureRect</key>
|
||||
<string>{{515,1031},{270,72}}</string>
|
||||
<key>textureRotated</key>
|
||||
<true/>
|
||||
</dict>
|
||||
<key>texture1.png</key>
|
||||
<dict>
|
||||
<key>aliases</key>
|
||||
<array/>
|
||||
<key>spriteOffset</key>
|
||||
<string>{0,1}</string>
|
||||
<key>spriteSize</key>
|
||||
<string>{64,86}</string>
|
||||
<key>spriteSourceSize</key>
|
||||
<string>{114,114}</string>
|
||||
<key>textureRect</key>
|
||||
<string>{{721,923},{64,86}}</string>
|
||||
<key>textureRotated</key>
|
||||
<true/>
|
||||
</dict>
|
||||
<key>texture10.png</key>
|
||||
<dict>
|
||||
<key>aliases</key>
|
||||
<array/>
|
||||
<key>spriteOffset</key>
|
||||
<string>{0,0}</string>
|
||||
<key>spriteSize</key>
|
||||
<string>{86,62}</string>
|
||||
<key>spriteSourceSize</key>
|
||||
<string>{114,114}</string>
|
||||
<key>textureRect</key>
|
||||
<string>{{671,1197},{86,62}}</string>
|
||||
<key>textureRotated</key>
|
||||
<true/>
|
||||
</dict>
|
||||
<key>texture11.png</key>
|
||||
<dict>
|
||||
<key>aliases</key>
|
||||
<array/>
|
||||
<key>spriteOffset</key>
|
||||
<string>{0,0}</string>
|
||||
<key>spriteSize</key>
|
||||
<string>{88,88}</string>
|
||||
<key>spriteSourceSize</key>
|
||||
<string>{114,114}</string>
|
||||
<key>textureRect</key>
|
||||
<string>{{589,1103},{88,88}}</string>
|
||||
<key>textureRotated</key>
|
||||
<false/>
|
||||
</dict>
|
||||
<key>texture12.png</key>
|
||||
<dict>
|
||||
<key>aliases</key>
|
||||
<array/>
|
||||
<key>spriteOffset</key>
|
||||
<string>{0,0}</string>
|
||||
<key>spriteSize</key>
|
||||
<string>{44,52}</string>
|
||||
<key>spriteSourceSize</key>
|
||||
<string>{114,114}</string>
|
||||
<key>textureRect</key>
|
||||
<string>{{767,1281},{44,52}}</string>
|
||||
<key>textureRotated</key>
|
||||
<false/>
|
||||
</dict>
|
||||
<key>texture13.png</key>
|
||||
<dict>
|
||||
<key>aliases</key>
|
||||
<array/>
|
||||
<key>spriteOffset</key>
|
||||
<string>{0,0}</string>
|
||||
<key>spriteSize</key>
|
||||
<string>{98,98}</string>
|
||||
<key>spriteSourceSize</key>
|
||||
<string>{114,114}</string>
|
||||
<key>textureRect</key>
|
||||
<string>{{605,1003},{98,98}}</string>
|
||||
<key>textureRotated</key>
|
||||
<false/>
|
||||
</dict>
|
||||
<key>texture14.png</key>
|
||||
<dict>
|
||||
<key>aliases</key>
|
||||
<array/>
|
||||
<key>spriteOffset</key>
|
||||
<string>{0,1}</string>
|
||||
<key>spriteSize</key>
|
||||
<string>{90,26}</string>
|
||||
<key>spriteSourceSize</key>
|
||||
<string>{114,114}</string>
|
||||
<key>textureRect</key>
|
||||
<string>{{733,1097},{90,26}}</string>
|
||||
<key>textureRotated</key>
|
||||
<true/>
|
||||
</dict>
|
||||
<key>texture18.png</key>
|
||||
<dict>
|
||||
<key>aliases</key>
|
||||
<array/>
|
||||
<key>spriteOffset</key>
|
||||
<string>{0,0}</string>
|
||||
<key>spriteSize</key>
|
||||
<string>{46,86}</string>
|
||||
<key>spriteSourceSize</key>
|
||||
<string>{114,114}</string>
|
||||
<key>textureRect</key>
|
||||
<string>{{751,989},{46,86}}</string>
|
||||
<key>textureRotated</key>
|
||||
<false/>
|
||||
</dict>
|
||||
<key>texture19.png</key>
|
||||
<dict>
|
||||
<key>aliases</key>
|
||||
<array/>
|
||||
<key>spriteOffset</key>
|
||||
<string>{0,1}</string>
|
||||
<key>spriteSize</key>
|
||||
<string>{80,70}</string>
|
||||
<key>spriteSourceSize</key>
|
||||
<string>{114,114}</string>
|
||||
<key>textureRect</key>
|
||||
<string>{{739,841},{80,70}}</string>
|
||||
<key>textureRotated</key>
|
||||
<true/>
|
||||
</dict>
|
||||
<key>texture2.png</key>
|
||||
<dict>
|
||||
<key>aliases</key>
|
||||
<array/>
|
||||
<key>spriteOffset</key>
|
||||
<string>{0,1}</string>
|
||||
<key>spriteSize</key>
|
||||
<string>{84,60}</string>
|
||||
<key>spriteSourceSize</key>
|
||||
<string>{114,114}</string>
|
||||
<key>textureRect</key>
|
||||
<string>{{633,1285},{84,60}}</string>
|
||||
<key>textureRotated</key>
|
||||
<false/>
|
||||
</dict>
|
||||
<key>texture20.png</key>
|
||||
<dict>
|
||||
<key>aliases</key>
|
||||
<array/>
|
||||
<key>spriteOffset</key>
|
||||
<string>{0,0}</string>
|
||||
<key>spriteSize</key>
|
||||
<string>{90,32}</string>
|
||||
<key>spriteSourceSize</key>
|
||||
<string>{114,114}</string>
|
||||
<key>textureRect</key>
|
||||
<string>{{735,1189},{90,32}}</string>
|
||||
<key>textureRotated</key>
|
||||
<true/>
|
||||
</dict>
|
||||
<key>texture3.png</key>
|
||||
<dict>
|
||||
<key>aliases</key>
|
||||
<array/>
|
||||
<key>spriteOffset</key>
|
||||
<string>{0,0}</string>
|
||||
<key>spriteSize</key>
|
||||
<string>{72,86}</string>
|
||||
<key>spriteSourceSize</key>
|
||||
<string>{114,114}</string>
|
||||
<key>textureRect</key>
|
||||
<string>{{739,753},{72,86}}</string>
|
||||
<key>textureRotated</key>
|
||||
<false/>
|
||||
</dict>
|
||||
<key>texture4.png</key>
|
||||
<dict>
|
||||
<key>aliases</key>
|
||||
<array/>
|
||||
<key>spriteOffset</key>
|
||||
<string>{-1,0}</string>
|
||||
<key>spriteSize</key>
|
||||
<string>{52,92}</string>
|
||||
<key>spriteSourceSize</key>
|
||||
<string>{114,114}</string>
|
||||
<key>textureRect</key>
|
||||
<string>{{679,1103},{52,92}}</string>
|
||||
<key>textureRotated</key>
|
||||
<false/>
|
||||
</dict>
|
||||
<key>texture5.png</key>
|
||||
<dict>
|
||||
<key>aliases</key>
|
||||
<array/>
|
||||
<key>spriteOffset</key>
|
||||
<string>{-1,1}</string>
|
||||
<key>spriteSize</key>
|
||||
<string>{36,88}</string>
|
||||
<key>spriteSourceSize</key>
|
||||
<string>{114,114}</string>
|
||||
<key>textureRect</key>
|
||||
<string>{{761,1077},{36,88}}</string>
|
||||
<key>textureRotated</key>
|
||||
<false/>
|
||||
</dict>
|
||||
<key>texture6.png</key>
|
||||
<dict>
|
||||
<key>aliases</key>
|
||||
<array/>
|
||||
<key>spriteOffset</key>
|
||||
<string>{0,0}</string>
|
||||
<key>spriteSize</key>
|
||||
<string>{90,80}</string>
|
||||
<key>spriteSourceSize</key>
|
||||
<string>{114,114}</string>
|
||||
<key>textureRect</key>
|
||||
<string>{{589,1193},{90,80}}</string>
|
||||
<key>textureRotated</key>
|
||||
<true/>
|
||||
</dict>
|
||||
<key>texture7.png</key>
|
||||
<dict>
|
||||
<key>aliases</key>
|
||||
<array/>
|
||||
<key>spriteOffset</key>
|
||||
<string>{0,1}</string>
|
||||
<key>spriteSize</key>
|
||||
<string>{92,44}</string>
|
||||
<key>spriteSourceSize</key>
|
||||
<string>{114,114}</string>
|
||||
<key>textureRect</key>
|
||||
<string>{{705,1003},{92,44}}</string>
|
||||
<key>textureRotated</key>
|
||||
<true/>
|
||||
</dict>
|
||||
<key>texture8.png</key>
|
||||
<dict>
|
||||
<key>aliases</key>
|
||||
<array/>
|
||||
<key>spriteOffset</key>
|
||||
<string>{0,0}</string>
|
||||
<key>spriteSize</key>
|
||||
<string>{72,84}</string>
|
||||
<key>spriteSourceSize</key>
|
||||
<string>{114,114}</string>
|
||||
<key>textureRect</key>
|
||||
<string>{{443,1347},{72,84}}</string>
|
||||
<key>textureRotated</key>
|
||||
<false/>
|
||||
</dict>
|
||||
<key>texture9.png</key>
|
||||
<dict>
|
||||
<key>aliases</key>
|
||||
<array/>
|
||||
<key>spriteOffset</key>
|
||||
<string>{0,0}</string>
|
||||
<key>spriteSize</key>
|
||||
<string>{58,80}</string>
|
||||
<key>spriteSourceSize</key>
|
||||
<string>{114,114}</string>
|
||||
<key>textureRect</key>
|
||||
<string>{{633,1347},{58,80}}</string>
|
||||
<key>textureRotated</key>
|
||||
<true/>
|
||||
</dict>
|
||||
<key>time_icon.png</key>
|
||||
<dict>
|
||||
<key>aliases</key>
|
||||
<array/>
|
||||
<key>spriteOffset</key>
|
||||
<string>{0,0}</string>
|
||||
<key>spriteSize</key>
|
||||
<string>{40,40}</string>
|
||||
<key>spriteSourceSize</key>
|
||||
<string>{40,40}</string>
|
||||
<key>textureRect</key>
|
||||
<string>{{769,1167},{40,40}}</string>
|
||||
<key>textureRotated</key>
|
||||
<false/>
|
||||
</dict>
|
||||
<key>tip.png</key>
|
||||
<dict>
|
||||
<key>aliases</key>
|
||||
<array/>
|
||||
<key>spriteOffset</key>
|
||||
<string>{0,0}</string>
|
||||
<key>spriteSize</key>
|
||||
<string>{660,70}</string>
|
||||
<key>spriteSourceSize</key>
|
||||
<string>{660,70}</string>
|
||||
<key>textureRect</key>
|
||||
<string>{{443,685},{660,70}}</string>
|
||||
<key>textureRotated</key>
|
||||
<true/>
|
||||
</dict>
|
||||
<key>tipBg.png</key>
|
||||
<dict>
|
||||
<key>aliases</key>
|
||||
<array/>
|
||||
<key>spriteOffset</key>
|
||||
<string>{0,0}</string>
|
||||
<key>spriteSize</key>
|
||||
<string>{728,440}</string>
|
||||
<key>spriteSourceSize</key>
|
||||
<string>{728,440}</string>
|
||||
<key>textureRect</key>
|
||||
<string>{{1,685},{728,440}}</string>
|
||||
<key>textureRotated</key>
|
||||
<true/>
|
||||
</dict>
|
||||
<key>top.png</key>
|
||||
<dict>
|
||||
<key>aliases</key>
|
||||
<array/>
|
||||
<key>spriteOffset</key>
|
||||
<string>{0,0}</string>
|
||||
<key>spriteSize</key>
|
||||
<string>{750,127}</string>
|
||||
<key>spriteSourceSize</key>
|
||||
<string>{750,127}</string>
|
||||
<key>textureRect</key>
|
||||
<string>{{685,1},{750,127}}</string>
|
||||
<key>textureRotated</key>
|
||||
<true/>
|
||||
</dict>
|
||||
<key>xingxing01.png</key>
|
||||
<dict>
|
||||
<key>aliases</key>
|
||||
<array/>
|
||||
<key>spriteOffset</key>
|
||||
<string>{0,0}</string>
|
||||
<key>spriteSize</key>
|
||||
<string>{30,30}</string>
|
||||
<key>spriteSourceSize</key>
|
||||
<string>{30,30}</string>
|
||||
<key>textureRect</key>
|
||||
<string>{{774,1335},{30,30}}</string>
|
||||
<key>textureRotated</key>
|
||||
<false/>
|
||||
</dict>
|
||||
<key>xingxing02.png</key>
|
||||
<dict>
|
||||
<key>aliases</key>
|
||||
<array/>
|
||||
<key>spriteOffset</key>
|
||||
<string>{0,0}</string>
|
||||
<key>spriteSize</key>
|
||||
<string>{40,40}</string>
|
||||
<key>spriteSourceSize</key>
|
||||
<string>{40,40}</string>
|
||||
<key>textureRect</key>
|
||||
<string>{{769,1209},{40,40}}</string>
|
||||
<key>textureRotated</key>
|
||||
<false/>
|
||||
</dict>
|
||||
<key>yes.png</key>
|
||||
<dict>
|
||||
<key>aliases</key>
|
||||
<array/>
|
||||
<key>spriteOffset</key>
|
||||
<string>{0,0}</string>
|
||||
<key>spriteSize</key>
|
||||
<string>{74,60}</string>
|
||||
<key>spriteSourceSize</key>
|
||||
<string>{74,60}</string>
|
||||
<key>textureRect</key>
|
||||
<string>{{605,685},{74,60}}</string>
|
||||
<key>textureRotated</key>
|
||||
<false/>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>metadata</key>
|
||||
<dict>
|
||||
<key>format</key>
|
||||
<integer>3</integer>
|
||||
<key>pixelFormat</key>
|
||||
<string>RGBA8888</string>
|
||||
<key>premultiplyAlpha</key>
|
||||
<false/>
|
||||
<key>realTextureFileName</key>
|
||||
<string>publicUI.png</string>
|
||||
<key>size</key>
|
||||
<string>{813,1432}</string>
|
||||
<key>smartupdate</key>
|
||||
<string>$TexturePacker:SmartUpdate:7b85d662ab58b0662809115178ad3ca0:f6ea1142336b736d5f607913cf61c88b:1c7d81f68058ada321959f2296017bb5$</string>
|
||||
<key>textureFileName</key>
|
||||
<string>publicUI.png</string>
|
||||
</dict>
|
||||
</dict>
|
||||
</plist>
|
749
assets/resources/UI/publicUI.plist.meta
Normal file
749
assets/resources/UI/publicUI.plist.meta
Normal file
|
@ -0,0 +1,749 @@
|
|||
{
|
||||
"ver": "1.2.6",
|
||||
"uuid": "e883b928-b637-44d9-af8d-b83e856a59f7",
|
||||
"importer": "asset",
|
||||
"rawTextureUuid": "d0a7ac2e-33a3-4be5-a30b-842c51bdc0c2",
|
||||
"size": {
|
||||
"width": 813,
|
||||
"height": 1432
|
||||
},
|
||||
"type": "Texture Packer",
|
||||
"subMetas": {
|
||||
"daan.png": {
|
||||
"ver": "1.0.6",
|
||||
"uuid": "48f0add1-7741-4b9a-b25e-186ad457e4ac",
|
||||
"importer": "sprite-frame",
|
||||
"rawTextureUuid": "d0a7ac2e-33a3-4be5-a30b-842c51bdc0c2",
|
||||
"trimType": "auto",
|
||||
"trimThreshold": 1,
|
||||
"rotated": false,
|
||||
"offsetX": 0,
|
||||
"offsetY": 1,
|
||||
"trimX": 719,
|
||||
"trimY": 1285,
|
||||
"width": 46,
|
||||
"height": 74,
|
||||
"rawWidth": 114,
|
||||
"rawHeight": 114,
|
||||
"borderTop": 0,
|
||||
"borderBottom": 0,
|
||||
"borderLeft": 0,
|
||||
"borderRight": 0,
|
||||
"spriteType": "normal",
|
||||
"subMetas": {}
|
||||
},
|
||||
"err.png": {
|
||||
"ver": "1.0.6",
|
||||
"uuid": "4dd594fe-a599-468b-a82e-4a36f5133ec1",
|
||||
"importer": "sprite-frame",
|
||||
"rawTextureUuid": "d0a7ac2e-33a3-4be5-a30b-842c51bdc0c2",
|
||||
"trimType": "auto",
|
||||
"trimThreshold": 1,
|
||||
"rotated": false,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"trimX": 715,
|
||||
"trimY": 1361,
|
||||
"width": 57,
|
||||
"height": 49,
|
||||
"rawWidth": 57,
|
||||
"rawHeight": 49,
|
||||
"borderTop": 0,
|
||||
"borderBottom": 0,
|
||||
"borderLeft": 0,
|
||||
"borderRight": 0,
|
||||
"spriteType": "normal",
|
||||
"subMetas": {}
|
||||
},
|
||||
"gezi.png": {
|
||||
"ver": "1.0.6",
|
||||
"uuid": "17af346d-cfbe-4ad2-b2d3-e469d3dcc1a8",
|
||||
"importer": "sprite-frame",
|
||||
"rawTextureUuid": "d0a7ac2e-33a3-4be5-a30b-842c51bdc0c2",
|
||||
"trimType": "auto",
|
||||
"trimThreshold": 1,
|
||||
"rotated": false,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"trimX": 1,
|
||||
"trimY": 1,
|
||||
"width": 682,
|
||||
"height": 682,
|
||||
"rawWidth": 682,
|
||||
"rawHeight": 682,
|
||||
"borderTop": 0,
|
||||
"borderBottom": 0,
|
||||
"borderLeft": 0,
|
||||
"borderRight": 0,
|
||||
"spriteType": "normal",
|
||||
"subMetas": {}
|
||||
},
|
||||
"kuang1.jpg": {
|
||||
"ver": "1.0.6",
|
||||
"uuid": "fa0cfe73-8bf5-45e4-a2fd-e6edd6a92f69",
|
||||
"importer": "sprite-frame",
|
||||
"rawTextureUuid": "d0a7ac2e-33a3-4be5-a30b-842c51bdc0c2",
|
||||
"trimType": "auto",
|
||||
"trimThreshold": 1,
|
||||
"rotated": false,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"trimX": 605,
|
||||
"trimY": 887,
|
||||
"width": 114,
|
||||
"height": 114,
|
||||
"rawWidth": 114,
|
||||
"rawHeight": 114,
|
||||
"borderTop": 0,
|
||||
"borderBottom": 0,
|
||||
"borderLeft": 0,
|
||||
"borderRight": 0,
|
||||
"spriteType": "normal",
|
||||
"subMetas": {}
|
||||
},
|
||||
"kuang2.jpg": {
|
||||
"ver": "1.0.6",
|
||||
"uuid": "2eb8b301-8d35-4fbd-9828-dd913d7ce29b",
|
||||
"importer": "sprite-frame",
|
||||
"rawTextureUuid": "d0a7ac2e-33a3-4be5-a30b-842c51bdc0c2",
|
||||
"trimType": "auto",
|
||||
"trimThreshold": 1,
|
||||
"rotated": false,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"trimX": 517,
|
||||
"trimY": 1303,
|
||||
"width": 114,
|
||||
"height": 114,
|
||||
"rawWidth": 114,
|
||||
"rawHeight": 114,
|
||||
"borderTop": 0,
|
||||
"borderBottom": 0,
|
||||
"borderLeft": 0,
|
||||
"borderRight": 0,
|
||||
"spriteType": "normal",
|
||||
"subMetas": {}
|
||||
},
|
||||
"kuang3.jpg": {
|
||||
"ver": "1.0.6",
|
||||
"uuid": "dbd5f874-ad43-4e46-be45-1bf69f991c8b",
|
||||
"importer": "sprite-frame",
|
||||
"rawTextureUuid": "d0a7ac2e-33a3-4be5-a30b-842c51bdc0c2",
|
||||
"trimType": "auto",
|
||||
"trimThreshold": 1,
|
||||
"rotated": false,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"trimX": 605,
|
||||
"trimY": 753,
|
||||
"width": 132,
|
||||
"height": 132,
|
||||
"rawWidth": 132,
|
||||
"rawHeight": 132,
|
||||
"borderTop": 0,
|
||||
"borderBottom": 0,
|
||||
"borderLeft": 0,
|
||||
"borderRight": 0,
|
||||
"spriteType": "normal",
|
||||
"subMetas": {}
|
||||
},
|
||||
"progress.png": {
|
||||
"ver": "1.0.6",
|
||||
"uuid": "da411ff5-9431-4eec-8943-b2e786a28415",
|
||||
"importer": "sprite-frame",
|
||||
"rawTextureUuid": "d0a7ac2e-33a3-4be5-a30b-842c51bdc0c2",
|
||||
"trimType": "auto",
|
||||
"trimThreshold": 1,
|
||||
"rotated": true,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"trimX": 515,
|
||||
"trimY": 685,
|
||||
"width": 344,
|
||||
"height": 88,
|
||||
"rawWidth": 344,
|
||||
"rawHeight": 88,
|
||||
"borderTop": 0,
|
||||
"borderBottom": 0,
|
||||
"borderLeft": 0,
|
||||
"borderRight": 0,
|
||||
"spriteType": "normal",
|
||||
"subMetas": {}
|
||||
},
|
||||
"start.png": {
|
||||
"ver": "1.0.6",
|
||||
"uuid": "d95bdbfb-bf4f-4a2a-8063-86225e9583e9",
|
||||
"importer": "sprite-frame",
|
||||
"rawTextureUuid": "d0a7ac2e-33a3-4be5-a30b-842c51bdc0c2",
|
||||
"trimType": "auto",
|
||||
"trimThreshold": 1,
|
||||
"rotated": true,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"trimX": 515,
|
||||
"trimY": 1031,
|
||||
"width": 270,
|
||||
"height": 72,
|
||||
"rawWidth": 270,
|
||||
"rawHeight": 72,
|
||||
"borderTop": 0,
|
||||
"borderBottom": 0,
|
||||
"borderLeft": 0,
|
||||
"borderRight": 0,
|
||||
"spriteType": "normal",
|
||||
"subMetas": {}
|
||||
},
|
||||
"texture1.png": {
|
||||
"ver": "1.0.6",
|
||||
"uuid": "ca79d87e-f6f3-4659-97fe-e43a65fec29c",
|
||||
"importer": "sprite-frame",
|
||||
"rawTextureUuid": "d0a7ac2e-33a3-4be5-a30b-842c51bdc0c2",
|
||||
"trimType": "auto",
|
||||
"trimThreshold": 1,
|
||||
"rotated": true,
|
||||
"offsetX": 0,
|
||||
"offsetY": 1,
|
||||
"trimX": 721,
|
||||
"trimY": 923,
|
||||
"width": 64,
|
||||
"height": 86,
|
||||
"rawWidth": 114,
|
||||
"rawHeight": 114,
|
||||
"borderTop": 0,
|
||||
"borderBottom": 0,
|
||||
"borderLeft": 0,
|
||||
"borderRight": 0,
|
||||
"spriteType": "normal",
|
||||
"subMetas": {}
|
||||
},
|
||||
"texture10.png": {
|
||||
"ver": "1.0.6",
|
||||
"uuid": "4660cc1d-1e61-43fe-89e0-40e0323c1096",
|
||||
"importer": "sprite-frame",
|
||||
"rawTextureUuid": "d0a7ac2e-33a3-4be5-a30b-842c51bdc0c2",
|
||||
"trimType": "auto",
|
||||
"trimThreshold": 1,
|
||||
"rotated": true,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"trimX": 671,
|
||||
"trimY": 1197,
|
||||
"width": 86,
|
||||
"height": 62,
|
||||
"rawWidth": 114,
|
||||
"rawHeight": 114,
|
||||
"borderTop": 0,
|
||||
"borderBottom": 0,
|
||||
"borderLeft": 0,
|
||||
"borderRight": 0,
|
||||
"spriteType": "normal",
|
||||
"subMetas": {}
|
||||
},
|
||||
"texture11.png": {
|
||||
"ver": "1.0.6",
|
||||
"uuid": "39ad0953-ab6b-4eb7-abaa-aaaf656e7582",
|
||||
"importer": "sprite-frame",
|
||||
"rawTextureUuid": "d0a7ac2e-33a3-4be5-a30b-842c51bdc0c2",
|
||||
"trimType": "auto",
|
||||
"trimThreshold": 1,
|
||||
"rotated": false,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"trimX": 589,
|
||||
"trimY": 1103,
|
||||
"width": 88,
|
||||
"height": 88,
|
||||
"rawWidth": 114,
|
||||
"rawHeight": 114,
|
||||
"borderTop": 0,
|
||||
"borderBottom": 0,
|
||||
"borderLeft": 0,
|
||||
"borderRight": 0,
|
||||
"spriteType": "normal",
|
||||
"subMetas": {}
|
||||
},
|
||||
"texture12.png": {
|
||||
"ver": "1.0.6",
|
||||
"uuid": "018d5411-05b3-492b-821b-ba3edf7060f7",
|
||||
"importer": "sprite-frame",
|
||||
"rawTextureUuid": "d0a7ac2e-33a3-4be5-a30b-842c51bdc0c2",
|
||||
"trimType": "auto",
|
||||
"trimThreshold": 1,
|
||||
"rotated": false,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"trimX": 767,
|
||||
"trimY": 1281,
|
||||
"width": 44,
|
||||
"height": 52,
|
||||
"rawWidth": 114,
|
||||
"rawHeight": 114,
|
||||
"borderTop": 0,
|
||||
"borderBottom": 0,
|
||||
"borderLeft": 0,
|
||||
"borderRight": 0,
|
||||
"spriteType": "normal",
|
||||
"subMetas": {}
|
||||
},
|
||||
"texture13.png": {
|
||||
"ver": "1.0.6",
|
||||
"uuid": "ceccf45d-0116-4337-8d8d-412fb1ad3c82",
|
||||
"importer": "sprite-frame",
|
||||
"rawTextureUuid": "d0a7ac2e-33a3-4be5-a30b-842c51bdc0c2",
|
||||
"trimType": "auto",
|
||||
"trimThreshold": 1,
|
||||
"rotated": false,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"trimX": 605,
|
||||
"trimY": 1003,
|
||||
"width": 98,
|
||||
"height": 98,
|
||||
"rawWidth": 114,
|
||||
"rawHeight": 114,
|
||||
"borderTop": 0,
|
||||
"borderBottom": 0,
|
||||
"borderLeft": 0,
|
||||
"borderRight": 0,
|
||||
"spriteType": "normal",
|
||||
"subMetas": {}
|
||||
},
|
||||
"texture14.png": {
|
||||
"ver": "1.0.6",
|
||||
"uuid": "759e19f2-e8f6-4dcd-87af-a85388ae698e",
|
||||
"importer": "sprite-frame",
|
||||
"rawTextureUuid": "d0a7ac2e-33a3-4be5-a30b-842c51bdc0c2",
|
||||
"trimType": "auto",
|
||||
"trimThreshold": 1,
|
||||
"rotated": true,
|
||||
"offsetX": 0,
|
||||
"offsetY": 1,
|
||||
"trimX": 733,
|
||||
"trimY": 1097,
|
||||
"width": 90,
|
||||
"height": 26,
|
||||
"rawWidth": 114,
|
||||
"rawHeight": 114,
|
||||
"borderTop": 0,
|
||||
"borderBottom": 0,
|
||||
"borderLeft": 0,
|
||||
"borderRight": 0,
|
||||
"spriteType": "normal",
|
||||
"subMetas": {}
|
||||
},
|
||||
"texture18.png": {
|
||||
"ver": "1.0.6",
|
||||
"uuid": "3ed7577b-2b8a-450f-8e76-2251304b2916",
|
||||
"importer": "sprite-frame",
|
||||
"rawTextureUuid": "d0a7ac2e-33a3-4be5-a30b-842c51bdc0c2",
|
||||
"trimType": "auto",
|
||||
"trimThreshold": 1,
|
||||
"rotated": false,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"trimX": 751,
|
||||
"trimY": 989,
|
||||
"width": 46,
|
||||
"height": 86,
|
||||
"rawWidth": 114,
|
||||
"rawHeight": 114,
|
||||
"borderTop": 0,
|
||||
"borderBottom": 0,
|
||||
"borderLeft": 0,
|
||||
"borderRight": 0,
|
||||
"spriteType": "normal",
|
||||
"subMetas": {}
|
||||
},
|
||||
"texture19.png": {
|
||||
"ver": "1.0.6",
|
||||
"uuid": "43dea732-290b-4a7e-9d64-70a5f9812381",
|
||||
"importer": "sprite-frame",
|
||||
"rawTextureUuid": "d0a7ac2e-33a3-4be5-a30b-842c51bdc0c2",
|
||||
"trimType": "auto",
|
||||
"trimThreshold": 1,
|
||||
"rotated": true,
|
||||
"offsetX": 0,
|
||||
"offsetY": 1,
|
||||
"trimX": 739,
|
||||
"trimY": 841,
|
||||
"width": 80,
|
||||
"height": 70,
|
||||
"rawWidth": 114,
|
||||
"rawHeight": 114,
|
||||
"borderTop": 0,
|
||||
"borderBottom": 0,
|
||||
"borderLeft": 0,
|
||||
"borderRight": 0,
|
||||
"spriteType": "normal",
|
||||
"subMetas": {}
|
||||
},
|
||||
"texture2.png": {
|
||||
"ver": "1.0.6",
|
||||
"uuid": "2b0b3da4-9df3-4131-9317-1ca35bbd4d64",
|
||||
"importer": "sprite-frame",
|
||||
"rawTextureUuid": "d0a7ac2e-33a3-4be5-a30b-842c51bdc0c2",
|
||||
"trimType": "auto",
|
||||
"trimThreshold": 1,
|
||||
"rotated": false,
|
||||
"offsetX": 0,
|
||||
"offsetY": 1,
|
||||
"trimX": 633,
|
||||
"trimY": 1285,
|
||||
"width": 84,
|
||||
"height": 60,
|
||||
"rawWidth": 114,
|
||||
"rawHeight": 114,
|
||||
"borderTop": 0,
|
||||
"borderBottom": 0,
|
||||
"borderLeft": 0,
|
||||
"borderRight": 0,
|
||||
"spriteType": "normal",
|
||||
"subMetas": {}
|
||||
},
|
||||
"texture20.png": {
|
||||
"ver": "1.0.6",
|
||||
"uuid": "f3d1de85-86c8-49b8-a555-7fed576930c6",
|
||||
"importer": "sprite-frame",
|
||||
"rawTextureUuid": "d0a7ac2e-33a3-4be5-a30b-842c51bdc0c2",
|
||||
"trimType": "auto",
|
||||
"trimThreshold": 1,
|
||||
"rotated": true,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"trimX": 735,
|
||||
"trimY": 1189,
|
||||
"width": 90,
|
||||
"height": 32,
|
||||
"rawWidth": 114,
|
||||
"rawHeight": 114,
|
||||
"borderTop": 0,
|
||||
"borderBottom": 0,
|
||||
"borderLeft": 0,
|
||||
"borderRight": 0,
|
||||
"spriteType": "normal",
|
||||
"subMetas": {}
|
||||
},
|
||||
"texture3.png": {
|
||||
"ver": "1.0.6",
|
||||
"uuid": "efd308fc-f5b3-4bb7-9f63-775758313496",
|
||||
"importer": "sprite-frame",
|
||||
"rawTextureUuid": "d0a7ac2e-33a3-4be5-a30b-842c51bdc0c2",
|
||||
"trimType": "auto",
|
||||
"trimThreshold": 1,
|
||||
"rotated": false,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"trimX": 739,
|
||||
"trimY": 753,
|
||||
"width": 72,
|
||||
"height": 86,
|
||||
"rawWidth": 114,
|
||||
"rawHeight": 114,
|
||||
"borderTop": 0,
|
||||
"borderBottom": 0,
|
||||
"borderLeft": 0,
|
||||
"borderRight": 0,
|
||||
"spriteType": "normal",
|
||||
"subMetas": {}
|
||||
},
|
||||
"texture4.png": {
|
||||
"ver": "1.0.6",
|
||||
"uuid": "4218b31d-564a-49f9-b83a-2b4192387ed9",
|
||||
"importer": "sprite-frame",
|
||||
"rawTextureUuid": "d0a7ac2e-33a3-4be5-a30b-842c51bdc0c2",
|
||||
"trimType": "auto",
|
||||
"trimThreshold": 1,
|
||||
"rotated": false,
|
||||
"offsetX": -1,
|
||||
"offsetY": 0,
|
||||
"trimX": 679,
|
||||
"trimY": 1103,
|
||||
"width": 52,
|
||||
"height": 92,
|
||||
"rawWidth": 114,
|
||||
"rawHeight": 114,
|
||||
"borderTop": 0,
|
||||
"borderBottom": 0,
|
||||
"borderLeft": 0,
|
||||
"borderRight": 0,
|
||||
"spriteType": "normal",
|
||||
"subMetas": {}
|
||||
},
|
||||
"texture5.png": {
|
||||
"ver": "1.0.6",
|
||||
"uuid": "8521a571-ee5b-4fbf-9ad2-7b39af586606",
|
||||
"importer": "sprite-frame",
|
||||
"rawTextureUuid": "d0a7ac2e-33a3-4be5-a30b-842c51bdc0c2",
|
||||
"trimType": "auto",
|
||||
"trimThreshold": 1,
|
||||
"rotated": false,
|
||||
"offsetX": -1,
|
||||
"offsetY": 1,
|
||||
"trimX": 761,
|
||||
"trimY": 1077,
|
||||
"width": 36,
|
||||
"height": 88,
|
||||
"rawWidth": 114,
|
||||
"rawHeight": 114,
|
||||
"borderTop": 0,
|
||||
"borderBottom": 0,
|
||||
"borderLeft": 0,
|
||||
"borderRight": 0,
|
||||
"spriteType": "normal",
|
||||
"subMetas": {}
|
||||
},
|
||||
"texture6.png": {
|
||||
"ver": "1.0.6",
|
||||
"uuid": "75ce7d0b-eaf0-4929-90cf-d6b7c1bf8f6b",
|
||||
"importer": "sprite-frame",
|
||||
"rawTextureUuid": "d0a7ac2e-33a3-4be5-a30b-842c51bdc0c2",
|
||||
"trimType": "auto",
|
||||
"trimThreshold": 1,
|
||||
"rotated": true,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"trimX": 589,
|
||||
"trimY": 1193,
|
||||
"width": 90,
|
||||
"height": 80,
|
||||
"rawWidth": 114,
|
||||
"rawHeight": 114,
|
||||
"borderTop": 0,
|
||||
"borderBottom": 0,
|
||||
"borderLeft": 0,
|
||||
"borderRight": 0,
|
||||
"spriteType": "normal",
|
||||
"subMetas": {}
|
||||
},
|
||||
"texture7.png": {
|
||||
"ver": "1.0.6",
|
||||
"uuid": "4648a734-e59a-4d14-a07b-ce9ca5d5c62b",
|
||||
"importer": "sprite-frame",
|
||||
"rawTextureUuid": "d0a7ac2e-33a3-4be5-a30b-842c51bdc0c2",
|
||||
"trimType": "auto",
|
||||
"trimThreshold": 1,
|
||||
"rotated": true,
|
||||
"offsetX": 0,
|
||||
"offsetY": 1,
|
||||
"trimX": 705,
|
||||
"trimY": 1003,
|
||||
"width": 92,
|
||||
"height": 44,
|
||||
"rawWidth": 114,
|
||||
"rawHeight": 114,
|
||||
"borderTop": 0,
|
||||
"borderBottom": 0,
|
||||
"borderLeft": 0,
|
||||
"borderRight": 0,
|
||||
"spriteType": "normal",
|
||||
"subMetas": {}
|
||||
},
|
||||
"texture8.png": {
|
||||
"ver": "1.0.6",
|
||||
"uuid": "c88956df-63f6-4e7a-bf8b-54d5eeb0baa5",
|
||||
"importer": "sprite-frame",
|
||||
"rawTextureUuid": "d0a7ac2e-33a3-4be5-a30b-842c51bdc0c2",
|
||||
"trimType": "auto",
|
||||
"trimThreshold": 1,
|
||||
"rotated": false,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"trimX": 443,
|
||||
"trimY": 1347,
|
||||
"width": 72,
|
||||
"height": 84,
|
||||
"rawWidth": 114,
|
||||
"rawHeight": 114,
|
||||
"borderTop": 0,
|
||||
"borderBottom": 0,
|
||||
"borderLeft": 0,
|
||||
"borderRight": 0,
|
||||
"spriteType": "normal",
|
||||
"subMetas": {}
|
||||
},
|
||||
"texture9.png": {
|
||||
"ver": "1.0.6",
|
||||
"uuid": "f3bd36fb-2048-4444-9c18-217ee62b977a",
|
||||
"importer": "sprite-frame",
|
||||
"rawTextureUuid": "d0a7ac2e-33a3-4be5-a30b-842c51bdc0c2",
|
||||
"trimType": "auto",
|
||||
"trimThreshold": 1,
|
||||
"rotated": true,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"trimX": 633,
|
||||
"trimY": 1347,
|
||||
"width": 58,
|
||||
"height": 80,
|
||||
"rawWidth": 114,
|
||||
"rawHeight": 114,
|
||||
"borderTop": 0,
|
||||
"borderBottom": 0,
|
||||
"borderLeft": 0,
|
||||
"borderRight": 0,
|
||||
"spriteType": "normal",
|
||||
"subMetas": {}
|
||||
},
|
||||
"time_icon.png": {
|
||||
"ver": "1.0.6",
|
||||
"uuid": "5f924dc2-df92-448a-8b30-f4d0cbaae29c",
|
||||
"importer": "sprite-frame",
|
||||
"rawTextureUuid": "d0a7ac2e-33a3-4be5-a30b-842c51bdc0c2",
|
||||
"trimType": "auto",
|
||||
"trimThreshold": 1,
|
||||
"rotated": false,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"trimX": 769,
|
||||
"trimY": 1167,
|
||||
"width": 40,
|
||||
"height": 40,
|
||||
"rawWidth": 40,
|
||||
"rawHeight": 40,
|
||||
"borderTop": 0,
|
||||
"borderBottom": 0,
|
||||
"borderLeft": 0,
|
||||
"borderRight": 0,
|
||||
"spriteType": "normal",
|
||||
"subMetas": {}
|
||||
},
|
||||
"tip.png": {
|
||||
"ver": "1.0.6",
|
||||
"uuid": "c05702e6-5198-4968-b28e-8c2e26a9ba5b",
|
||||
"importer": "sprite-frame",
|
||||
"rawTextureUuid": "d0a7ac2e-33a3-4be5-a30b-842c51bdc0c2",
|
||||
"trimType": "auto",
|
||||
"trimThreshold": 1,
|
||||
"rotated": true,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"trimX": 443,
|
||||
"trimY": 685,
|
||||
"width": 660,
|
||||
"height": 70,
|
||||
"rawWidth": 660,
|
||||
"rawHeight": 70,
|
||||
"borderTop": 0,
|
||||
"borderBottom": 0,
|
||||
"borderLeft": 0,
|
||||
"borderRight": 0,
|
||||
"spriteType": "normal",
|
||||
"subMetas": {}
|
||||
},
|
||||
"tipBg.png": {
|
||||
"ver": "1.0.6",
|
||||
"uuid": "fcbb8992-3ccc-4495-a18b-7d436796a992",
|
||||
"importer": "sprite-frame",
|
||||
"rawTextureUuid": "d0a7ac2e-33a3-4be5-a30b-842c51bdc0c2",
|
||||
"trimType": "auto",
|
||||
"trimThreshold": 1,
|
||||
"rotated": true,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"trimX": 1,
|
||||
"trimY": 685,
|
||||
"width": 728,
|
||||
"height": 440,
|
||||
"rawWidth": 728,
|
||||
"rawHeight": 440,
|
||||
"borderTop": 0,
|
||||
"borderBottom": 0,
|
||||
"borderLeft": 0,
|
||||
"borderRight": 0,
|
||||
"spriteType": "normal",
|
||||
"subMetas": {}
|
||||
},
|
||||
"top.png": {
|
||||
"ver": "1.0.6",
|
||||
"uuid": "4c7c1f0b-ebe7-4025-8148-ac61cb2a2d8f",
|
||||
"importer": "sprite-frame",
|
||||
"rawTextureUuid": "d0a7ac2e-33a3-4be5-a30b-842c51bdc0c2",
|
||||
"trimType": "auto",
|
||||
"trimThreshold": 1,
|
||||
"rotated": true,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"trimX": 685,
|
||||
"trimY": 1,
|
||||
"width": 750,
|
||||
"height": 127,
|
||||
"rawWidth": 750,
|
||||
"rawHeight": 127,
|
||||
"borderTop": 0,
|
||||
"borderBottom": 0,
|
||||
"borderLeft": 0,
|
||||
"borderRight": 0,
|
||||
"spriteType": "normal",
|
||||
"subMetas": {}
|
||||
},
|
||||
"xingxing01.png": {
|
||||
"ver": "1.0.6",
|
||||
"uuid": "8425f40b-c669-446a-ab0b-2daf892ef5c2",
|
||||
"importer": "sprite-frame",
|
||||
"rawTextureUuid": "d0a7ac2e-33a3-4be5-a30b-842c51bdc0c2",
|
||||
"trimType": "auto",
|
||||
"trimThreshold": 1,
|
||||
"rotated": false,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"trimX": 774,
|
||||
"trimY": 1335,
|
||||
"width": 30,
|
||||
"height": 30,
|
||||
"rawWidth": 30,
|
||||
"rawHeight": 30,
|
||||
"borderTop": 0,
|
||||
"borderBottom": 0,
|
||||
"borderLeft": 0,
|
||||
"borderRight": 0,
|
||||
"spriteType": "normal",
|
||||
"subMetas": {}
|
||||
},
|
||||
"xingxing02.png": {
|
||||
"ver": "1.0.6",
|
||||
"uuid": "573ba0d9-5a87-4a1f-847f-bcc5e5dc81dc",
|
||||
"importer": "sprite-frame",
|
||||
"rawTextureUuid": "d0a7ac2e-33a3-4be5-a30b-842c51bdc0c2",
|
||||
"trimType": "auto",
|
||||
"trimThreshold": 1,
|
||||
"rotated": false,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"trimX": 769,
|
||||
"trimY": 1209,
|
||||
"width": 40,
|
||||
"height": 40,
|
||||
"rawWidth": 40,
|
||||
"rawHeight": 40,
|
||||
"borderTop": 0,
|
||||
"borderBottom": 0,
|
||||
"borderLeft": 0,
|
||||
"borderRight": 0,
|
||||
"spriteType": "normal",
|
||||
"subMetas": {}
|
||||
},
|
||||
"yes.png": {
|
||||
"ver": "1.0.6",
|
||||
"uuid": "907b33f0-998c-44e2-b2a3-697e56dc3ebb",
|
||||
"importer": "sprite-frame",
|
||||
"rawTextureUuid": "d0a7ac2e-33a3-4be5-a30b-842c51bdc0c2",
|
||||
"trimType": "auto",
|
||||
"trimThreshold": 1,
|
||||
"rotated": false,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"trimX": 605,
|
||||
"trimY": 685,
|
||||
"width": 74,
|
||||
"height": 60,
|
||||
"rawWidth": 74,
|
||||
"rawHeight": 60,
|
||||
"borderTop": 0,
|
||||
"borderBottom": 0,
|
||||
"borderLeft": 0,
|
||||
"borderRight": 0,
|
||||
"spriteType": "normal",
|
||||
"subMetas": {}
|
||||
}
|
||||
}
|
||||
}
|
BIN
assets/resources/UI/publicUI.png
Normal file
BIN
assets/resources/UI/publicUI.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 549 KiB |
15
assets/resources/UI/publicUI.png.meta
Normal file
15
assets/resources/UI/publicUI.png.meta
Normal file
|
@ -0,0 +1,15 @@
|
|||
{
|
||||
"ver": "2.3.7",
|
||||
"uuid": "d0a7ac2e-33a3-4be5-a30b-842c51bdc0c2",
|
||||
"importer": "texture",
|
||||
"type": "raw",
|
||||
"wrapMode": "clamp",
|
||||
"filterMode": "bilinear",
|
||||
"premultiplyAlpha": false,
|
||||
"genMipmaps": false,
|
||||
"packable": true,
|
||||
"width": 918,
|
||||
"height": 885,
|
||||
"platformSettings": {},
|
||||
"subMetas": {}
|
||||
}
|
13
assets/resources/bg.meta
Normal file
13
assets/resources/bg.meta
Normal file
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
"ver": "1.1.3",
|
||||
"uuid": "6e3288a4-3bdb-4608-84ec-c0975b506d86",
|
||||
"importer": "folder",
|
||||
"isBundle": false,
|
||||
"bundleName": "",
|
||||
"priority": 1,
|
||||
"compressionType": {},
|
||||
"optimizeHotUpdate": {},
|
||||
"inlineSpriteFrames": {},
|
||||
"isRemoteBundle": {},
|
||||
"subMetas": {}
|
||||
}
|
BIN
assets/resources/bg/bg.jpg
Normal file
BIN
assets/resources/bg/bg.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 49 KiB |
38
assets/resources/bg/bg.jpg.meta
Normal file
38
assets/resources/bg/bg.jpg.meta
Normal file
|
@ -0,0 +1,38 @@
|
|||
{
|
||||
"ver": "2.3.7",
|
||||
"uuid": "70f7f908-1e8d-428d-8838-b74f3929a189",
|
||||
"importer": "texture",
|
||||
"type": "sprite",
|
||||
"wrapMode": "clamp",
|
||||
"filterMode": "bilinear",
|
||||
"premultiplyAlpha": false,
|
||||
"genMipmaps": false,
|
||||
"packable": true,
|
||||
"width": 750,
|
||||
"height": 1660,
|
||||
"platformSettings": {},
|
||||
"subMetas": {
|
||||
"bg": {
|
||||
"ver": "1.0.6",
|
||||
"uuid": "36b6bacf-2b42-4105-b5ae-89638029e07b",
|
||||
"importer": "sprite-frame",
|
||||
"rawTextureUuid": "70f7f908-1e8d-428d-8838-b74f3929a189",
|
||||
"trimType": "auto",
|
||||
"trimThreshold": 1,
|
||||
"rotated": false,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"trimX": 0,
|
||||
"trimY": 0,
|
||||
"width": 750,
|
||||
"height": 1660,
|
||||
"rawWidth": 750,
|
||||
"rawHeight": 1660,
|
||||
"borderTop": 0,
|
||||
"borderBottom": 0,
|
||||
"borderLeft": 0,
|
||||
"borderRight": 0,
|
||||
"subMetas": {}
|
||||
}
|
||||
}
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user