dd
This commit is contained in:
@@ -18,6 +18,7 @@ import { oops } from "../../../../extensions/oops-plugin-framework/assets/core/O
|
||||
import { baseCom } from "../skills/baseCom";
|
||||
import { Skill } from "../skills/Skill";
|
||||
import { Timer } from "../../../../extensions/oops-plugin-framework/assets/core/common/timer/Timer";
|
||||
import { SkillCom } from "../skills/SkillCom";
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
/** 角色显示组件 */
|
||||
@@ -27,6 +28,7 @@ export class MonsterViewComp extends CCComp {
|
||||
/** 角色动画 */
|
||||
as: MonsterSpine = null!;
|
||||
hero_name : string = "hero";
|
||||
level:number =1;
|
||||
camp: number = 1; /** 角色阵营 1:hero -1 :monster */
|
||||
type: number = 1; /**角色类型 1:前排 2 后排 */
|
||||
state: number = 1; /** 状态 1:move ,2: act 3: stop */
|
||||
@@ -90,8 +92,10 @@ export class MonsterViewComp extends CCComp {
|
||||
// }
|
||||
onPostSolve (selfCollider: Collider2D, otherCollider: Collider2D, contact: IPhysics2DContact | null) {
|
||||
if(otherCollider.group== BoxSet.HERO_SKILL || otherCollider.group== BoxSet.MONSTER_SKILL){
|
||||
let skill = otherCollider.node.getComponent(SkillCom)!;
|
||||
// console.log('onPostSolve',skill);
|
||||
this.in_atked();
|
||||
this.hp_change(10);
|
||||
this.hp_change(skill.atk);
|
||||
}
|
||||
// switch (selfCollider.group) {
|
||||
// case BoxSet.HERO:
|
||||
|
||||
Reference in New Issue
Block a user