战斗系统 重构继续
This commit is contained in:
@@ -6,8 +6,8 @@ import { GameEvent } from '../common/config/GameEvent';
|
||||
import { FacSet } from '../common/config/BoxSet';
|
||||
import { smc } from '../common/SingletonModuleComp';
|
||||
import { CCComp } from 'db://oops-framework/module/common/CCComp';
|
||||
import { MonModelComp } from './MonModelComp';
|
||||
import { HeroModelComp } from './HeroModelComp';
|
||||
import { MonAttrsComp } from './MonAttrsComp';
|
||||
import { HeroAttrsComp } from './HeroAttrsComp';
|
||||
import { SkillEnt } from '../skill/SkillEnt';
|
||||
import { Attrs } from '../common/config/HeroAttrs';
|
||||
import { TalComp } from './TalComp';
|
||||
@@ -18,7 +18,6 @@ const { ccclass, property } = _decorator;
|
||||
export class SkillConComp extends CCComp {
|
||||
HeroView:any=null;
|
||||
HeroEntity:any=null;
|
||||
TALCOMP:any=null;
|
||||
skill_cd=0
|
||||
private _timers: { [key: string]: any } = {};
|
||||
init(): void {
|
||||
@@ -26,7 +25,6 @@ export class SkillConComp extends CCComp {
|
||||
}
|
||||
onLoad(){
|
||||
this.HeroView=this.node.getComponent(HeroViewComp)
|
||||
this.TALCOMP=this.node.getComponent(TalComp)
|
||||
}
|
||||
start() {
|
||||
this.HeroEntity=this.HeroView.ent
|
||||
@@ -109,9 +107,9 @@ export class SkillConComp extends CCComp {
|
||||
|
||||
check_target(){
|
||||
if(this.HeroView.fac==FacSet.HERO){
|
||||
return ecs.query(ecs.allOf(MonModelComp))
|
||||
return ecs.query(ecs.allOf(MonAttrsComp))
|
||||
}else{
|
||||
return ecs.query(ecs.allOf(HeroModelComp))
|
||||
return ecs.query(ecs.allOf(HeroAttrsComp))
|
||||
}
|
||||
}
|
||||
get_front(entities:any){
|
||||
|
||||
Reference in New Issue
Block a user