This commit is contained in:
pan
2024-08-16 10:36:45 +08:00
parent dc12cea962
commit 5e4d16d6e7
19 changed files with 4425 additions and 3222 deletions

View File

@@ -10,47 +10,40 @@ export const CardType = {
}
export const CardList={
1:[1001,1002,1003,1004,1005,1006],
2:[1011,1021,1031,1041,2021,2022,2031,2032],
3:[1011,1021,1031,1041,2021,2022,2031,2032],
4:[1011,1021,1031,1041,2021,2022,2031,2032],
5:[1011,1021,1031,1041,2021,2022,2031,2032],
6:[1011,1021,1031,1041,2021,2022,2031,2032],
2:[1001,1002,1003,1004,1005,1006],
3:[1001,1002,1003,1004,1005,1006],
4:[1001,1002,1003,1004,1005,1006],
5:[1001,1002,1003,1004,1005,1006],
6:[1001,1002,1003,1004,1005,1006],
}
export const CardSet = {
1001:{
uuid:1001, name:'叽叽', type:1, level:1,prefab_path:1001,atk:1,atk_cd:0.5, hp:15, power:45, speed:80,
uuid:1001, name:'叽叽', type:1, level:1,path:1001,atk:1,atk_cd:0.5, hp:15, power:45, speed:80,
skill:{ }
},
1002:{
uuid:1002, name:'汪汪', type:1, level:1,prefab_path:1002,atk:2,atk_cd:1, hp:15, power:50, speed:50,
uuid:1002, name:'汪汪', type:1, level:1,path:1002,atk:2,atk_cd:1, hp:15, power:50, speed:50,
skill:{ }
},
1003:{
uuid:1003, name:'喵喵', type:1, level:1,prefab_path:1003,atk:1, atk_cd:0.5, hp:20, power:50, speed:50,
uuid:1003, name:'喵喵', type:1, level:1,path:1003,atk:1, atk_cd:0.5, hp:20, power:50, speed:50,
skill:{ }
},
1004:{
uuid:1004, name:'胖大', type:2, level:1,prefab_path:1004,atk:4,atk_cd:1.5, hp:15, power:50, speed:50,
uuid:1004, name:'胖大', type:2, level:1,path:1004,atk:4,atk_cd:1.5, hp:15, power:50, speed:50,
skill:{ }
},
1005:{
uuid:1005, name:'汪汪[强]', type:1, level:2,prefab_path:1005,atk:6,atk_cd:1, hp:25, power:50, speed:50,
uuid:1005, name:'汪汪[强]', type:1, level:2,path:1005,atk:6,atk_cd:1, hp:25, power:50, speed:50,
skill:{ }
},
1006:{
uuid:1006, name:'沃夫', type:1, level:2,prefab_path:1006,atk:6,atk_cd:1, hp:30, power:50, speed:50,
skill:{ }
},
2031:{
uuid:2031, name:'泰哥', type:1, level:2,prefab_path:2031,atk:4,atk_cd:0.5, hp:25, power:50, speed:50,
skill:{ }
},
2032:{
uuid:2032, name:'喵喵[厚]', type:1, level:2,prefab_path:2032,atk:2.5,atk_cd:0.5, hp:40, power:50, speed:50,
uuid:1006, name:'沃夫', type:1, level:2,path:1006,atk:6,atk_cd:1, hp:30, power:50, speed:50,
skill:{ }
},

View File

@@ -1,58 +0,0 @@
/*
* @Author: dgflash
* @Date: 2022-07-21 17:30:59
* @LastEditors: dgflash
* @LastEditTime: 2022-09-02 14:40:28
*/
import { Node } from "cc";
/** 物理分组数据 */
export class GroupItem {
private _value: number;
/** 分组值 */
get value(): number {
return this._value;
}
private _name!: string;
/** 分组名 */
get name(): string {
return this._name;
}
/** 碰撞掩码 */
get mask(): number {
return 1 << this._value;
}
/**
* 构造函数
* @param value 分组值
* @param name 分组名
*/
constructor(value: number, name: string) {
this._value = value;
this._name = name;
}
}
/***
* 为了方便使用,将编辑器中的物理分组定义到代码。如果编辑器中有修改,确保同步到这里。
*/
export class PhysicsUtil {
/** 默认物理分组 */
static DEFAULT = new GroupItem(0, 'DEFAULT');
/** 能通过屏幕触摸中发出的射线检查到的游戏对象 */
static MONSTER = new GroupItem(2, 'MONSTER');
static HERO = new GroupItem(4, 'HERO');
static MONSTER_SKILL = new GroupItem(8, 'MONSTER_SKILL');
static HERO_SKILL = new GroupItem(16, 'HERO_SKILL');
static setNodeLayer(item: GroupItem, node: Node) {
node.layer = item.mask;
node.children.forEach(n => {
n.layer = item.mask;
PhysicsUtil.setNodeLayer(item, n);
});
}
}

View File

@@ -1,9 +0,0 @@
{
"ver": "4.0.23",
"importer": "typescript",
"imported": true,
"uuid": "ea3b7cf5-1be6-4436-a5a3-df3e1c913cb5",
"files": [],
"subMetas": {},
"userData": {}
}