asge::game::components
Namespaces
Classes & Structs
Animation
Struct
AudioSource
Struct
Camera
Struct
Collider
Struct
Interactable
Struct
LayoutAbsolute
Struct
LayoutGrid
Struct
LayoutHStack
Struct
LayoutType
Struct
LayoutType< LayoutGrid >
Struct
LayoutType< LayoutHStack >
Struct
LayoutType< LayoutVStack >
Struct
LayoutVStack
Struct
Name
Struct
PathFollow
Struct
RenderInfo
Struct
Rigidbody
Struct
Sprite
Struct
SpriteDrawCorners
Struct
Transform
Struct
UIButton
Struct
UICheckbox
Struct
UILabel
Struct
UILayoutItem
Struct
UIPanel
Struct
UIRect
Struct
UISlider
Struct
Velocity
Struct
Enumerations
enum class ResolutionTypeHow CollisionSystem react to an overlap involving this Collider.
UnknownTriggerSolidenum class VerticalAlignHow Draw(UILabel) positions text within its UIRect's height Top sits the text at the rect's own top edge, same as before this existed.
TopCenterBottomenum class SlotAlignWhere a child sits along one axis of a layout slot it doesn't fill.
StartCenterEndenum class PanelLayoutWhich LayoutSpec alternative a panel uses; also its serialized m_LayoutType name.
AbsoluteGridVStackHStackTypedefs
using SerializableComponents = std::tuple< Transform, Velocity, Sprite, Collider, Rigidbody, Animation, AudioSource, Camera, PathFollow, Name, ecs::components::Hierarchy, ecs::markers::Disable, UIButton, RenderInfo, UIRect, Interactable, UILabel, UICheckbox, UISlider, UIPanel, UILayoutItem >Every component type with a Serializer<T> specialization.
The one place a scene (de)serializer needs to know about — for each entity, it folds over this list checking Registry::HasComponent<T> (to save) or TOMLTableView::HasTable(Serializer<T>::kTableName) (to load) for each T, rather than requiring any actual reflection. Adding a new serializable component means adding its type here, alongside its own Serializer<T> specialization.
using UIComponents = std::tuple< UIButton, UIRect, Interactable, UILabel, UICheckbox, UISlider, UIPanel, UILayoutItem >Every component type belonging to the UI subsystem.
using ColliderShape = std::variant< math::Rect, math::Circle >The set of shapes a Collider can be — see AabbOverlap/PenetrationVector (Collision.hpp).
using CollisionLayer = std::uint32_tA bitmask identifying/filtering which Colliders can collide with which — see Collider::m_Layer/m_Mask and LayersCanCollide.
using LayoutSpec = std::variant< LayoutAbsolute, LayoutGrid, LayoutVStack, LayoutHStack >The panel's layout mode together with that mode's parameters.
Variables
constexpr PanelLayout LayoutType_v = LayoutType<T>::valueFraction of a slider's height left empty above and below its track bar.
Functions
Resumes/starts playback from the current frame — does not reset m_CurrentFrame or m_ElapsedTime, so calling this on an already in-progress Animation continues rather than restarts it.
Switches to the clip registered as inName in inAnim.m_Clips: points m_ClipPath at it and restarts playback from frame 0, looping or not per inLoop.
Does nothing if that clip is already playing, so calling it every frame is safe. Returns false for an unknown name.
Pauses playback in place; AnimationSystem stops advancing this Animation until PlayAnimation is called again.
Marks inAudioSource to (re)start playing right away, looping per inLoop once it runs out of queued audio.
Safe to call whether inAudioSource is stopped, already playing, or still mid-loop AudioSystem always honors the request on its next pass by restarting from the beginning of the clip, reusing the existing stream rather than creating a new one. inLoop only governs what happens if this playthrough runs out on its own; it plays independently of it either way.
Marks inAudioSource to stop; AudioSystem clears its queued audio on the next pass.
BoolResult DetachAudioSource(audio::AudioDevice &inDevice, AudioSource &inAudioSource) noexceptReleases inAudioSource's stream back to inDevice's pool and clears m_Stream, so a later PlayAudioSource creates a fresh one instead of reusing it.
A no-op returning BoolResult::Ok() if inAudioSource has no stream yet. Unlike StopAudioSource, this actually frees the underlying pool slot for other sources to use reach for it when a source is done for good (e.g. its entity is being destroyed), not just paused.
Set the audio source gain/volume.
Whether two Colliders are even willing to collide with each other, before either's actual shape/overlap is looked at — see systems::CollisionSystem, which skips a pair entirely on false.
Mutual: inA's layer must be in inB's mask and inB's layer must be in inA's mask, so one side excluding the other is enough to skip the pair regardless of what the other side's mask says.
Returns True if input collider has unknown resolution type.
Rebuilds inPathFollow.m_Path from its current m_Waypoints/ m_Resolution and resets m_Traveled/m_Finished back to their defaults.
asset::Resolver<PathFollow> only ever builds m_Path once (see its own doc comment) — correct for a component that's just been loaded from a scene file, but wrong the moment something mutates m_Waypoints/m_Resolution afterward (the level editor's viewport waypoint editing, say), which would otherwise leave m_Path silently pointing at the old shape. Call this any time you mutate either field directly instead of relying on ResolveAssets to notice.
SpriteDrawCorners SpriteGetDrawCorners(math::Rect const &inDstRect, float inRotationRadians) noexceptinDstRect's own corners (as utils::SpriteGetDstRect returns), rotated inRotationRadians around inDstRect's center.
Positive inRotationRadians rotates clockwise on screen (screen-space Y grows downward); inRotationRadians == 0 reproduces inDstRect's unrotated corners exactly. Feeds IRenderer::DrawTextureAffine, the only DrawTexture* overload that can express rotation — see RenderSystem, which switches to it whenever a drawn entity's Transform::m_WorldRotation is non-zero.
str::String ToString(VerticalAlign inAlign) noexceptVerticalAlign -> its lowercase TOML/display representation ("top" for anything unrecognized).
VerticalAlign FromString(str::StringView inStr) noexceptThe read-side counterpart to ToString any string other than "top"/"center"/"bottom" maps to Top.
PanelLayout GetPanelLayout(UIPanel const &inPanel) noexceptValue units covered per pixel of a track inWidth wide, i.e.
(m_Max - m_Min) / inWidth.
math::Float2 GetThumbPosition(UISlider const &inSlider, math::Rect inOrigin) noexceptThumb center inside inOrigin: m_Value mapped (clamped to the range) along its width, vertically centered.