group2 0.1.0
CSE 125 Group 2
Loading...
Searching...
No Matches
Minimap Struct Reference

#include <Minimap.hpp>

Inheritance diagram for Minimap:
[legend]
Collaboration diagram for Minimap:
[legend]

Classes

struct  Dot

Public Member Functions

 Minimap ()
void update (float dt, const HudGameState &state, HudTweenPool &tweens) override
 Called each frame before draw(). Update animation, consume events.
void draw (HudContext &ctx, float drawX, float drawY) override
 Emit geometry into the draw context.
Public Member Functions inherited from HudWidget
virtual ~HudWidget ()=default

Public Attributes

float mapSize = 180.f
 Pixel width/height of the minimap square.
float dotSize = 6.f
float borderThickness = 2.f
Public Attributes inherited from HudWidget
bool visible = true
HudAnchor anchor = HudAnchor::TopLeft
float offsetX = 0.f
float offsetY = 0.f
float width = 0.f
float height = 0.f
float uiScale_ = 1.f
 Set by Hud each frame (screenH / 1080).

Private Attributes

float localX_ = 0.f
float localZ_ = 0.f
float localYaw_ = 0.f
 Player yaw in radians.
float worldRange_ = 100.f
std::vector< Dotenemies_

Constructor & Destructor Documentation

◆ Minimap()

Minimap::Minimap ( )

Member Function Documentation

◆ draw()

void Minimap::draw ( HudContext & ctx,
float drawX,
float drawY )
overridevirtual

Emit geometry into the draw context.

Parameters
ctxImmediate-mode draw API.
drawXResolved pixel X (anchor + offset already applied).
drawYResolved pixel Y.

Implements HudWidget.

Here is the call graph for this function:

◆ update()

void Minimap::update ( float dt,
const HudGameState & state,
HudTweenPool & tweens )
overridevirtual

Called each frame before draw(). Update animation, consume events.

Implements HudWidget.

Member Data Documentation

◆ borderThickness

float Minimap::borderThickness = 2.f

◆ dotSize

float Minimap::dotSize = 6.f

◆ enemies_

std::vector<Dot> Minimap::enemies_
private

◆ localX_

float Minimap::localX_ = 0.f
private

◆ localYaw_

float Minimap::localYaw_ = 0.f
private

Player yaw in radians.

◆ localZ_

float Minimap::localZ_ = 0.f
private

◆ mapSize

float Minimap::mapSize = 180.f

Pixel width/height of the minimap square.

◆ worldRange_

float Minimap::worldRange_ = 100.f
private

The documentation for this struct was generated from the following files: