This commit is contained in:
honmono
2022-03-22 15:35:41 +08:00
parent 91e741a895
commit c7d30bc03b
16 changed files with 531 additions and 125 deletions

View File

@@ -5,11 +5,19 @@ import { ECSComponent } from "../lib/ECSComponent";
export class ComAttackable {
public duration: number; // 攻击持续时间
public countDown: number; // 攻击剩余时间
public hurtFrame: number; // 攻击帧
public mustAttackFrame: number;
public hurted: boolean;
public dirty: boolean; //
public attack: number; // 攻击力
public willHurtFrame: number; // 即将攻击
public willHurtFrameCompleted: boolean; // 即将攻击完成
public hurtFrame: number; // 攻击
public hurtFrameCompleted: boolean; // 攻击完成
public attack: number; // 攻击力
public hurtArea: cc.Vec2; // 攻击区域
public debugInfo: any;
public willHurts: number[] = [];
}

View File

@@ -1,7 +1,7 @@
import { ComType } from "../lib/Const";
import { ComType, EntityIndex } from "../lib/Const";
import { ECSComponent } from "../lib/ECSComponent";
@ECSComponent(ComType.ComBeAttacked)
export class ComBeAttacked {
public attacker: EntityIndex = -1;
}

View File

@@ -4,7 +4,9 @@ import { ECSComponent } from "../lib/ECSComponent";
@ECSComponent(ComType.ComMonitor)
export class ComMonitor {
public lookLen = 0;
public lookSize = 0;
public lookWidth = 0;
public outLen = 0;
public aroundLen = 0;
public others: EntityIndex[] = [];
public debugInfo: any;
}

View File

@@ -8,5 +8,7 @@ export class ComMovable {
public points: cc.Vec2[] = [];
public pointIdx = 0;
public keepDir = false;
public speedDirty = false;
}