A reimplementation of Mario Kart Wii's physics engine in C++
Loading...
Searching...
No Matches
ObjectProjectile.hh
1#pragma once
2
3#include "game/field/obj/ObjectCollidable.hh"
4
5namespace Field {
6
9public:
11 : ObjectCollidable(params), m_idx(params.setting(0)) {}
12
13 ~ObjectProjectile() override = default;
14
16 virtual void initProjectile(const EGG::Vector3f &pos) = 0;
17
19 virtual void onLaunch() = 0;
20
21 [[nodiscard]] s16 idx() const {
22 return m_idx;
23 }
24
25protected:
26 const s16 m_idx;
27};
28
29} // namespace Field
Abstract class that represents an object thrown by an ObjectProjectileLauncher.
virtual void onLaunch()=0
Callback function use by the ObjectSniper that wants to throw this projectile.
virtual void initProjectile(const EGG::Vector3f &pos)=0
Callback function called by the managing ObjectSniper.
Pertains to collision.
A 3D float vector.
Definition Vector.hh:88