局内技能选择开始,需要先完成技能设置,确定局内技能数据
This commit is contained in:
@@ -45,7 +45,7 @@ import { Talents } from "./TalentSet"
|
||||
**/
|
||||
export const HeroInfo = {
|
||||
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,
|
||||
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,
|
||||
|
||||
@@ -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:100},
|
||||
]
|
||||
|
||||
|
||||
/** 视图层逻辑代码分离演示 */
|
||||
start() {
|
||||
// var entity = this.ent as ecs.Entity; // ecs.Entity 可转为当前模块的具体实体对象
|
||||
@@ -31,7 +31,8 @@ export class MissionHomeComp extends CCComp {
|
||||
this.loads()
|
||||
this.load_ui_heros()
|
||||
}
|
||||
start_mission() {
|
||||
|
||||
start_mission(e:any,args:any) {
|
||||
console.log("start_mission")
|
||||
for(let i=0;i<this.heros.length;i++){
|
||||
this.heros[i].to_destroy()
|
||||
@@ -44,14 +45,15 @@ export class MissionHomeComp extends CCComp {
|
||||
{uuid:0,px:0},
|
||||
{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){
|
||||
console.log("select_hero",h_uuid)
|
||||
for(let i=0;i<4;i++){
|
||||
@@ -95,27 +97,31 @@ export class MissionHomeComp extends CCComp {
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
load_ui_heros(){
|
||||
for(let i=0;i<smc.vmdata.fight_heros.length;i++){
|
||||
this.select_hero(smc.vmdata.fight_heros[i])
|
||||
}
|
||||
}
|
||||
loads(){
|
||||
let hc:number =HeroList.length
|
||||
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++) {
|
||||
let hcc =ecs.getEntity<HeroSelect>(HeroSelect)
|
||||
hcc.load(HeroList[i],parent)
|
||||
}
|
||||
}
|
||||
show_uiheros(){
|
||||
|
||||
}
|
||||
show_heros(){
|
||||
this.node.getChildByName("heros").setPosition(0,290)
|
||||
this.node.getChildByName("heros").setPosition(0,290)
|
||||
}
|
||||
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) 删除组件是触发组件处理自定义释放逻辑 */
|
||||
reset() {
|
||||
|
||||
Reference in New Issue
Block a user