Etterna 0.74.4
Loading...
Searching...
No Matches
GhostArrowRow.h
1#ifndef GHOSTARROWROW_H
2#define GHOSTARROWROW_H
3
4#include "Etterna/Actor/Base/ActorFrame.h"
5#include "Etterna/Models/Misc/GameConstantsAndTypes.h"
6#include "NoteDisplay.h"
7
8class PlayerState;
11{
12 public:
13 ~GhostArrowRow() override;
14 void Update(float fDeltaTime) override;
15 void DrawPrimitives() override;
16
17 void Load(const PlayerState* pPlayerState, float fYReverseOffset);
18 void SetColumnRenderers(std::vector<NoteColumnRenderer>& renderers);
19 [[nodiscard]] int GetRendererCount() const
20 {
21 if (m_renderers != nullptr)
22 return m_renderers->size();
23 return 0;
24 }
25
26 // alias
27 [[nodiscard]] int GetGhostCount() const { return GetReceptorCount(); }
28 [[nodiscard]] int GetReceptorCount() const
29 {
30 return m_Ghost.size();
31 }
32
33 // Initialization happens before Loading
34 [[nodiscard]] bool isInitialized() const { return GetGhostCount() > 0; }
35 [[nodiscard]] bool isLoaded() const { return GetRendererCount() > 0; }
36
37 void DidTapNote(int iCol, TapNoteScore tns, bool bBright);
38 void DidHoldNote(int iCol, HoldNoteScore hns, bool bBright);
39 void SetHoldShowing(int iCol, const TapNote& tn);
40 float m_fYReverseOffsetPixels = 0.F;
41
42 protected:
43 const PlayerState* m_pPlayerState{};
44
45 std::vector<NoteColumnRenderer> const* m_renderers{};
46 std::vector<Actor*> m_Ghost;
47 std::vector<TapNoteSubType> m_bHoldShowing;
48 std::vector<TapNoteSubType> m_bLastHoldShowing;
49};
50
51#endif
A container for other Actors.
Definition ActorFrame.h:8
Row of GhostArrow Actors.
Definition GhostArrowRow.h:11
void DrawPrimitives() override
Draw the primitives of the Actor.
Definition GhostArrowRow.cpp:88
The player's indivdual state.
Definition PlayerState.h:30
The various properties of a tap note.
Definition NoteTypes.h:149