dd
This commit is contained in:
@@ -407,10 +407,10 @@
|
|||||||
"a": 255
|
"a": 255
|
||||||
},
|
},
|
||||||
"_spriteFrame": {
|
"_spriteFrame": {
|
||||||
"__uuid__": "f87f53f9-2fba-4a5b-968a-79a593311ab2@98971",
|
"__uuid__": "f87f53f9-2fba-4a5b-968a-79a593311ab2@4b4e8",
|
||||||
"__expectedType__": "cc.SpriteFrame"
|
"__expectedType__": "cc.SpriteFrame"
|
||||||
},
|
},
|
||||||
"_type": 0,
|
"_type": 1,
|
||||||
"_fillType": 0,
|
"_fillType": 0,
|
||||||
"_sizeMode": 0,
|
"_sizeMode": 0,
|
||||||
"_fillCenter": {
|
"_fillCenter": {
|
||||||
@@ -1134,7 +1134,7 @@
|
|||||||
"_pressedSprite": null,
|
"_pressedSprite": null,
|
||||||
"_disabledSprite": null,
|
"_disabledSprite": null,
|
||||||
"_duration": 0.1,
|
"_duration": 0.1,
|
||||||
"_zoomScale": 1.2,
|
"_zoomScale": 1.05,
|
||||||
"_target": {
|
"_target": {
|
||||||
"__id__": 1
|
"__id__": 1
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1134,7 +1134,7 @@
|
|||||||
"_pressedSprite": null,
|
"_pressedSprite": null,
|
||||||
"_disabledSprite": null,
|
"_disabledSprite": null,
|
||||||
"_duration": 0.1,
|
"_duration": 0.1,
|
||||||
"_zoomScale": 1.2,
|
"_zoomScale": 1.05,
|
||||||
"_target": {
|
"_target": {
|
||||||
"__id__": 1
|
"__id__": 1
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1134,7 +1134,7 @@
|
|||||||
"_pressedSprite": null,
|
"_pressedSprite": null,
|
||||||
"_disabledSprite": null,
|
"_disabledSprite": null,
|
||||||
"_duration": 0.1,
|
"_duration": 0.1,
|
||||||
"_zoomScale": 1.2,
|
"_zoomScale": 1.05,
|
||||||
"_target": {
|
"_target": {
|
||||||
"__id__": 1
|
"__id__": 1
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -3659,10 +3659,10 @@
|
|||||||
"height": 110,
|
"height": 110,
|
||||||
"rawWidth": 112,
|
"rawWidth": 112,
|
||||||
"rawHeight": 110,
|
"rawHeight": 110,
|
||||||
"borderTop": 0,
|
"borderTop": 26,
|
||||||
"borderBottom": 0,
|
"borderBottom": 24,
|
||||||
"borderLeft": 0,
|
"borderLeft": 19,
|
||||||
"borderRight": 0,
|
"borderRight": 22,
|
||||||
"packable": true,
|
"packable": true,
|
||||||
"pixelsToUnit": 100,
|
"pixelsToUnit": 100,
|
||||||
"pivotX": 0.5,
|
"pivotX": 0.5,
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -2,7 +2,7 @@
|
|||||||
"ver": "1.1.50",
|
"ver": "1.1.50",
|
||||||
"importer": "prefab",
|
"importer": "prefab",
|
||||||
"imported": true,
|
"imported": true,
|
||||||
"uuid": "aa9b1ed2-a0ca-4c6a-ad95-fba08b3634dc",
|
"uuid": "e9d4aea4-d78a-40ff-9300-ad76fec45cfe",
|
||||||
"files": [
|
"files": [
|
||||||
".json"
|
".json"
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -54,6 +54,9 @@
|
|||||||
{
|
{
|
||||||
"__id__": 499
|
"__id__": 499
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"__id__": 556
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"__id__": 508
|
"__id__": 508
|
||||||
}
|
}
|
||||||
@@ -61,17 +64,17 @@
|
|||||||
"_active": true,
|
"_active": true,
|
||||||
"_components": [
|
"_components": [
|
||||||
{
|
{
|
||||||
"__id__": 556
|
"__id__": 570
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"__id__": 558
|
"__id__": 572
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"__id__": 560
|
"__id__": 574
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"_prefab": {
|
"_prefab": {
|
||||||
"__id__": 562
|
"__id__": 576
|
||||||
},
|
},
|
||||||
"_lpos": {
|
"_lpos": {
|
||||||
"__type__": "cc.Vec3",
|
"__type__": "cc.Vec3",
|
||||||
@@ -12299,6 +12302,186 @@
|
|||||||
"targetOverrides": null,
|
"targetOverrides": null,
|
||||||
"nestedPrefabInstanceRoots": null
|
"nestedPrefabInstanceRoots": null
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"__type__": "cc.Node",
|
||||||
|
"_objFlags": 0,
|
||||||
|
"_parent": {
|
||||||
|
"__id__": 1
|
||||||
|
},
|
||||||
|
"_prefab": {
|
||||||
|
"__id__": 557
|
||||||
|
},
|
||||||
|
"__editorExtras__": {}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__type__": "cc.PrefabInfo",
|
||||||
|
"root": {
|
||||||
|
"__id__": 556
|
||||||
|
},
|
||||||
|
"asset": {
|
||||||
|
"__uuid__": "e9d4aea4-d78a-40ff-9300-ad76fec45cfe",
|
||||||
|
"__expectedType__": "cc.Prefab"
|
||||||
|
},
|
||||||
|
"fileId": "c46/YsCPVOJYA4mWEpNYRx",
|
||||||
|
"instance": {
|
||||||
|
"__id__": 558
|
||||||
|
},
|
||||||
|
"targetOverrides": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__type__": "cc.PrefabInstance",
|
||||||
|
"fileId": "d7exDuC/5GhJv2X9stM6tg",
|
||||||
|
"prefabRootNode": {
|
||||||
|
"__id__": 1
|
||||||
|
},
|
||||||
|
"mountedChildren": [],
|
||||||
|
"mountedComponents": [],
|
||||||
|
"propertyOverrides": [
|
||||||
|
{
|
||||||
|
"__id__": 559
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__id__": 561
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__id__": 562
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__id__": 563
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__id__": 564
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__id__": 566
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__id__": 567
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__id__": 569
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"removedComponents": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__type__": "CCPropertyOverrideInfo",
|
||||||
|
"targetInfo": {
|
||||||
|
"__id__": 560
|
||||||
|
},
|
||||||
|
"propertyPath": [
|
||||||
|
"_name"
|
||||||
|
],
|
||||||
|
"value": "item_box"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__type__": "cc.TargetInfo",
|
||||||
|
"localID": [
|
||||||
|
"c46/YsCPVOJYA4mWEpNYRx"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__type__": "CCPropertyOverrideInfo",
|
||||||
|
"targetInfo": {
|
||||||
|
"__id__": 560
|
||||||
|
},
|
||||||
|
"propertyPath": [
|
||||||
|
"_lpos"
|
||||||
|
],
|
||||||
|
"value": {
|
||||||
|
"__type__": "cc.Vec3",
|
||||||
|
"x": 181.9,
|
||||||
|
"y": 303.257,
|
||||||
|
"z": 0
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__type__": "CCPropertyOverrideInfo",
|
||||||
|
"targetInfo": {
|
||||||
|
"__id__": 560
|
||||||
|
},
|
||||||
|
"propertyPath": [
|
||||||
|
"_lrot"
|
||||||
|
],
|
||||||
|
"value": {
|
||||||
|
"__type__": "cc.Quat",
|
||||||
|
"x": 0,
|
||||||
|
"y": 0,
|
||||||
|
"z": 0,
|
||||||
|
"w": 1
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__type__": "CCPropertyOverrideInfo",
|
||||||
|
"targetInfo": {
|
||||||
|
"__id__": 560
|
||||||
|
},
|
||||||
|
"propertyPath": [
|
||||||
|
"_euler"
|
||||||
|
],
|
||||||
|
"value": {
|
||||||
|
"__type__": "cc.Vec3",
|
||||||
|
"x": 0,
|
||||||
|
"y": 0,
|
||||||
|
"z": 0
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__type__": "CCPropertyOverrideInfo",
|
||||||
|
"targetInfo": {
|
||||||
|
"__id__": 565
|
||||||
|
},
|
||||||
|
"propertyPath": [
|
||||||
|
"_left"
|
||||||
|
],
|
||||||
|
"value": 181.9
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__type__": "cc.TargetInfo",
|
||||||
|
"localID": [
|
||||||
|
"4cvO4etMZPXb7O03rne8fM"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__type__": "CCPropertyOverrideInfo",
|
||||||
|
"targetInfo": {
|
||||||
|
"__id__": 565
|
||||||
|
},
|
||||||
|
"propertyPath": [
|
||||||
|
"_right"
|
||||||
|
],
|
||||||
|
"value": 108.1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__type__": "CCPropertyOverrideInfo",
|
||||||
|
"targetInfo": {
|
||||||
|
"__id__": 568
|
||||||
|
},
|
||||||
|
"propertyPath": [
|
||||||
|
"_contentSize"
|
||||||
|
],
|
||||||
|
"value": {
|
||||||
|
"__type__": "cc.Size",
|
||||||
|
"width": 430,
|
||||||
|
"height": 180
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__type__": "cc.TargetInfo",
|
||||||
|
"localID": [
|
||||||
|
"a8XXykVztBiZMmVdRCXu8V"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__type__": "CCPropertyOverrideInfo",
|
||||||
|
"targetInfo": {
|
||||||
|
"__id__": 560
|
||||||
|
},
|
||||||
|
"propertyPath": [
|
||||||
|
"_active"
|
||||||
|
],
|
||||||
|
"value": false
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"__type__": "cc.UITransform",
|
"__type__": "cc.UITransform",
|
||||||
"_name": "GameUI<UITransform>",
|
"_name": "GameUI<UITransform>",
|
||||||
@@ -12309,7 +12492,7 @@
|
|||||||
},
|
},
|
||||||
"_enabled": true,
|
"_enabled": true,
|
||||||
"__prefab": {
|
"__prefab": {
|
||||||
"__id__": 557
|
"__id__": 571
|
||||||
},
|
},
|
||||||
"_contentSize": {
|
"_contentSize": {
|
||||||
"__type__": "cc.Size",
|
"__type__": "cc.Size",
|
||||||
@@ -12337,7 +12520,7 @@
|
|||||||
},
|
},
|
||||||
"_enabled": true,
|
"_enabled": true,
|
||||||
"__prefab": {
|
"__prefab": {
|
||||||
"__id__": 559
|
"__id__": 573
|
||||||
},
|
},
|
||||||
"_alignFlags": 45,
|
"_alignFlags": 45,
|
||||||
"_target": null,
|
"_target": null,
|
||||||
@@ -12373,7 +12556,7 @@
|
|||||||
},
|
},
|
||||||
"_enabled": true,
|
"_enabled": true,
|
||||||
"__prefab": {
|
"__prefab": {
|
||||||
"__id__": 561
|
"__id__": 575
|
||||||
},
|
},
|
||||||
"_id": ""
|
"_id": ""
|
||||||
},
|
},
|
||||||
@@ -12393,16 +12576,19 @@
|
|||||||
"instance": null,
|
"instance": null,
|
||||||
"targetOverrides": [
|
"targetOverrides": [
|
||||||
{
|
{
|
||||||
"__id__": 563
|
"__id__": 577
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"__id__": 566
|
"__id__": 580
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"nestedPrefabInstanceRoots": [
|
"nestedPrefabInstanceRoots": [
|
||||||
{
|
{
|
||||||
"__id__": 508
|
"__id__": 508
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"__id__": 556
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"__id__": 348
|
"__id__": 348
|
||||||
}
|
}
|
||||||
@@ -12414,7 +12600,7 @@
|
|||||||
"__id__": 508
|
"__id__": 508
|
||||||
},
|
},
|
||||||
"sourceInfo": {
|
"sourceInfo": {
|
||||||
"__id__": 564
|
"__id__": 578
|
||||||
},
|
},
|
||||||
"propertyPath": [
|
"propertyPath": [
|
||||||
"_target"
|
"_target"
|
||||||
@@ -12423,7 +12609,7 @@
|
|||||||
"__id__": 508
|
"__id__": 508
|
||||||
},
|
},
|
||||||
"targetInfo": {
|
"targetInfo": {
|
||||||
"__id__": 565
|
"__id__": 579
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -12444,7 +12630,7 @@
|
|||||||
"__id__": 508
|
"__id__": 508
|
||||||
},
|
},
|
||||||
"sourceInfo": {
|
"sourceInfo": {
|
||||||
"__id__": 567
|
"__id__": 581
|
||||||
},
|
},
|
||||||
"propertyPath": [
|
"propertyPath": [
|
||||||
"_target"
|
"_target"
|
||||||
@@ -12453,7 +12639,7 @@
|
|||||||
"__id__": 508
|
"__id__": 508
|
||||||
},
|
},
|
||||||
"targetInfo": {
|
"targetInfo": {
|
||||||
"__id__": 568
|
"__id__": 582
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -62,12 +62,6 @@ export class Role extends ecs.Entity {
|
|||||||
this.hero_init(uuid,node)
|
this.hero_init(uuid,node)
|
||||||
|
|
||||||
}
|
}
|
||||||
move(target: Vec3) {
|
|
||||||
var move = this.get(MoveToComp) || this.add(MoveToComp);
|
|
||||||
move.target = target;
|
|
||||||
move.node = this.MonsterView.node;
|
|
||||||
move.speed = 300;
|
|
||||||
}
|
|
||||||
hero_init(uuid:number=1001,node:Node,pos:Vec3=v3(0,0,0)){
|
hero_init(uuid:number=1001,node:Node,pos:Vec3=v3(0,0,0)){
|
||||||
var mv = node.getComponent(MonsterViewComp)!;
|
var mv = node.getComponent(MonsterViewComp)!;
|
||||||
var buff =node.getComponent(MonsterBuffComp)!;
|
var buff =node.getComponent(MonsterBuffComp)!;
|
||||||
@@ -91,6 +85,12 @@ export class Role extends ecs.Entity {
|
|||||||
this.add(mv);
|
this.add(mv);
|
||||||
this.add(buff);
|
this.add(buff);
|
||||||
}
|
}
|
||||||
|
move(target: Vec3) {
|
||||||
|
var move = this.get(MoveToComp) || this.add(MoveToComp);
|
||||||
|
move.target = target;
|
||||||
|
move.node = this.MonsterView.node;
|
||||||
|
move.speed = 300;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -44,6 +44,7 @@ export class SingletonModuleComp extends ecs.Comp {
|
|||||||
/**heros 数据 */
|
/**heros 数据 */
|
||||||
heros:any = [];
|
heros:any = [];
|
||||||
skills:any = []
|
skills:any = []
|
||||||
|
sk_info:any = []
|
||||||
monsters_dead:any = []
|
monsters_dead:any = []
|
||||||
heros_dead:any = []
|
heros_dead:any = []
|
||||||
least_hp_monster_eid:number=0;
|
least_hp_monster_eid:number=0;
|
||||||
|
|||||||
@@ -21,34 +21,61 @@ sp_name : 预制体名称
|
|||||||
path: 图片地址
|
path: 图片地址
|
||||||
|
|
||||||
*/
|
*/
|
||||||
export const SkillSet={
|
|
||||||
1001:{uuid: 1001,path: "1001",type: 1,level: 1,name: "火球术",sp_name:"fire",dis:720,count:1,atk:10,hp:0,shield:0,sd:10,cd:1,bsd:10,bcd:1,sk_uuid:1001,sk_count:0,speed:350,},
|
|
||||||
1002:{uuid: 1002,path: "1002",type: 1,level: 1,name: "寒冰箭",sp_name:"ice",dis:720,count:1,atk:10,hp:0,shield:0,sd:10,cd:1,bsd:10,bcd:1,sk_uuid:1001,sk_count:0,speed:350,},
|
|
||||||
4011:{uuid: 4011,path: "1011",type: 1,level: 3,name: "火焰风暴",sp_name:"fire",dis:720,count:5,atk:10,hp:0,shield:0,sd:10,cd:1,bsd:10,bcd:1,sk_uuid:1001,sk_count:0,speed:350,},
|
|
||||||
4012:{uuid: 4012,path: "1012",type: 1,level: 3,name: "冰晶风暴",sp_name:"ice",dis:720,count:5,atk:10,hp:0,shield:0,sd:10,cd:1,bsd:10,bcd:1,sk_uuid:1001,sk_count:0,speed:350,},
|
|
||||||
9001:{uuid: 9001,path: "1001",type: 1,level: 1,name: "基础攻击1",sp_name:"base",dis:720,count:1,atk:0,hp:0,shield:0,sd:10,cd:3,bsd:10,bcd:1,sk_uuid:1001,sk_count:0,speed:450,},
|
|
||||||
9002:{uuid: 9002,path: "1001",type: 1,level: 1,name: "基础攻击2",sp_name:"base2",dis:720,count:1,atk:0,hp:0,shield:0,sd:10,cd:3,bsd:10,bcd:1,sk_uuid:1001,sk_count:0,speed:450,},
|
|
||||||
9003:{uuid: 9003,path: "1001",type: 2,level: 1,name: "基础攻击3",sp_name:"base3",dis:720,count:1,atk:0,hp:0,shield:0,sd:10,cd:3,bsd:10,bcd:1,sk_uuid:1001,sk_count:0,speed:450,},
|
|
||||||
|
|
||||||
6001:{uuid: 6001,path: "6001",type: 92,level: 1,name: "普通单手剑",sp_name:"",dis:720,count:1,atk:10,hp:0,shield:0,sd:30,cd:1,bsd:5,bcd:1,sk_uuid:1001,sk_count:0,speed:350,},
|
export const SkillSet={
|
||||||
6002:{uuid: 6002,path: "6002",type: 93,level: 3,name: "精致单手剑",sp_name:"",dis:720,count:1,atk:10,hp:0,shield:0,sd:30,cd:1,bsd:5,bcd:1,sk_uuid:1001,sk_count:0,speed:350,},
|
1001:{uuid: 1001,path: "1001",type: 1,level: 1,name: "火球术",sp_name:"fire",info:"释放一个火球术攻击敌人",
|
||||||
6003:{uuid: 6003,path: "6003",type: 94,level: 3,name: "魔法单手剑",sp_name:"",dis:720,count:1,atk:10,hp:0,shield:0,sd:30,cd:1,bsd:5,bcd:1,sk_uuid:1001,sk_count:0,speed:350,},
|
dis:720,count:1,atk:10,hp:0,shield:0,sd:10,cd:1,bsd:10,bcd:1,sk_uuid:1001,sk_count:0,speed:350, },
|
||||||
6004:{uuid: 6004,path: "6004",type: 92,level: 1,name: "普通木盾",sp_name:"",dis:720,count:1,atk:0,hp:0,shield:0,sd:30,cd:1,bsd:5,bcd:1,sk_uuid:1001,sk_count:0,speed:350,},
|
1002:{uuid: 1002,path: "1002",type: 1,level: 1,name: "寒冰箭",sp_name:"ice",info:"释放一个寒冰箭攻击敌人",
|
||||||
6005:{uuid: 6005,path: "6005",type: 93,level: 3,name: "精致钢盾",sp_name:"",dis:720,count:1,atk:0,hp:0,shield:0,sd:30,cd:1,bsd:5,bcd:1,sk_uuid:1001,sk_count:0,speed:350,},
|
dis:720,count:1,atk:10,hp:0,shield:0,sd:10,cd:1,bsd:10,bcd:1,sk_uuid:1001,sk_count:0,speed:350, },
|
||||||
6006:{uuid: 6006,path: "6006",type: 94,level: 3,name: "魔法盾",sp_name:"",dis:720,count:1,atk:0,hp:0,shield:0,sd:30,cd:1,bsd:5,bcd:1,sk_uuid:1001,sk_count:0,speed:350,},
|
4011:{uuid: 4011,path: "1011",type: 1,level: 3,name: "火焰风暴",sp_name:"fire",info:"释放多个个火球术攻击敌人",
|
||||||
6101:{uuid: 6101,path: "6101",type: 91,level: 1,name: "初级药水",sp_name:"",dis:720,count:1,atk:0,hp:30,shield:0,sd:30,cd:1,bsd:5,bcd:1,sk_uuid:1001,sk_count:0,speed:350,},
|
dis:720,count:5,atk:10,hp:0,shield:0,sd:10,cd:1,bsd:10,bcd:1,sk_uuid:1001,sk_count:0,speed:350, },
|
||||||
6102:{uuid: 6102,path: "6102",type: 93,level: 3,name: "高级药水",sp_name:"",dis:720,count:1,atk:0,hp:50,shield:0,sd:30,cd:1,bsd:5,bcd:1,sk_uuid:1001,sk_count:0,speed:350,},
|
4012:{uuid: 4012,path: "1012",type: 1,level: 3,name: "冰晶风暴",sp_name:"ice",info:"释放多个个寒冰箭攻击敌人",
|
||||||
6103:{uuid: 6103,path: "6103",type: 94,level: 3,name: "活力药水",sp_name:"",dis:720,count:1,atk:0,hp:50,shield:0,sd:30,cd:1,bsd:5,bcd:1,sk_uuid:1001,sk_count:0,speed:350,},
|
dis:720,count:5,atk:10,hp:0,shield:0,sd:10,cd:1,bsd:10,bcd:1,sk_uuid:1001,sk_count:0,speed:350, },
|
||||||
6210:{uuid: 6210,path: "6210",type: 92,level: 3,name: "普通攻击石",sp_name:"",dis:720,count:1,atk:0,hp:30,shield:0,sd:30,cd:1,bsd:0,bcd:1,sk_uuid:1001,sk_count:0,speed:350,},
|
9001:{uuid: 9001,path: "1001",type: 1,level: 1,name: "魔法波动",sp_name:"base",info:"释放一个魔法球攻击敌人",
|
||||||
6211:{uuid: 6211,path: "6211",type: 93,level: 4,name: "特效攻击石",sp_name:"",dis:720,count:1,atk:0,hp:50,shield:0,sd:30,cd:1,bsd:0,bcd:1,sk_uuid:1001,sk_count:0,speed:350,},
|
dis:720,count:1,atk:0,hp:0,shield:0,sd:10,cd:3,bsd:10,bcd:1,sk_uuid:1001,sk_count:0,speed:450,},
|
||||||
6212:{uuid: 6212,path: "6212",type: 94,level: 4,name: "精炼攻击石",sp_name:"",dis:720,count:1,atk:0,hp:50,shield:0,sd:30,cd:1,bsd:0,bcd:1,sk_uuid:1001,sk_count:0,speed:350,},
|
9002:{uuid: 9002,path: "1001",type: 1,level: 1,name: "魔法波动",sp_name:"base2",info:"释放一个魔法球攻击敌人",
|
||||||
6213:{uuid: 6213,path: "6213",type: 92,level: 3,name: "普通生命石",sp_name:"",dis:720,count:1,atk:0,hp:30,shield:0,sd:30,cd:1,bsd:0,bcd:1,sk_uuid:1001,sk_count:0,speed:350,},
|
dis:720,count:1,atk:0,hp:0,shield:0,sd:10,cd:3,bsd:10,bcd:1,sk_uuid:1001,sk_count:0,speed:450,},
|
||||||
6214:{uuid: 6214,path: "6214",type: 93,level: 4,name: "特效生命石",sp_name:"",dis:720,count:1,atk:0,hp:50,shield:0,sd:30,cd:1,bsd:0,bcd:1,sk_uuid:1001,sk_count:0,speed:350,},
|
9003:{uuid: 9003,path: "1001",type: 2,level: 1,name: "魔法波动",sp_name:"base3",info:"释放一个魔法球攻击敌人",
|
||||||
6215:{uuid: 6215,path: "6215",type: 94,level: 4,name: "精炼生命石",sp_name:"",dis:720,count:1,atk:0,hp:50,shield:0,sd:30,cd:1,bsd:0,bcd:1,sk_uuid:1001,sk_count:0,speed:350,},
|
dis:720,count:1,atk:0,hp:0,shield:0,sd:10,cd:3,bsd:10,bcd:1,sk_uuid:1001,sk_count:0,speed:450,},
|
||||||
6216:{uuid: 6216,path: "6216",type: 92,level: 3,name: "普通全能石",sp_name:"",dis:720,count:1,atk:0,hp:30,shield:0,sd:30,cd:1,bsd:0,bcd:1,sk_uuid:1001,sk_count:0,speed:350,},
|
|
||||||
6217:{uuid: 6217,path: "6217",type: 93,level: 4,name: "特效全能石",sp_name:"",dis:720,count:1,atk:0,hp:50,shield:0,sd:30,cd:1,bsd:0,bcd:1,sk_uuid:1001,sk_count:0,speed:350,},
|
6001:{uuid: 6001,path: "6001",type: 92,level: 1,name: "普通单手剑",sp_name:"",
|
||||||
6218:{uuid: 6218,path: "6218",type: 94,level: 4,name: "精炼全能石",sp_name:"",dis:720,count:1,atk:0,hp:50,shield:0,sd:30,cd:1,bsd:0,bcd:1,sk_uuid:1001,sk_count:0,speed:350,},
|
dis:720,count:1,atk:10,hp:0,shield:0,sd:30,cd:1,bsd:5,bcd:1,sk_uuid:1001,sk_count:0,speed:350, },
|
||||||
|
6002:{uuid: 6002,path: "6002",type: 93,level: 3,name: "精致单手剑",sp_name:"",
|
||||||
|
dis:720,count:1,atk:10,hp:0,shield:0,sd:30,cd:1,bsd:5,bcd:1,sk_uuid:1001,sk_count:0,speed:350, },
|
||||||
|
6003:{uuid: 6003,path: "6003",type: 94,level: 3,name: "魔法单手剑",sp_name:"",
|
||||||
|
dis:720,count:1,atk:10,hp:0,shield:0,sd:30,cd:1,bsd:5,bcd:1,sk_uuid:1001,sk_count:0,speed:350, },
|
||||||
|
6004:{uuid: 6004,path: "6004",type: 92,level: 1,name: "普通木盾",sp_name:"",
|
||||||
|
dis:720,count:1,atk:0,hp:0,shield:0,sd:30,cd:1,bsd:5,bcd:1,sk_uuid:1001,sk_count:0,speed:350, },
|
||||||
|
6005:{uuid: 6005,path: "6005",type: 93,level: 3,name: "精致钢盾",sp_name:"",
|
||||||
|
dis:720,count:1,atk:0,hp:0,shield:0,sd:30,cd:1,bsd:5,bcd:1,sk_uuid:1001,sk_count:0,speed:350, },
|
||||||
|
6006:{uuid: 6006,path: "6006",type: 94,level: 3,name: "魔法盾",sp_name:"",
|
||||||
|
dis:720,count:1,atk:0,hp:0,shield:0,sd:30,cd:1,bsd:5,bcd:1,sk_uuid:1001,sk_count:0,speed:350, },
|
||||||
|
6101:{uuid: 6101,path: "6101",type: 91,level: 1,name: "初级药水",sp_name:"",
|
||||||
|
dis:720,count:1,atk:0,hp:30,shield:0,sd:30,cd:1,bsd:5,bcd:1,sk_uuid:1001,sk_count:0,speed:350, },
|
||||||
|
6102:{uuid: 6102,path: "6102",type: 93,level: 3,name: "高级药水",sp_name:"",
|
||||||
|
dis:720,count:1,atk:0,hp:50,shield:0,sd:30,cd:1,bsd:5,bcd:1,sk_uuid:1001,sk_count:0,speed:350, },
|
||||||
|
6103:{uuid: 6103,path: "6103",type: 94,level: 3,name: "活力药水",sp_name:"",
|
||||||
|
dis:720,count:1,atk:0,hp:50,shield:0,sd:30,cd:1,bsd:5,bcd:1,sk_uuid:1001,sk_count:0,speed:350, },
|
||||||
|
6210:{uuid: 6210,path: "6210",type: 92,level: 3,name: "普通攻击石",sp_name:"",
|
||||||
|
dis:720,count:1,atk:0,hp:30,shield:0,sd:30,cd:1,bsd:0,bcd:1,sk_uuid:1001,sk_count:0,speed:350, },
|
||||||
|
6211:{uuid: 6211,path: "6211",type: 93,level: 4,name: "特效攻击石",sp_name:"",
|
||||||
|
dis:720,count:1,atk:0,hp:50,shield:0,sd:30,cd:1,bsd:0,bcd:1,sk_uuid:1001,sk_count:0,speed:350, },
|
||||||
|
6212:{uuid: 6212,path: "6212",type: 94,level: 4,name: "精炼攻击石",sp_name:"",
|
||||||
|
dis:720,count:1,atk:0,hp:50,shield:0,sd:30,cd:1,bsd:0,bcd:1,sk_uuid:1001,sk_count:0,speed:350, },
|
||||||
|
6213:{uuid: 6213,path: "6213",type: 92,level: 3,name: "普通生命石",sp_name:"",
|
||||||
|
dis:720,count:1,atk:0,hp:30,shield:0,sd:30,cd:1,bsd:0,bcd:1,sk_uuid:1001,sk_count:0,speed:350, },
|
||||||
|
6214:{uuid: 6214,path: "6214",type: 93,level: 4,name: "特效生命石",sp_name:"",
|
||||||
|
dis:720,count:1,atk:0,hp:50,shield:0,sd:30,cd:1,bsd:0,bcd:1,sk_uuid:1001,sk_count:0,speed:350, },
|
||||||
|
6215:{uuid: 6215,path: "6215",type: 94,level: 4,name: "精炼生命石",sp_name:"",
|
||||||
|
dis:720,count:1,atk:0,hp:50,shield:0,sd:30,cd:1,bsd:0,bcd:1,sk_uuid:1001,sk_count:0,speed:350, },
|
||||||
|
6216:{uuid: 6216,path: "6216",type: 92,level: 3,name: "普通全能石",sp_name:"",
|
||||||
|
dis:720,count:1,atk:0,hp:30,shield:0,sd:30,cd:1,bsd:0,bcd:1,sk_uuid:1001,sk_count:0,speed:350, },
|
||||||
|
6217:{uuid: 6217,path: "6217",type: 93,level: 4,name: "特效全能石",sp_name:"",
|
||||||
|
dis:720,count:1,atk:0,hp:50,shield:0,sd:30,cd:1,bsd:0,bcd:1,sk_uuid:1001,sk_count:0,speed:350, },
|
||||||
|
6218:{uuid: 6218,path: "6218",type: 94,level: 4,name: "精炼全能石",sp_name:"",
|
||||||
|
dis:720,count:1,atk:0,hp:50,shield:0,sd:30,cd:1,bsd:0,bcd:1,sk_uuid:1001,sk_count:0,speed:350, },
|
||||||
}
|
}
|
||||||
|
|
||||||
export const AllItems={
|
export const AllItems={
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
9
assets/script/game/gui.meta
Normal file
9
assets/script/game/gui.meta
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
"ver": "1.2.0",
|
||||||
|
"importer": "directory",
|
||||||
|
"imported": true,
|
||||||
|
"uuid": "72cf6d53-03ee-4f9d-aefc-0f164cbeddb2",
|
||||||
|
"files": [],
|
||||||
|
"subMetas": {},
|
||||||
|
"userData": {}
|
||||||
|
}
|
||||||
50
assets/script/game/gui/InfoBox.ts
Normal file
50
assets/script/game/gui/InfoBox.ts
Normal file
@@ -0,0 +1,50 @@
|
|||||||
|
import { instantiate, Prefab, Vec3 } from "cc";
|
||||||
|
import { ecs } from "../../../../extensions/oops-plugin-framework/assets/libs/ecs/ECS";
|
||||||
|
import { InfoBoxCom } from "./InfoBoxCom";
|
||||||
|
import { smc } from "../common/SingletonModuleComp";
|
||||||
|
import { oops } from "../../../../extensions/oops-plugin-framework/assets/core/Oops";
|
||||||
|
|
||||||
|
/** InfoBox 模块 */
|
||||||
|
@ecs.register(`InfoBox`)
|
||||||
|
export class InfoBox extends ecs.Entity {
|
||||||
|
/** ---------- 数据层 ---------- */
|
||||||
|
// InfoBoxModel!: InfoBoxModelComp;
|
||||||
|
|
||||||
|
/** ---------- 业务层 ---------- */
|
||||||
|
// InfoBoxBll!: InfoBoxBllComp;
|
||||||
|
|
||||||
|
/** ---------- 视图层 ---------- */
|
||||||
|
InfoBoxView!: InfoBoxCom
|
||||||
|
|
||||||
|
/** 实始添加的数据层组件 */
|
||||||
|
protected init() {
|
||||||
|
// this.addComponents<ecs.Comp>();
|
||||||
|
}
|
||||||
|
load(pos: Vec3 = Vec3.ZERO,uuid:number=101,prefab_path:string) {
|
||||||
|
var path = "game/gui/"+prefab_path;
|
||||||
|
var prefab: Prefab = oops.res.get(path, Prefab)!;
|
||||||
|
var node = instantiate(prefab);
|
||||||
|
var scene = smc.map.MapView.scene;
|
||||||
|
node.parent = scene.SkillLayer!.node!;
|
||||||
|
node.setPosition(pos)
|
||||||
|
// console.log(node.getChildByName("avatar").getChildByName("TNode").getChildByName("bb").getComponent(Sprite))
|
||||||
|
// const url = 'game/heros/player';
|
||||||
|
// resources.load(url, SpriteAtlas, (err: any, atlas) => {
|
||||||
|
// const sprite = node.getChildByName("avatar").getChildByName("TNode").getChildByName("bb").getComponent(Sprite);
|
||||||
|
|
||||||
|
// sprite.spriteFrame = atlas.getSpriteFrame(RoleSet[uuid].path);
|
||||||
|
// });
|
||||||
|
// var rv = node.getComponent(MonsterViewComp)!;
|
||||||
|
// this.add(rv);
|
||||||
|
var mv = node.getComponent(InfoBoxCom)!;
|
||||||
|
this.add(mv);
|
||||||
|
|
||||||
|
}
|
||||||
|
/** 模块资源释放 */
|
||||||
|
destroy() {
|
||||||
|
// 注: 自定义释放逻辑,视图层实现 ecs.IComp 接口的 ecs 组件需要手动释放
|
||||||
|
this.remove(InfoBoxCom);
|
||||||
|
super.destroy();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
9
assets/script/game/gui/InfoBox.ts.meta
Normal file
9
assets/script/game/gui/InfoBox.ts.meta
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
"ver": "4.0.23",
|
||||||
|
"importer": "typescript",
|
||||||
|
"imported": true,
|
||||||
|
"uuid": "b64b5d93-6a68-402a-a7ab-bf89db4a153b",
|
||||||
|
"files": [],
|
||||||
|
"subMetas": {},
|
||||||
|
"userData": {}
|
||||||
|
}
|
||||||
43
assets/script/game/gui/InfoBoxCom.ts
Normal file
43
assets/script/game/gui/InfoBoxCom.ts
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
import { _decorator ,Node} from "cc";
|
||||||
|
import { ecs } from "../../../../extensions/oops-plugin-framework/assets/libs/ecs/ECS";
|
||||||
|
import { CCComp } from "../../../../extensions/oops-plugin-framework/assets/module/common/CCComp";
|
||||||
|
|
||||||
|
const { ccclass, property } = _decorator;
|
||||||
|
|
||||||
|
/** 视图层对象 */
|
||||||
|
@ccclass('InfoBoxCom')
|
||||||
|
@ecs.register('InfoBox', false)
|
||||||
|
export class InfoBoxCom extends CCComp {
|
||||||
|
@property(Node)
|
||||||
|
n_name:Node =null!
|
||||||
|
@property(Node)
|
||||||
|
n_hp:Node =null!
|
||||||
|
@property(Node)
|
||||||
|
n_atk:Node =null!
|
||||||
|
@property(Node)
|
||||||
|
n_info:Node =null!
|
||||||
|
@property(Node)
|
||||||
|
n_atk_cd:Node =null!
|
||||||
|
@property(Node)
|
||||||
|
n_skillcd:Node =null!
|
||||||
|
|
||||||
|
n_type:number=0; // 0:技能 1 精灵
|
||||||
|
/** 视图层逻辑代码分离演示 */
|
||||||
|
start() {
|
||||||
|
// var entity = this.ent as ecs.Entity; // ecs.Entity 可转为当前模块的具体实体对象
|
||||||
|
console.log("InfoBoxCom start");
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 全局消息逻辑处理 */
|
||||||
|
// private onHandler(event: string, args: any) {
|
||||||
|
// switch (event) {
|
||||||
|
// case ModuleEvent.Cmd:
|
||||||
|
// break;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
/** 视图对象通过 ecs.Entity.remove(ModuleViewComp) 删除组件是触发组件处理自定义释放逻辑 */
|
||||||
|
reset() {
|
||||||
|
this.node.destroy();
|
||||||
|
}
|
||||||
|
}
|
||||||
9
assets/script/game/gui/InfoBoxCom.ts.meta
Normal file
9
assets/script/game/gui/InfoBoxCom.ts.meta
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
"ver": "4.0.23",
|
||||||
|
"importer": "typescript",
|
||||||
|
"imported": true,
|
||||||
|
"uuid": "20c2c0dd-188e-41da-b74e-fdacae24b337",
|
||||||
|
"files": [],
|
||||||
|
"subMetas": {},
|
||||||
|
"userData": {}
|
||||||
|
}
|
||||||
@@ -87,6 +87,7 @@ export class Initialize extends ecs.Entity {
|
|||||||
queue.complete = () => {
|
queue.complete = () => {
|
||||||
smc.heros = HeroSet;
|
smc.heros = HeroSet;
|
||||||
smc.skills=SkillSet;
|
smc.skills=SkillSet;
|
||||||
|
|
||||||
var uic: UICallbacks = {
|
var uic: UICallbacks = {
|
||||||
onAdded: (node: Node, params: any) => {
|
onAdded: (node: Node, params: any) => {
|
||||||
var comp = node.getComponent(LoadingViewComp) as ecs.Comp;
|
var comp = node.getComponent(LoadingViewComp) as ecs.Comp;
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { _decorator ,Label,NodeEventType,EventTouch} from "cc";
|
import { _decorator ,Label,NodeEventType,EventTouch,v3} from "cc";
|
||||||
import { ecs } from "../../../../extensions/oops-plugin-framework/assets/libs/ecs/ECS";
|
import { ecs } from "../../../../extensions/oops-plugin-framework/assets/libs/ecs/ECS";
|
||||||
import { CCComp } from "../../../../extensions/oops-plugin-framework/assets/module/common/CCComp";
|
import { CCComp } from "../../../../extensions/oops-plugin-framework/assets/module/common/CCComp";
|
||||||
import { data } from "../data/data";
|
import { data } from "../data/data";
|
||||||
@@ -12,6 +12,7 @@ import { Hero } from "./Hero";
|
|||||||
import { MonsterViewComp } from "./MonsterViewComp";
|
import { MonsterViewComp } from "./MonsterViewComp";
|
||||||
import { MapMonsterComp } from "../map/MapMonsterComp";
|
import { MapMonsterComp } from "../map/MapMonsterComp";
|
||||||
import { MapSkillComp } from "../map/MapSkillComp";
|
import { MapSkillComp } from "../map/MapSkillComp";
|
||||||
|
import { InfoBox } from "../gui/InfoBox";
|
||||||
const { ccclass, property } = _decorator;
|
const { ccclass, property } = _decorator;
|
||||||
|
|
||||||
/** 视图层对象 */
|
/** 视图层对象 */
|
||||||
@@ -60,6 +61,8 @@ export class HeroCardViewComp extends CCComp {
|
|||||||
onTouchMove(event: EventTouch) {
|
onTouchMove(event: EventTouch) {
|
||||||
let delta = event.getDelta();
|
let delta = event.getDelta();
|
||||||
this.node.setPosition(this.node.position.x+delta.x,this.node.position.y+delta.y);
|
this.node.setPosition(this.node.position.x+delta.x,this.node.position.y+delta.y);
|
||||||
|
let parent = this.node.parent.parent
|
||||||
|
parent.getChildByName("item_box").active=true
|
||||||
}
|
}
|
||||||
onTouchEnd(){
|
onTouchEnd(){
|
||||||
if(this.node.position.y-this.pos_y > 150){
|
if(this.node.position.y-this.pos_y > 150){
|
||||||
@@ -67,6 +70,9 @@ export class HeroCardViewComp extends CCComp {
|
|||||||
}else{
|
}else{
|
||||||
this.node.setPosition(this.pos_x,this.pos_y);
|
this.node.setPosition(this.pos_x,this.pos_y);
|
||||||
}
|
}
|
||||||
|
let parent = this.node.parent.parent
|
||||||
|
|
||||||
|
parent.getChildByName("item_box").active=false
|
||||||
}
|
}
|
||||||
|
|
||||||
private do_active_card_eid(event: string, args: any) {
|
private do_active_card_eid(event: string, args: any) {
|
||||||
@@ -80,8 +86,9 @@ export class HeroCardViewComp extends CCComp {
|
|||||||
// console.log(this.node.getChildByName("active"),this.node.getChildByName("use"), this.node.getChildByName("bag"))
|
// console.log(this.node.getChildByName("active"),this.node.getChildByName("use"), this.node.getChildByName("bag"))
|
||||||
// let use = this.node.getChildByName("use")
|
// let use = this.node.getChildByName("use")
|
||||||
// let bag = this.node.getChildByName("bag")
|
// let bag = this.node.getChildByName("bag")
|
||||||
let active = this.node.getChildByName("active")
|
// let active = this.node.getChildByName("active")
|
||||||
active.active = !active.active
|
// active.active = !active.active
|
||||||
|
|
||||||
// use.active = !use.active
|
// use.active = !use.active
|
||||||
// bag.active = !bag.active
|
// bag.active = !bag.active
|
||||||
// this.alive=!this.alive
|
// this.alive=!this.alive
|
||||||
@@ -93,14 +100,15 @@ export class HeroCardViewComp extends CCComp {
|
|||||||
|
|
||||||
}
|
}
|
||||||
no_active(){
|
no_active(){
|
||||||
let active = this.node.getChildByName("active")
|
// let active = this.node.getChildByName("active")
|
||||||
// let use = this.node.getChildByName("use")
|
// // let use = this.node.getChildByName("use")
|
||||||
// let bag = this.node.getChildByName("bag")
|
// // let bag = this.node.getChildByName("bag")
|
||||||
active.active = false
|
// active.active = false
|
||||||
this.node.setScale(1,1)
|
// this.node.setScale(1,1)
|
||||||
// use.active = false
|
// use.active = false
|
||||||
// bag.active = false
|
// bag.active = false
|
||||||
}
|
}
|
||||||
|
|
||||||
doit(){
|
doit(){
|
||||||
// this.do_active()
|
// this.do_active()
|
||||||
smc.vm_data.cards.eid = this.ent.eid;
|
smc.vm_data.cards.eid = this.ent.eid;
|
||||||
|
|||||||
Reference in New Issue
Block a user