cocos_scaffold_enemy_ai
Generate starter TypeScript files for enemy AI behaviors in Cocos Creator projects, including patrol, chase, and shooting patterns with configurable properties.
Instructions
Generate Enemy{Kind}.ts — common enemy-behaviour starters.
"patrol" — oscillates between @property Nodes patrolA ↔ patrolB. Flips optional @property mirrorSprite on direction change. Exposes @property speed. "chase" — tracks @property target Node when within chaseRadius; gives up past loseAggroRadius (hysteresis prevents aggro flicker). Kinematic setPosition update. @property moveSpeed. "shoot" — stationary turret. Every @property fireInterval s, instantiates @property bulletPrefab with velocity toward @property target if within @property range.
Default rel_path per kind: EnemyPatrol.ts / EnemyChase.ts /
EnemyShoot.ts. Returns the usual four keys.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| project_path | Yes | ||
| kind | No | patrol | |
| rel_path | No |