diff options
author | Loek Le Blansch <loek@pipeframe.xyz> | 2025-01-07 13:04:49 +0100 |
---|---|---|
committer | Loek Le Blansch <loek@pipeframe.xyz> | 2025-01-07 13:04:49 +0100 |
commit | 6d69c8ef6b663bd6716b441cc7d01164c7e33dfc (patch) | |
tree | cbf6d4a4d7f099ca662bed00edc627212511a99e /game/prefab/ZapperObject.cpp | |
parent | 87ae4d186ad64531e96fd3e121112f2787894295 (diff) |
more WIP zapperpool
Diffstat (limited to 'game/prefab/ZapperObject.cpp')
-rw-r--r-- | game/prefab/ZapperObject.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/game/prefab/ZapperObject.cpp b/game/prefab/ZapperObject.cpp index 4055ac4..3c70d04 100644 --- a/game/prefab/ZapperObject.cpp +++ b/game/prefab/ZapperObject.cpp @@ -81,6 +81,7 @@ ZapperObject::ZapperObject(crepe::GameObject && base) })}, collider {add_component<BoxCollider>(vec2(0, 0))} { this->place(this->transform.position, 0, 300); + this->set_active(false); } void ZapperObject::place(const crepe::vec2 & position, float rotation, float length) { @@ -98,3 +99,20 @@ void ZapperObject::place(const crepe::vec2 & position, float rotation, float len this->collider.dimensions = offset.rotate(rotation) * 2 + vec2(30, 30) * SCALE; } + +void ZapperObject::set_active(bool active) { + this->sprite.orb_start.active = active; + this->sprite.orb_end.active = active; + this->sprite.glow_start.active = active; + this->sprite.glow_end.active = active; + this->sprite.beam.active = active; + + this->animator.orb_start.active = active; + this->animator.orb_end.active = active; + this->animator.glow_start.active = active; + this->animator.glow_end.active = active; + + this->body.active = active; + this->collider.active = active; +} + |