mirror of
				https://github.com/kirikayakazuto/CocosCreator_ECS
				synced 2025-10-30 19:05:52 +00:00 
			
		
		
		
	update
This commit is contained in:
		| @@ -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[] = []; | ||||
| } | ||||
| @@ -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; | ||||
| } | ||||
| @@ -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; | ||||
| } | ||||
| @@ -8,5 +8,7 @@ export class ComMovable { | ||||
|     public points: cc.Vec2[] = []; | ||||
|     public pointIdx = 0; | ||||
|  | ||||
|     public keepDir = false; | ||||
|  | ||||
|     public speedDirty = false; | ||||
| } | ||||
		Reference in New Issue
	
	Block a user