diff options
author | Elizabeth Hunt <elizabeth.hunt@simponic.xyz> | 2024-03-02 01:07:55 -0700 |
---|---|---|
committer | Elizabeth Hunt <elizabeth.hunt@simponic.xyz> | 2024-03-02 01:07:55 -0700 |
commit | 1ec5a8d088f599d094f387abc6014f228607b605 (patch) | |
tree | 0d0e0271b6d5db354a56337c5de9df1a933e767b /src/engine/systems/Render.ts | |
parent | a333ce8845de4269d6a6f5523d2273da11fe271c (diff) | |
download | the-abstraction-engine-1ec5a8d088f599d094f387abc6014f228607b605.tar.gz the-abstraction-engine-1ec5a8d088f599d094f387abc6014f228607b605.zip |
add interactable component
Diffstat (limited to 'src/engine/systems/Render.ts')
-rw-r--r-- | src/engine/systems/Render.ts | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/engine/systems/Render.ts b/src/engine/systems/Render.ts index 6f539c0..7cb5d81 100644 --- a/src/engine/systems/Render.ts +++ b/src/engine/systems/Render.ts @@ -2,6 +2,7 @@ import { System, SystemNames } from "."; import { BoundingBox, ComponentNames, Sprite } from "../components"; import { Game } from ".."; import { clamp } from "../utils"; +import { DrawArgs } from "../interfaces"; export class Render extends System { private ctx: CanvasRenderingContext2D; @@ -38,10 +39,11 @@ export class Render extends System { return; } - const drawArgs = { + const drawArgs: DrawArgs = { center: boundingBox.center, dimension: boundingBox.dimension, rotation: boundingBox.rotation, + tint: entity.hasComponent(ComponentNames.Highlight) ? "red" : undefined, }; sprite.draw(this.ctx, drawArgs); |