新hero 基本完成
This commit is contained in:
@@ -81,7 +81,6 @@ export class CardControllerComp extends CCComp {
|
||||
// }
|
||||
// }
|
||||
touch1(event: EventTouch) {
|
||||
console.log("touch 1");
|
||||
this.in_touch=true
|
||||
if(this.in_load)return
|
||||
if(!this.cards[1].alive)return
|
||||
@@ -89,7 +88,6 @@ export class CardControllerComp extends CCComp {
|
||||
}
|
||||
|
||||
touch2(event: EventTouch) {
|
||||
console.log("touch 2");
|
||||
this.in_touch=true
|
||||
if(this.in_load)return
|
||||
if(!this.cards[2].alive)return
|
||||
@@ -97,7 +95,6 @@ export class CardControllerComp extends CCComp {
|
||||
}
|
||||
|
||||
touch3(event: EventTouch) {
|
||||
console.log("touch 3");
|
||||
this.in_touch=true
|
||||
if(this.in_load)return
|
||||
if(!this.cards[3].alive)return
|
||||
@@ -105,7 +102,6 @@ export class CardControllerComp extends CCComp {
|
||||
}
|
||||
|
||||
touch4(event: EventTouch) {
|
||||
console.log("touch 4");
|
||||
this.in_touch=true
|
||||
if(this.in_load)return
|
||||
if(!this.cards[4].alive)return
|
||||
@@ -113,7 +109,6 @@ export class CardControllerComp extends CCComp {
|
||||
}
|
||||
|
||||
touch5(event: EventTouch) {
|
||||
console.log("touch 5");
|
||||
this.in_touch=true
|
||||
if(this.in_load)return
|
||||
if(!this.cards[5].alive)return
|
||||
@@ -121,44 +116,37 @@ export class CardControllerComp extends CCComp {
|
||||
}
|
||||
|
||||
touch6(event: EventTouch) {
|
||||
console.log("touch 6");
|
||||
this.in_touch=true
|
||||
if(this.in_load)return
|
||||
if(!this.cards[6].alive)return
|
||||
this.show_info(this.cards[6].uuid,this.cards[6].type)
|
||||
}
|
||||
end1(event: EventTouch) {
|
||||
console.log("end1 1");
|
||||
this.onTouchEnd(1)
|
||||
}
|
||||
|
||||
end2(event: EventTouch) {
|
||||
console.log("end2 2");
|
||||
this.onTouchEnd(2)
|
||||
}
|
||||
|
||||
end3(event: EventTouch) {
|
||||
console.log("end3 3");
|
||||
this.onTouchEnd(3)
|
||||
}
|
||||
|
||||
end4(event: EventTouch) {
|
||||
console.log("end4 4");
|
||||
this.onTouchEnd(4)
|
||||
}
|
||||
|
||||
end5(event: EventTouch) {
|
||||
console.log("end5 5");
|
||||
this.onTouchEnd(5)
|
||||
}
|
||||
|
||||
end6(event: EventTouch) {
|
||||
console.log("end6 6");
|
||||
this.onTouchEnd(6)
|
||||
}
|
||||
|
||||
show_info(uuid:number,type:number){
|
||||
console.log("show_info",uuid)
|
||||
// console.log("show_info",uuid)
|
||||
let node =this.node.getChildByName("item_box")
|
||||
if(type == 2){
|
||||
smc.vm_data.item_box.info = SkillSet[uuid].info
|
||||
@@ -170,7 +158,6 @@ export class CardControllerComp extends CCComp {
|
||||
node.active=true
|
||||
}
|
||||
if(type == 3){
|
||||
console.log(SkillSet[uuid])
|
||||
smc.vm_data.item_box.info = SkillSet[uuid].info
|
||||
smc.vm_data.item_box.name = SkillSet[uuid].name
|
||||
smc.vm_data.item_box.skillcd = SkillSet[uuid].cd
|
||||
@@ -243,11 +230,16 @@ export class CardControllerComp extends CCComp {
|
||||
smc.vm_data.shuaxin.min = 0
|
||||
}
|
||||
}
|
||||
|
||||
get_card_list(li:number){
|
||||
let list = RandomManager.instance.getRandomByObjectList(CardList[li], 1);
|
||||
return list
|
||||
}
|
||||
load_cards() {
|
||||
this.in_load = true
|
||||
let card:any=null
|
||||
for (let index = 1; index <= 6; index++) {
|
||||
card=RandomManager.instance.getRandomByObjectList(CardList, 1);
|
||||
card=RandomManager.instance.getRandomByObjectList(CardList[index], 1);
|
||||
this.cards[index].uuid=card[0].uuid
|
||||
this.cards[index].type=card[0].type
|
||||
|
||||
@@ -258,8 +250,8 @@ export class CardControllerComp extends CCComp {
|
||||
let { uuid, type } = card[0];
|
||||
switch (type) {
|
||||
case 1:
|
||||
url = "game/heros/heros";
|
||||
({ path: pathName, name, level } = smc.heros[uuid]);
|
||||
url = "game/hero/hero_icon";
|
||||
({ uuid: pathName, name, level } = smc.heros[uuid]);
|
||||
break;
|
||||
case 2:
|
||||
url = "game/heros/skill";
|
||||
@@ -271,7 +263,6 @@ export class CardControllerComp extends CCComp {
|
||||
({ path: pathName, name, level } = smc.skills[uuid]);
|
||||
}
|
||||
this.cards[index].lv=level
|
||||
console.log("load_cards:",url,pathName,name,level)
|
||||
let node=this.node.getChildByName('cards').getChildByName('card'+index)
|
||||
node.getChildByName('cost').getComponent(Label).string=level.toString()
|
||||
node.getChildByName('name').getComponent(Label).string=name
|
||||
@@ -352,10 +343,6 @@ export class CardControllerComp extends CCComp {
|
||||
}
|
||||
}
|
||||
|
||||
get_card_list(){
|
||||
let list = RandomManager.instance.getRandomByObjectList(CardList, 1);
|
||||
return list
|
||||
}
|
||||
|
||||
/** 视图对象通过 ecs.Entity.remove(ControllerComp) 删除组件是触发组件处理自定义释放逻辑 */
|
||||
reset() {
|
||||
|
||||
@@ -10,10 +10,9 @@ import { MapViewScene } from "./view/MapViewScene";
|
||||
import { MissionSet,MissionNum,MonsetList } from "../common/config/MissionSet";
|
||||
import { RandomManager } from "../../../../extensions/oops-plugin-framework/assets/core/common/random/RandomManager";
|
||||
import { Role } from "../Role/Role";
|
||||
import { Hero } from "../monster/Hero";
|
||||
import { HeroModelComp } from "../monster/HeroModelComp";
|
||||
import { Hero } from "../hero/Hero";
|
||||
import { HeroModelComp } from "../hero/HeroModelComp";
|
||||
import { MonsterModelComp } from "../monster/MonsterModelComp";
|
||||
import { MonsterViewComp } from "../monster/MonsterViewComp";
|
||||
import { Mon } from "../mon/Mon";
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user