feat: projectile system for throwing elements (Phase 4.5)
F key launches first inventory item toward mouse cursor as projectile. Projectiles travel at 350px/s, expire after 2s, destroyed on hitting non-walkable tiles. Color matches element's periodic table color. 13 new tests (198 total). Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -45,3 +45,8 @@ export const Resource = {
|
||||
quantity: [] as number[], // remaining items to collect
|
||||
interactRange: [] as number[], // max interaction distance in pixels
|
||||
};
|
||||
|
||||
/** Thrown element/compound projectile */
|
||||
export const Projectile = {
|
||||
lifetime: [] as number[], // remaining lifetime in ms (removed at 0)
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user