diff options
| author | Loek Le Blansch <loek@pipeframe.xyz> | 2024-12-22 20:04:33 +0100 | 
|---|---|---|
| committer | Loek Le Blansch <loek@pipeframe.xyz> | 2024-12-22 20:04:33 +0100 | 
| commit | a600cc55468a6513743ce916aa3da129270c23f0 (patch) | |
| tree | 324eb574298b321dcfba69a5a29c59b0cc18f007 /game/prefab/ZapperScript.cpp | |
| parent | 73dea702bdedf48a2d2d26e7922b5ee935063cfd (diff) | |
more WIP zapper
Diffstat (limited to 'game/prefab/ZapperScript.cpp')
| -rw-r--r-- | game/prefab/ZapperScript.cpp | 23 | 
1 files changed, 23 insertions, 0 deletions
diff --git a/game/prefab/ZapperScript.cpp b/game/prefab/ZapperScript.cpp new file mode 100644 index 0000000..b9b24be --- /dev/null +++ b/game/prefab/ZapperScript.cpp @@ -0,0 +1,23 @@ +#include <crepe/api/Rigidbody.h> +#include <cassert> + +#include "ZapperScript.h" + +using namespace crepe; +using namespace std; + +ZapperScript::ZapperScript(const ZapperObject & zapper) : zapper(zapper) { } + +void ZapperScript::init() { +	zapper.sprite.beam.mask = { +		.w = 350, +		.h = 117, +		.x = 0, +		.y = 0, +	}; +} + +void ZapperScript::frame_update(duration_t delta_time) { +	zapper.sprite.beam.mask.x += 4; +} +  |