伤害系统 + 战斗管理系统
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { Vec3, _decorator , v3,Collider2D,Contact2DType,Label ,Node,Prefab,instantiate,ProgressBar, Component, Material, Sprite, math, clamp, Game, tween} from "cc";
|
||||
import { Vec3, _decorator , v3,Collider2D,Contact2DType,Label ,Node,Prefab,instantiate,ProgressBar, Component, Material, Sprite, math, clamp, Game, tween, Color} from "cc";
|
||||
import { ecs } from "../../../../extensions/oops-plugin-framework/assets/libs/ecs/ECS";
|
||||
import { CCComp } from "../../../../extensions/oops-plugin-framework/assets/module/common/CCComp";
|
||||
import { HeroSpine } from "./HeroSpine";
|
||||
@@ -571,4 +571,13 @@ export class HeroViewComp extends CCComp {
|
||||
const skills = this.ent.get(HeroSkillsComp);
|
||||
skills.resetAllCooldowns();
|
||||
}
|
||||
|
||||
/** 显示伤害数字 */
|
||||
showDamage(damage: number, isCrit: boolean) {
|
||||
if(isCrit){
|
||||
this.BUFFCOMP.tooltip(4,damage.toFixed(0),damage)
|
||||
}else{
|
||||
this.BUFFCOMP.tooltip(1,damage.toFixed(0),damage)
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user