aboutsummaryrefslogtreecommitdiff
path: root/game/prefab/ZapperScript.cpp
blob: b9b24be4b353f7f18268a11ec49062b189e9e8cf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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;
}