dd
This commit is contained in:
@@ -10,6 +10,8 @@ import { CardControllerComp } from "./CardController";
|
||||
import { GameEvent } from "../common/config/GameEvent";
|
||||
import { HeroSkillsComp } from "../skill/heroSkillsComp";
|
||||
import { HeroViewComp } from "../hero/HeroViewComp";
|
||||
import { Hero } from "../hero/Hero";
|
||||
import { HartModelComp } from "../hero/HartModelComp";
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
/** 视图层对象 */
|
||||
@@ -111,6 +113,8 @@ export class MissionComp extends CCComp {
|
||||
hp:0,//血量
|
||||
ap:0,//攻击
|
||||
}
|
||||
let hero = ecs.getEntity<Hero>(Hero);
|
||||
hero.hart_load()
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -12,6 +12,7 @@ import { HeroModelComp } from "../hero/HeroModelComp";
|
||||
import { HeroViewComp } from "../hero/HeroViewComp";
|
||||
import { oops } from "db://oops-framework/core/Oops";
|
||||
import { FightSet } from "../common/config/Mission";
|
||||
import { HartModelComp } from "../hero/HartModelComp";
|
||||
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
@@ -21,9 +22,9 @@ const { ccclass, property } = _decorator;
|
||||
export class MissionHeroCompComp extends CCComp {
|
||||
timer:Timer=new Timer(2)
|
||||
start_pos:any={
|
||||
0:{pos:v3(-150,135,0),has:false},
|
||||
1:{pos:v3(-270,205,0),has:false},
|
||||
2:{pos:v3(-270,65,0),has:false},
|
||||
0:{pos:v3(-50,135,0),has:false},
|
||||
1:{pos:v3(-170,205,0),has:false},
|
||||
2:{pos:v3(-170,65,0),has:false},
|
||||
}
|
||||
current_hero_uuid:number=0
|
||||
onLoad(){
|
||||
@@ -57,7 +58,7 @@ export class MissionHeroCompComp extends CCComp {
|
||||
this.node.getChildByName("location").getChildByName("herospos").getChildByName("heropos2").getChildByName("hero").active=false
|
||||
this.node.getChildByName("location").getChildByName("herospos").getChildByName("heropos3").getChildByName("hero").active=false
|
||||
|
||||
let heros=ecs.query(ecs.allOf(HeroModelComp))
|
||||
let heros=ecs.query(ecs.allOf(HeroModelComp).excludeOf(HartModelComp))
|
||||
for(let hero of heros){
|
||||
let hv = hero.get(HeroViewComp)
|
||||
if(hv.fight_pos==0){
|
||||
@@ -110,7 +111,7 @@ export class MissionHeroCompComp extends CCComp {
|
||||
|
||||
get_info_and_remove(fight_pos:number,uuid:number){
|
||||
let info:any={ap:0,hp:0,lv:0}
|
||||
let heros=ecs.query(ecs.allOf(HeroModelComp))
|
||||
let heros=ecs.query(ecs.allOf(HeroModelComp).excludeOf(HartModelComp))
|
||||
for(let hero of heros){
|
||||
if(hero.get(HeroViewComp).fight_pos==fight_pos){
|
||||
let hv = hero.get(HeroViewComp)
|
||||
|
||||
Reference in New Issue
Block a user