diff options
| author | MegaMech <7255464+MegaMech@users.noreply.github.com> | 2024-12-30 20:39:31 -0700 |
|---|---|---|
| committer | MegaMech <7255464+MegaMech@users.noreply.github.com> | 2024-12-30 20:39:31 -0700 |
| commit | 7ee714e4e93609a5dbf1dc648df0ce504e3d7284 (patch) | |
| tree | e63c623057b555fedd3d017b5d6c34d12de31098 /src/engine/objects/Penguin.h | |
| parent | 41fb92b7b989290947d8f39c442219afe12d0215 (diff) | |
| parent | 57afb90c3901b4c5dc586f1be3f6604c52c423d6 (diff) | |
Merge branch 'next' of https://github.com/MegaMech/SpaghettiKart into next
Diffstat (limited to 'src/engine/objects/Penguin.h')
| -rw-r--r-- | src/engine/objects/Penguin.h | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/src/engine/objects/Penguin.h b/src/engine/objects/Penguin.h index 0e9c36f49..63c2207c1 100644 --- a/src/engine/objects/Penguin.h +++ b/src/engine/objects/Penguin.h @@ -2,6 +2,8 @@ #include <libultraship.h> #include <vector> +#include "engine/World.h" +#include "engine/objects/Object.h" extern "C" { #include "macros.h" @@ -13,7 +15,7 @@ extern "C" { #include "course_offsets.h" } -class OPenguin { +class OPenguin : public OObject { public: enum PenguinType : uint32_t { CHICK, @@ -36,10 +38,19 @@ public: f32 Diameter = 0.0f; // Waddle in a circle around the spawn point at this diameter. uint16_t MirrorModeAngleOffset; - explicit OPenguin(s32 i, Vec3f pos, u16 direction, PenguinType type, Behaviour behaviour); + explicit OPenguin(Vec3f pos, u16 direction, PenguinType type, Behaviour behaviour); - void Tick(); - void Draw(s32 playerId); + ~OPenguin() { + _count--; + } + + static size_t GetCount() { + return _count; + } + + + virtual void Tick() override; + virtual void Draw(s32 cameraId) override; private: void Behaviours(s32 objectIndex, s32 arg1); void EmperorPenguin(s32 objectIndex); @@ -51,7 +62,7 @@ private: void OtherPenguin(s32 objectIndex); void InitOtherPenguin(s32 objectIndex); - + static size_t _count; s32 _idx; PenguinType _type; Behaviour _bhv; |
