重新 使用碰撞来处理 抛射型技能逻辑处理
This commit is contained in:
@@ -17,15 +17,18 @@ const { ccclass, property } = _decorator;
|
||||
export class MissionHeroCompComp extends CCComp {
|
||||
timer:Timer=new Timer(2)
|
||||
onLoad(){
|
||||
this.on(GameEvent.UserHeroCard,this.call_hero,this)
|
||||
// this.on(GameEvent.UserHeroCard,this.call_hero,this)
|
||||
}
|
||||
start() {
|
||||
|
||||
this.test_call()
|
||||
}
|
||||
protected update(dt: number): void {
|
||||
if(smc.mission.status != 1) return
|
||||
|
||||
}
|
||||
test_call(){
|
||||
this.addHero(5010)
|
||||
}
|
||||
call_hero(event: string, args: any){
|
||||
this.timer.reset()
|
||||
let hero_list =HeroList
|
||||
|
||||
@@ -6,6 +6,7 @@ import { BoxSet } from "../common/config/BoxSet";
|
||||
import { HeroSet } from "../common/config/heroSet";
|
||||
import { Missions } from "../common/config/MissionSet";
|
||||
import { RandomManager } from "db://oops-framework/core/common/random/RandomManager";
|
||||
import { Timer } from "db://oops-framework/core/common/timer/Timer";
|
||||
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
@@ -13,19 +14,23 @@ const { ccclass, property } = _decorator;
|
||||
@ccclass('MissionMonCompComp')
|
||||
@ecs.register('MissionMonComp', false)
|
||||
export class MissionMonCompComp extends CCComp {
|
||||
timer:Timer=new Timer(5)
|
||||
/** 视图层逻辑代码分离演示 */
|
||||
start() {
|
||||
// var entity = this.ent as ecs.Entity; // ecs.Entity 可转为当前模块的具体实体对象
|
||||
// this.on(ModuleEvent.Cmd, this.onHandler, this);
|
||||
this.test_call()
|
||||
}
|
||||
protected update(dt: number): void {
|
||||
// if(this.timer.update(dt)){
|
||||
// this.mon_refresh()
|
||||
// }
|
||||
}
|
||||
test_call(){
|
||||
this.addMonster(5202,0,true)
|
||||
}
|
||||
|
||||
/** 全局消息逻辑处理 */
|
||||
// private onHandler(event: string, args: any) {
|
||||
// switch (event) {
|
||||
// case ModuleEvent.Cmd:
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
|
||||
mon_refresh(){
|
||||
let num =3
|
||||
let t_num= Missions[0].length
|
||||
|
||||
Reference in New Issue
Block a user