解决 技能系统计数器造成的问题,todo:去掉局内成长设定
This commit is contained in:
@@ -26,6 +26,10 @@ export class BattleMoveSystem extends ecs.ComblockSystem implements ecs.ISystemU
|
|||||||
const newX = view.node.position.x + delta;
|
const newX = view.node.position.x + delta;
|
||||||
|
|
||||||
view.status_change("move")
|
view.status_change("move")
|
||||||
|
// 新增墓地位置判断,如果已经在墓地则不再移动
|
||||||
|
if (view.node.position.x === -1000 || view.node.position.x === 1000) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
// 限制移动范围
|
// 限制移动范围
|
||||||
if (this.validatePosition(newX, move)) {
|
if (this.validatePosition(newX, move)) {
|
||||||
view.node.setPosition(newX, view.node.position.y, 0);
|
view.node.setPosition(newX, view.node.position.y, 0);
|
||||||
|
|||||||
@@ -14,7 +14,6 @@ import { BuffComp } from "./BuffComp";
|
|||||||
import { MonModelComp } from "./MonModelComp";
|
import { MonModelComp } from "./MonModelComp";
|
||||||
import { getMonsterDrops, MonsterType } from "../common/config/RewardSet";
|
import { getMonsterDrops, MonsterType } from "../common/config/RewardSet";
|
||||||
import { HeroSkillsComp } from "../skill/heroSkillsComp";
|
import { HeroSkillsComp } from "../skill/heroSkillsComp";
|
||||||
import { DamageResult } from "../damage/DamageComp";
|
|
||||||
const { ccclass, property } = _decorator;
|
const { ccclass, property } = _decorator;
|
||||||
|
|
||||||
|
|
||||||
@@ -136,7 +135,6 @@ export class HeroViewComp extends CCComp {
|
|||||||
if (this.pwt.update(dt)) {
|
if (this.pwt.update(dt)) {
|
||||||
this.pw+=this.pws
|
this.pw+=this.pws
|
||||||
}
|
}
|
||||||
this.check_atk_counts()
|
|
||||||
this.hp_show()
|
this.hp_show()
|
||||||
if(this.ice_cd > 0){
|
if(this.ice_cd > 0){
|
||||||
this.ice_cd -=dt;
|
this.ice_cd -=dt;
|
||||||
@@ -166,7 +164,6 @@ export class HeroViewComp extends CCComp {
|
|||||||
}
|
}
|
||||||
//移动
|
//移动
|
||||||
|
|
||||||
|
|
||||||
//状态切换
|
//状态切换
|
||||||
status_change(type:string){
|
status_change(type:string){
|
||||||
this.status=type
|
this.status=type
|
||||||
@@ -180,209 +177,6 @@ export class HeroViewComp extends CCComp {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//受伤判断
|
|
||||||
check_uatk(damage:number,is_crit:boolean){
|
|
||||||
|
|
||||||
if(this.check_dodge()) return
|
|
||||||
this.in_atked();
|
|
||||||
let l_hp=damage
|
|
||||||
// this.check_debuff(skill,l_hp)
|
|
||||||
if(this.shield > 0){
|
|
||||||
this.shield -= damage
|
|
||||||
if(this.shield <= 0) {
|
|
||||||
l_hp = -this.shield
|
|
||||||
this.shield = 0
|
|
||||||
this.BUFFCOMP.show_shield(false)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
this.hp_less(l_hp,is_crit);
|
|
||||||
}
|
|
||||||
hp_less(hp: number,is_crit:boolean=false,delay:number=0){
|
|
||||||
if(this.is_dead) return
|
|
||||||
hp=Math.floor(hp)
|
|
||||||
this.hp -= hp
|
|
||||||
if(is_crit){
|
|
||||||
this.BUFFCOMP.tooltip(4,hp.toFixed(0),250);
|
|
||||||
}else{
|
|
||||||
this.BUFFCOMP.tooltip(1,hp.toFixed(0),250);
|
|
||||||
}
|
|
||||||
if(this.hp > this.hp_max){
|
|
||||||
this.hp = this.hp_max;
|
|
||||||
}
|
|
||||||
if(this.hp <= 0){
|
|
||||||
this.dead();
|
|
||||||
this.to_grave()
|
|
||||||
this.is_dead = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 检查并处理英雄受到的减益效果(debuff)。
|
|
||||||
* 根据技能的不同减益类型,执行相应的逻辑,如冰冻、燃烧等。
|
|
||||||
*
|
|
||||||
* @param skill - 包含减益效果信息的技能对象
|
|
||||||
* @param l_hp - 可选参数,表示英雄的当前生命值,默认为0
|
|
||||||
*/
|
|
||||||
check_debuff(skill:any,l_hp:number=0){
|
|
||||||
// // console.log(this.hero_name+this.uuid+": skillname: "+skill.s_name+" :check_debuff "+skill.debuff);
|
|
||||||
// if(skill.debuff == 0) return
|
|
||||||
// let num=RandomManager.instance.getRandomInt(0,100)
|
|
||||||
// switch (skill.debuff){
|
|
||||||
// case 1:
|
|
||||||
// // console.log(this.hero_name+":"+this.uuid+"冰冻触判断: i="+num+":rate="+skill.rate);
|
|
||||||
// if(num > skill.depb) return
|
|
||||||
// // console.log(this.hero_name+":"+this.uuid+"冰冻触成功: i="+num+":debtime="+skill.debtime);
|
|
||||||
// this.ice_cd = skill.debtime
|
|
||||||
// this.BUFFCOMP.in_iced(skill.debtime)
|
|
||||||
// break;
|
|
||||||
// case 2:
|
|
||||||
// if(num > skill.depb) return
|
|
||||||
// // console.log(this.hero_name+":"+this.uuid+"debuff触发成功: i="+num+":debtime="+skill.debtime+":l_hp="+l_hp);
|
|
||||||
// this.BUFFCOMP.in_fired(skill.debtime,l_hp*skill.derate/100)
|
|
||||||
// break;
|
|
||||||
// case 3:
|
|
||||||
// if(num > skill.depb) return
|
|
||||||
// this.yun_cd = skill.debtime
|
|
||||||
// this.BUFFCOMP.in_yun(skill.debtime)
|
|
||||||
// break;
|
|
||||||
// case 4:
|
|
||||||
// if(num > skill.depb) return
|
|
||||||
// this.BUFFCOMP.buff_get("deap")
|
|
||||||
// this.ap = this.ap-Math.floor(l_hp*skill.derate/100)
|
|
||||||
// break;
|
|
||||||
// case 5:
|
|
||||||
// if(num > skill.depb) return
|
|
||||||
// break;
|
|
||||||
// case 6:
|
|
||||||
// if(num > skill.depb) return
|
|
||||||
// break;
|
|
||||||
// case 7:
|
|
||||||
// if(num > skill.depb) return
|
|
||||||
// break;
|
|
||||||
// case 8:
|
|
||||||
// if(num > skill.depb) return
|
|
||||||
// if(this.node.position.x > 300||this.node.position.x < -300) return
|
|
||||||
// tween(this.node).to( 0.1,
|
|
||||||
// { position: new Vec3(this.node.position.x-this.scale*50,this.node.position.y) },
|
|
||||||
// { }
|
|
||||||
// ).start();
|
|
||||||
// break;
|
|
||||||
// }
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//暴击判断
|
|
||||||
/**
|
|
||||||
* 检查是否触发暴击,并执行相应的暴击效果。
|
|
||||||
* @returns {boolean} 如果触发暴击则返回 true,否则返回 false。
|
|
||||||
* 该方法首先通过 RandomManager 获取一个随机数,如果该随机数小于当前暴击最大值(crit),
|
|
||||||
* 则触发暴击效果,包括显示暴击提示、增加暴击计数、增加暴击经验以及增加暴击威力。
|
|
||||||
* 如果未触发暴击,则直接返回 false。
|
|
||||||
*/
|
|
||||||
check_crit():boolean
|
|
||||||
{
|
|
||||||
let i = RandomManager.instance.getRandomInt(0,100,3)
|
|
||||||
if(i < this.crit){
|
|
||||||
// this.BUFFCOMP.tooltip(5,"*会心一击*");
|
|
||||||
this.crit_count += 1
|
|
||||||
this.exp_add(this.cexp) // 暴击经验
|
|
||||||
this.power_add(this.cpw)
|
|
||||||
return true
|
|
||||||
}else{
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
//闪避判断
|
|
||||||
/**
|
|
||||||
* 检查并处理角色的闪避逻辑。
|
|
||||||
* 生成一个随机数,如果小于角色的最大闪避值,则触发闪避效果,增加经验、能量,并更新闪避计数。
|
|
||||||
* @returns {boolean} 如果触发闪避则返回true,否则返回false。
|
|
||||||
*/
|
|
||||||
check_dodge():boolean
|
|
||||||
{
|
|
||||||
let i = RandomManager.instance.getRandomInt(0,100,3)
|
|
||||||
if(this.dodge > GameSet.DODGE_MAX) this.dodge = GameSet.DODGE_MAX
|
|
||||||
if(i < this.dodge){
|
|
||||||
// console.log("闪避触发: i="+i+":dodge="+dodge);
|
|
||||||
this.BUFFCOMP.tooltip(5,"闪避");
|
|
||||||
this.exp_add(this.doexp) // 闪避经验
|
|
||||||
this.power_add(this.dopw)
|
|
||||||
this.dodge_count += 1
|
|
||||||
return true
|
|
||||||
}else{
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* 检查并处理角色的攻击、闪避、暴击和受伤计数。
|
|
||||||
* 当计数达到一定值时,会触发相应的技能效果,并重置计数。
|
|
||||||
* 触发效果包括激活名为"max"的节点,并在0.8秒后关闭。
|
|
||||||
* 使用do_skill方法处理触发的技能。
|
|
||||||
*/
|
|
||||||
check_atk_counts() {
|
|
||||||
// if (this.atk_count >= this.akc) {
|
|
||||||
// this.atk_count = 0
|
|
||||||
// // console.log("atk_count 清零:"+this.atk_count);
|
|
||||||
// let i = RandomManager.instance.getRandomInt(0,100,3)
|
|
||||||
// // console.log("攻击判断: i="+i+":akr="+this.akr);
|
|
||||||
// if(i < this.akr){
|
|
||||||
// // console.log("攻击触发: i="+i+":akr="+this.akr);
|
|
||||||
// // this.BUFFCOMP.max_show()
|
|
||||||
// this.do_skill(this.sk3)
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// if(this.dodge_count >= this.dgc){
|
|
||||||
// this.dodge_count = 0
|
|
||||||
// // console.log("dodge_count 清零:"+this.dodge_count);
|
|
||||||
// let i = RandomManager.instance.getRandomInt(0,100,3)
|
|
||||||
// // console.log("闪避判断: i="+i+":dgr="+this.dgr);
|
|
||||||
// if(i < this.dgr){
|
|
||||||
// // console.log("闪避触发: i="+i+":dgr="+this.dgr);
|
|
||||||
// // this.BUFFCOMP.max_show()
|
|
||||||
// this.do_skill(this.sk3)
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// if(this.crit_count >= this.crc){
|
|
||||||
// this.crit_count = 0
|
|
||||||
// // console.log("crit_count 清零:"+this.crit_count);
|
|
||||||
// let i = RandomManager.instance.getRandomInt(0,100,3)
|
|
||||||
// // console.log("暴击判断: i="+i+":crr="+this.crr);
|
|
||||||
// if(i < this.crr){
|
|
||||||
// // console.log("暴击触发: i="+i+":crr="+this.crr);
|
|
||||||
|
|
||||||
// // this.BUFFCOMP.max_show()
|
|
||||||
// this.do_skill(this.sk3)
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// if(this.atked_count >= this.uac){
|
|
||||||
// this.atked_count = 0
|
|
||||||
// let i = RandomManager.instance.getRandomInt(0,100,3)
|
|
||||||
// // console.log("受伤判断:i="+i+":akr="+this.uar);
|
|
||||||
// if(i < this.uar){
|
|
||||||
// // console.log("受伤触发: i="+i+":uar="+this.uar);
|
|
||||||
// // this.BUFFCOMP.max_show()
|
|
||||||
// this.do_skill(this.sk3)
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
}
|
|
||||||
|
|
||||||
//使用max_skill
|
|
||||||
do_skill(skill:number){
|
|
||||||
// this.at = 0; //共享普攻攻击cd
|
|
||||||
this.BUFFCOMP.tooltip(3,SkillSet[skill].name,skill);
|
|
||||||
if(SkillSet[skill].flash){
|
|
||||||
this.as.max()
|
|
||||||
this.scheduleOnce(()=>{
|
|
||||||
this.BUFFCOMP.show_do_buff(SkillSet[skill].fname)
|
|
||||||
},0.1)
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
shoot_enemy(sk:number,y:number=0,x:number=0){
|
|
||||||
// console.log("mon shoot_enemy");
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
exp_add(exp:number=0){
|
exp_add(exp:number=0){
|
||||||
if(this.box_group==BoxSet.HERO){
|
if(this.box_group==BoxSet.HERO){
|
||||||
@@ -482,13 +276,6 @@ export class HeroViewComp extends CCComp {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
in_atked() {
|
|
||||||
this.BUFFCOMP.in_atked()
|
|
||||||
// this.as.atked();
|
|
||||||
this.atked_count++;
|
|
||||||
this.exp_add(this.uaexp)
|
|
||||||
this.power_add(this.uapw)
|
|
||||||
}
|
|
||||||
dead(){
|
dead(){
|
||||||
this.BUFFCOMP.dead()
|
this.BUFFCOMP.dead()
|
||||||
this.exp_add(this.dexp)
|
this.exp_add(this.dexp)
|
||||||
@@ -524,7 +311,8 @@ export class HeroViewComp extends CCComp {
|
|||||||
}
|
}
|
||||||
//进入墓地
|
//进入墓地
|
||||||
to_grave(){
|
to_grave(){
|
||||||
let pos =v3(0,-1000,this.node.position.z)
|
let pos =v3(-1000,this.node.position.y,this.node.position.z)
|
||||||
|
if(this.fac==1) pos.x=1000
|
||||||
this.node.setPosition(pos)
|
this.node.setPosition(pos)
|
||||||
}
|
}
|
||||||
//是否在墓地
|
//是否在墓地
|
||||||
@@ -565,15 +353,15 @@ export class HeroViewComp extends CCComp {
|
|||||||
const skills = this.ent.get(HeroSkillsComp);
|
const skills = this.ent.get(HeroSkillsComp);
|
||||||
skills.resetAllCooldowns();
|
skills.resetAllCooldowns();
|
||||||
}
|
}
|
||||||
applyDamage(result:DamageResult){
|
|
||||||
|
|
||||||
}
|
|
||||||
/** 显示伤害数字 */
|
/** 显示伤害数字 */
|
||||||
|
|
||||||
showDamage(damage: number, isCrit: boolean) {
|
showDamage(damage: number, isCrit: boolean) {
|
||||||
if(!this.BUFFCOMP.isValid){
|
this.BUFFCOMP.in_atked()
|
||||||
return;
|
// this.as.atked();
|
||||||
}
|
this.atked_count++;
|
||||||
|
this.exp_add(this.uaexp)
|
||||||
|
this.power_add(this.uapw)
|
||||||
if(isCrit){
|
if(isCrit){
|
||||||
this.BUFFCOMP.tooltip(4,damage.toFixed(0),damage)
|
this.BUFFCOMP.tooltip(4,damage.toFixed(0),damage)
|
||||||
console.log("暴击伤害:"+damage)
|
console.log("暴击伤害:"+damage)
|
||||||
|
|||||||
@@ -21,6 +21,9 @@ import { UIID } from "../common/config/GameUIConfig";
|
|||||||
import { CardControllerComp } from "./CardController";
|
import { CardControllerComp } from "./CardController";
|
||||||
import { MissionHomeComp } from "./MissionHomeComp";
|
import { MissionHomeComp } from "./MissionHomeComp";
|
||||||
import { GameEvent } from "../common/config/GameEvent";
|
import { GameEvent } from "../common/config/GameEvent";
|
||||||
|
import { HeroSkillsComp } from "../skill/heroSkillsComp";
|
||||||
|
import { HeroViewComp } from "../hero/HeroViewComp";
|
||||||
|
import { HeroSkillSystem } from "../skill/HeroSkillSystem";
|
||||||
const { ccclass, property } = _decorator;
|
const { ccclass, property } = _decorator;
|
||||||
|
|
||||||
/** 视图层对象 */
|
/** 视图层对象 */
|
||||||
@@ -82,30 +85,19 @@ export class MissionComp extends CCComp {
|
|||||||
oops.message.dispatchEvent(GameEvent.MissionEnd)
|
oops.message.dispatchEvent(GameEvent.MissionEnd)
|
||||||
smc.mission.play=false
|
smc.mission.play=false
|
||||||
smc.mission.pause=false
|
smc.mission.pause=false
|
||||||
let heros:any= this.get_heros();;
|
|
||||||
let monsters:any= this.get_mons();
|
|
||||||
let hcards:any= ecs.query(ecs.allOf(HCardComp));
|
|
||||||
let rewards:any= ecs.query(ecs.allOf(ItemComp));
|
|
||||||
// let hcns=this.node.getChildByName("hcards")
|
|
||||||
// for(let i=0;i<hcns.children.length;i++){
|
|
||||||
// hcns.children[i].destroy()
|
|
||||||
// }
|
|
||||||
for(let i=0;i<heros.length;i++){
|
|
||||||
heros[i].HeroView.reset()
|
|
||||||
heros[i].HeroView.ent.destroy()
|
|
||||||
}
|
|
||||||
for(let i=0;i<hcards.length;i++){
|
|
||||||
hcards[i].HCardComp.reset()
|
|
||||||
hcards[i].HCardComp.ent.destroy()
|
|
||||||
}
|
|
||||||
for(let i=0;i<monsters.length;i++){
|
|
||||||
monsters[i].HeroView.reset()
|
|
||||||
monsters[i].HeroView.ent.destroy()
|
|
||||||
}
|
|
||||||
|
|
||||||
|
this.cleanComponents()
|
||||||
// this.to_mission_home()
|
// this.to_mission_home()
|
||||||
this.open_victory()
|
this.open_victory()
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
private cleanComponents() {
|
||||||
|
ecs.query(ecs.allOf(HeroSkillsComp)).forEach(entity => {entity.remove(HeroSkillsComp);entity.destroy()});
|
||||||
|
ecs.query(ecs.allOf(HCardComp)).forEach(entity => {entity.remove(HCardComp);entity.destroy()});
|
||||||
|
ecs.query(ecs.allOf(HeroViewComp)).forEach(entity => {entity.remove(HeroViewComp);entity.destroy()});
|
||||||
|
}
|
||||||
|
|
||||||
open_victory(){
|
open_victory(){
|
||||||
this.node.getChildByName("victory").active=true
|
this.node.getChildByName("victory").active=true
|
||||||
this.node.getChildByName("victory").getComponent(VictoryComp).open()
|
this.node.getChildByName("victory").getComponent(VictoryComp).open()
|
||||||
@@ -129,29 +121,6 @@ export class MissionComp extends CCComp {
|
|||||||
smc.vmdata.mission.exp=0 //局内经验
|
smc.vmdata.mission.exp=0 //局内经验
|
||||||
smc.vmdata.mission.mexp=0 //敌方局内经验
|
smc.vmdata.mission.mexp=0 //敌方局内经验
|
||||||
smc.vmdata.mission.exp_max= smc.vmdata.mission.mexp_max=MBSet.exp
|
smc.vmdata.mission.exp_max= smc.vmdata.mission.mexp_max=MBSet.exp
|
||||||
smc.vmdata.mission.ap=0
|
|
||||||
smc.vmdata.mission.hp=0
|
|
||||||
smc.vmdata.mission.def=0
|
|
||||||
smc.vmdata.mission.crit=0
|
|
||||||
smc.vmdata.mission.dodge=0
|
|
||||||
smc.vmdata.mission.dead=0
|
|
||||||
smc.vmdata.mission.map=0
|
|
||||||
smc.vmdata.mission.mhp=0
|
|
||||||
smc.vmdata.mission.mdef=0
|
|
||||||
smc.vmdata.mission.mcrit=0
|
|
||||||
smc.vmdata.mission.mdead=0
|
|
||||||
smc.vmdata.mission.mdodge=0
|
|
||||||
// smc.vmdata.mission.ap_up=0
|
|
||||||
// smc.vmdata.mission.hp_up=0
|
|
||||||
// smc.vmdata.mission.def_up=0
|
|
||||||
// smc.vmdata.mission.crit_up=0
|
|
||||||
// smc.vmdata.mission.dodge_up=0
|
|
||||||
// smc.vmdata.mission.map_up=0
|
|
||||||
// smc.vmdata.mission.mhp_up=0
|
|
||||||
// smc.vmdata.mission.mdef_up=0
|
|
||||||
// smc.vmdata.mission.mcrit_up=0
|
|
||||||
// smc.vmdata.mission.mdodge_up=0
|
|
||||||
// this.clear_x1()
|
|
||||||
}
|
}
|
||||||
clear_x1(){
|
clear_x1(){
|
||||||
for (let i in smc.items) {
|
for (let i in smc.items) {
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import { HeroSkillsComp } from "./heroSkillsComp";
|
|||||||
import { SkillSet, TargetGroup, TargetType } from "../common/config/SkillSet";
|
import { SkillSet, TargetGroup, TargetType } from "../common/config/SkillSet";
|
||||||
import { CdType } from "../common/config/SkillSet";
|
import { CdType } from "../common/config/SkillSet";
|
||||||
import { oops } from "db://oops-framework/core/Oops";
|
import { oops } from "db://oops-framework/core/Oops";
|
||||||
|
import { GameEvent } from "../common/config/GameEvent";
|
||||||
|
|
||||||
|
|
||||||
/** 技能系统 */
|
/** 技能系统 */
|
||||||
@@ -13,11 +14,14 @@ export class HeroSkillSystem extends ecs.ComblockSystem implements ecs.ISystemUp
|
|||||||
private updateInterval: number = 0.1; // 每0.1秒更新一次
|
private updateInterval: number = 0.1; // 每0.1秒更新一次
|
||||||
private accumulator: number = 0;
|
private accumulator: number = 0;
|
||||||
private _timers: { [key: string]: number } = {};
|
private _timers: { [key: string]: number } = {};
|
||||||
|
init(): void {
|
||||||
|
oops.message.on(GameEvent.MissionEnd, this.clear_timer, this);
|
||||||
|
}
|
||||||
filter(): ecs.IMatcher {
|
filter(): ecs.IMatcher {
|
||||||
return ecs.allOf(HeroSkillsComp, HeroViewComp);
|
return ecs.allOf(HeroSkillsComp, HeroViewComp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
update(e: ecs.Entity) {
|
update(e: ecs.Entity) {
|
||||||
const view = e.get(HeroViewComp);
|
const view = e.get(HeroViewComp);
|
||||||
const skills = e.get(HeroSkillsComp);
|
const skills = e.get(HeroSkillsComp);
|
||||||
@@ -282,6 +286,12 @@ export class HeroSkillSystem extends ecs.ComblockSystem implements ecs.ISystemUp
|
|||||||
// 剩余伤害扣除血量
|
// 剩余伤害扣除血量
|
||||||
if (remainingDamage > 0) {
|
if (remainingDamage > 0) {
|
||||||
view.hp -= remainingDamage;
|
view.hp -= remainingDamage;
|
||||||
|
if(view.hp<=0) {
|
||||||
|
view.BUFFCOMP.dead()
|
||||||
|
view.exp_add(view.dexp)
|
||||||
|
view.to_grave();
|
||||||
|
}
|
||||||
|
|
||||||
view.showDamage(result.value, result.isCrit);
|
view.showDamage(result.value, result.isCrit);
|
||||||
}else{
|
}else{
|
||||||
view.BUFFCOMP.tooltip(5,"*吸收*");
|
view.BUFFCOMP.tooltip(5,"*吸收*");
|
||||||
@@ -305,11 +315,15 @@ export class HeroSkillSystem extends ecs.ComblockSystem implements ecs.ISystemUp
|
|||||||
}, delay * 1000);
|
}, delay * 1000);
|
||||||
this._timers[timer] = timer;
|
this._timers[timer] = timer;
|
||||||
}
|
}
|
||||||
|
public clear_timer() {
|
||||||
|
console.log("clear_timer");
|
||||||
|
Object.values(this._timers).forEach(clearTimeout);
|
||||||
|
}
|
||||||
onDestroy() {
|
onDestroy() {
|
||||||
Object.values(this._timers).forEach(clearTimeout);
|
Object.values(this._timers).forEach(clearTimeout);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/** 应用负面状态 */
|
/** 应用负面状态 */
|
||||||
private applyDebuff(target: ecs.Entity, config: typeof SkillSet[keyof typeof SkillSet]) {
|
private applyDebuff(target: ecs.Entity, config: typeof SkillSet[keyof typeof SkillSet]) {
|
||||||
// 实现debuff逻辑...
|
// 实现debuff逻辑...
|
||||||
|
|||||||
Reference in New Issue
Block a user