feat: add hexagon entity type and hook#73
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds support for a new hexagon entity type to the game's entity management system. The changes introduce the Hexagon entity type alongside its distinctive color (#35c5db) and implements a polygon hook to detect and track hexagon entities rendered on screen.
Key Changes:
- Added
Hexagonenum value toEntityTypeand corresponding color toEntityColor - Implemented
#hexagonHook()method that detects hexagons with radius 100 using a 6-sided polygon hook
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/types/entity.ts | Adds Hexagon to EntityType enum and EntityColor enum with cyan color value |
| src/extensions/entity_manager.ts | Implements hexagon detection hook following existing polygon hook pattern |
The implementation is clean and follows the established patterns in the codebase. The hexagon hook is consistent with the existing triangle, square, and pentagon hooks in structure and logic. No issues were identified during the review.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
thanks for the contribution! looks great. |
Adds a new
Hexagonentity type and its color constant.