A reimplementation of Mario Kart Wii's physics engine in C++
Loading...
Searching...
No Matches
ObjectHeyhoShip.hh
1#pragma once
2
3#include "game/field/StateManager.hh"
4#include "game/field/obj/ObjectProjectileLauncher.hh"
5
6namespace Field {
7
10public:
12 ~ObjectHeyhoShip() override;
13
14 void init() override;
15 void calc() override;
16
18 [[nodiscard]] u32 loadFlags() const override {
19 return 1;
20 }
21
23 [[nodiscard]] s16 launchPointIdx() override {
24 return m_framesSinceLastLaunch == 0 ? m_railInterpolator->curPointIdx() : -1;
25 }
26
28 const EGG::Vector3f &initRailDir(u16 idx) {
29 m_railInterpolator->init(0.0f, static_cast<u32>(idx));
30 return m_railInterpolator->curTangentDir();
31 }
32
33 void calcPos();
34
35 const f32 m_yAmplitude;
36 u32 m_frame;
37 u32 m_framesSinceLastLaunch;
38};
39
40} // namespace Field
The ship on GBA Shy Guy Beach that shoots cannonballs.
const f32 m_yAmplitude
How much the ship bobs up and down.
s16 launchPointIdx() override
Used by ObjectSniper to check which object (if any) should be thrown.
Abstract class that moves along its own rail and throws projectiles.
Pertains to collision.
A 3D float vector.
Definition Vector.hh:88