局内技能选择开始,需要先完成技能设置,确定局内技能数据
This commit is contained in:
File diff suppressed because it is too large
Load Diff
63
assets/resources/game/gui/mskill.prefab
Normal file
63
assets/resources/game/gui/mskill.prefab
Normal file
@@ -0,0 +1,63 @@
|
|||||||
|
[
|
||||||
|
{
|
||||||
|
"__type__": "cc.Prefab",
|
||||||
|
"_name": "mskill",
|
||||||
|
"_objFlags": 0,
|
||||||
|
"_native": "",
|
||||||
|
"data": {
|
||||||
|
"__id__": 1
|
||||||
|
},
|
||||||
|
"optimizationPolicy": 0,
|
||||||
|
"asyncLoadAssets": false,
|
||||||
|
"persistent": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__type__": "cc.Node",
|
||||||
|
"_name": "mskill",
|
||||||
|
"_objFlags": 0,
|
||||||
|
"_parent": null,
|
||||||
|
"_children": [],
|
||||||
|
"_active": true,
|
||||||
|
"_components": [],
|
||||||
|
"_prefab": {
|
||||||
|
"__id__": 2
|
||||||
|
},
|
||||||
|
"_lpos": {
|
||||||
|
"__type__": "cc.Vec3",
|
||||||
|
"x": 0,
|
||||||
|
"y": 0,
|
||||||
|
"z": 0
|
||||||
|
},
|
||||||
|
"_lrot": {
|
||||||
|
"__type__": "cc.Quat",
|
||||||
|
"x": 0,
|
||||||
|
"y": 0,
|
||||||
|
"z": 0,
|
||||||
|
"w": 1
|
||||||
|
},
|
||||||
|
"_lscale": {
|
||||||
|
"__type__": "cc.Vec3",
|
||||||
|
"x": 1,
|
||||||
|
"y": 1,
|
||||||
|
"z": 1
|
||||||
|
},
|
||||||
|
"_layer": 1073741824,
|
||||||
|
"_euler": {
|
||||||
|
"__type__": "cc.Vec3",
|
||||||
|
"x": 0,
|
||||||
|
"y": 0,
|
||||||
|
"z": 0
|
||||||
|
},
|
||||||
|
"_id": ""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__type__": "cc.PrefabInfo",
|
||||||
|
"root": {
|
||||||
|
"__id__": 1
|
||||||
|
},
|
||||||
|
"asset": {
|
||||||
|
"__id__": 0
|
||||||
|
},
|
||||||
|
"fileId": "c46/YsCPVOJYA4mWEpNYRx"
|
||||||
|
}
|
||||||
|
]
|
||||||
13
assets/resources/game/gui/mskill.prefab.meta
Normal file
13
assets/resources/game/gui/mskill.prefab.meta
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
{
|
||||||
|
"ver": "1.1.50",
|
||||||
|
"importer": "prefab",
|
||||||
|
"imported": true,
|
||||||
|
"uuid": "620e1d42-ec6f-43e1-8c65-5c7711e763f6",
|
||||||
|
"files": [
|
||||||
|
".json"
|
||||||
|
],
|
||||||
|
"subMetas": {},
|
||||||
|
"userData": {
|
||||||
|
"syncNodeName": "mskill"
|
||||||
|
}
|
||||||
|
}
|
||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -45,7 +45,7 @@ import { Talents } from "./TalentSet"
|
|||||||
**/
|
**/
|
||||||
export const HeroInfo = {
|
export const HeroInfo = {
|
||||||
9001: {
|
9001: {
|
||||||
uuid:9001,name: "圣盾骑士",path:"k1",type:1,hp: 1000, hp_up:10, shp_up:20,def:10,def_up:1,sdef_up:20,ap:20,ap_up:2,sap_up:20,atp:1,vun:0,crit:20,crit_add:0,ucr:0,dodge:0,dis:100,a_cd:1.5,
|
uuid:9001,name: "圣盾骑士",path:"k1",type:1,hp: 100, hp_up:10, shp_up:20,def:10,def_up:1,sdef_up:20,ap:20,ap_up:2,sap_up:20,atp:1,vun:0,crit:20,crit_add:0,ucr:0,dodge:0,dis:100,a_cd:1.5,
|
||||||
lvexp:0,slvexp:0, speed: 100,aexp:5,uaexp:1,cexp:10,doexp:10,dexp:20,sk1:[9001,9001,9001,9001,9001],sk2:[2002,2002,2002,2002,2002],sk3:[2002,2002,2002,2002,2002],pw:0,pwm:150,pws:10,apw:10,uapw:10,cpw:10,dpw:10,dopw:10,
|
lvexp:0,slvexp:0, speed: 100,aexp:5,uaexp:1,cexp:10,doexp:10,dexp:20,sk1:[9001,9001,9001,9001,9001],sk2:[2002,2002,2002,2002,2002],sk3:[2002,2002,2002,2002,2002],pw:0,pwm:150,pws:10,apw:10,uapw:10,cpw:10,dpw:10,dopw:10,
|
||||||
akr:[10,20,30,40,50],akc:[1,1,1,1,1],uar:[10,20,30,40,50],uac:[1,1,1,1,1],dgr:[10,20,30,40,50],dgc:[1,1,1,1,1],crr:[10,20,30,40,50],crc:[1,1,1,1,1],
|
akr:[10,20,30,40,50],akc:[1,1,1,1,1],uar:[10,20,30,40,50],uac:[1,1,1,1,1],dgr:[10,20,30,40,50],dgc:[1,1,1,1,1],crr:[10,20,30,40,50],crc:[1,1,1,1,1],
|
||||||
abh:0,abc:0,uabh:0,uabc:0,cbh:0,cbc:0,aua:0,auc:0,uaua:0,uauc:0,cua:0,cuc:0,wp:1001,arm:2001,ring:3001,shoes:4001,
|
abh:0,abc:0,uabh:0,uabc:0,cbh:0,cbc:0,aua:0,auc:0,uaua:0,uauc:0,cua:0,cuc:0,wp:1001,arm:2001,ring:3001,shoes:4001,
|
||||||
|
|||||||
@@ -1 +1,9 @@
|
|||||||
{"ver":"4.0.23","importer":"typescript","imported":true,"uuid":"9cbe48f9-8c14-41b7-b699-2ae076311a17","files":[],"subMetas":{},"userData":{}}
|
{
|
||||||
|
"ver": "4.0.23",
|
||||||
|
"importer": "typescript",
|
||||||
|
"imported": true,
|
||||||
|
"uuid": "41c23406-8f3f-44e7-b892-b0bbed19be78",
|
||||||
|
"files": [],
|
||||||
|
"subMetas": {},
|
||||||
|
"userData": {}
|
||||||
|
}
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ export class MissionHomeComp extends CCComp {
|
|||||||
{uuid:0,px:0},
|
{uuid:0,px:0},
|
||||||
{uuid:0,px:100},
|
{uuid:0,px:100},
|
||||||
]
|
]
|
||||||
|
|
||||||
/** 视图层逻辑代码分离演示 */
|
/** 视图层逻辑代码分离演示 */
|
||||||
start() {
|
start() {
|
||||||
// var entity = this.ent as ecs.Entity; // ecs.Entity 可转为当前模块的具体实体对象
|
// var entity = this.ent as ecs.Entity; // ecs.Entity 可转为当前模块的具体实体对象
|
||||||
@@ -31,7 +31,8 @@ export class MissionHomeComp extends CCComp {
|
|||||||
this.loads()
|
this.loads()
|
||||||
this.load_ui_heros()
|
this.load_ui_heros()
|
||||||
}
|
}
|
||||||
start_mission() {
|
|
||||||
|
start_mission(e:any,args:any) {
|
||||||
console.log("start_mission")
|
console.log("start_mission")
|
||||||
for(let i=0;i<this.heros.length;i++){
|
for(let i=0;i<this.heros.length;i++){
|
||||||
this.heros[i].to_destroy()
|
this.heros[i].to_destroy()
|
||||||
@@ -44,14 +45,15 @@ export class MissionHomeComp extends CCComp {
|
|||||||
{uuid:0,px:0},
|
{uuid:0,px:0},
|
||||||
{uuid:0,px:100},
|
{uuid:0,px:100},
|
||||||
]
|
]
|
||||||
|
if(args!=0){
|
||||||
|
this.load_ui_heros()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
load_ui_heros(){
|
||||||
|
for(let i=0;i<smc.vmdata.fight_heros.length;i++){
|
||||||
|
this.select_hero(smc.vmdata.fight_heros[i])
|
||||||
|
}
|
||||||
}
|
}
|
||||||
/** 全局消息逻辑处理 */
|
|
||||||
// private onHandler(event: string, args: any) {
|
|
||||||
// switch (event) {
|
|
||||||
// case ModuleEvent.Cmd:
|
|
||||||
// break;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
select_hero(h_uuid:number){
|
select_hero(h_uuid:number){
|
||||||
console.log("select_hero",h_uuid)
|
console.log("select_hero",h_uuid)
|
||||||
for(let i=0;i<4;i++){
|
for(let i=0;i<4;i++){
|
||||||
@@ -95,27 +97,31 @@ export class MissionHomeComp extends CCComp {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
|
||||||
load_ui_heros(){
|
|
||||||
for(let i=0;i<smc.vmdata.fight_heros.length;i++){
|
|
||||||
this.select_hero(smc.vmdata.fight_heros[i])
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
loads(){
|
loads(){
|
||||||
let hc:number =HeroList.length
|
let hc:number =HeroList.length
|
||||||
let parent= this.node.getChildByName("heros").getChildByName("view").getChildByName("content")
|
let parent= this.node.getChildByName("heros").getChildByName("view").getChildByName("content")
|
||||||
parent.getComponent(UITransform).width=hc*150
|
let height=Math.ceil(hc / 4)*135
|
||||||
|
parent.getComponent(UITransform).width=height
|
||||||
for (let i = 0; i < hc; i++) {
|
for (let i = 0; i < hc; i++) {
|
||||||
let hcc =ecs.getEntity<HeroSelect>(HeroSelect)
|
let hcc =ecs.getEntity<HeroSelect>(HeroSelect)
|
||||||
hcc.load(HeroList[i],parent)
|
hcc.load(HeroList[i],parent)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
show_uiheros(){
|
||||||
|
|
||||||
}
|
}
|
||||||
show_heros(){
|
show_heros(){
|
||||||
this.node.getChildByName("heros").setPosition(0,290)
|
this.node.getChildByName("heros").setPosition(0,290)
|
||||||
}
|
}
|
||||||
hide_heros(){
|
hide_heros(){
|
||||||
this.node.getChildByName("heros").setPosition(0,-400)
|
this.node.getChildByName("heros").setPosition(0,-800)
|
||||||
|
}
|
||||||
|
show_skills(){
|
||||||
|
this.node.getChildByName("skills").setPosition(0,400)
|
||||||
|
}
|
||||||
|
hide_skills(){
|
||||||
|
this.node.getChildByName("skills").setPosition(0,-800)
|
||||||
}
|
}
|
||||||
/** 视图对象通过 ecs.Entity.remove(ModuleViewComp) 删除组件是触发组件处理自定义释放逻辑 */
|
/** 视图对象通过 ecs.Entity.remove(ModuleViewComp) 删除组件是触发组件处理自定义释放逻辑 */
|
||||||
reset() {
|
reset() {
|
||||||
|
|||||||
Reference in New Issue
Block a user