spring_comp.hpp 478 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
#pragma once

#include <mirrage/ecs/ecs.hpp>
#include <mirrage/utils/sf2_glm.hpp>

namespace phase_shifter::gameplay {

	struct Spring_comp : public mirrage::ecs::Component<Spring_comp> {
		static constexpr const char* name() { return "Spring"; }
		using Component::Component;

		float spring_constant = 1.f;
		float mass            = 1.f;
14
15

		glm::vec3 velocity = {0.f, 0.f, 0.f};
16
17
	};

Florian Oetke's avatar
Florian Oetke committed
18
19
20
	sf2_structDef(Spring_comp, spring_constant, mass);

} // namespace phase_shifter::gameplay