PixelBullet  0.0.1
A C++ game engine
Loading...
Searching...
No Matches
audio_listener_component.h
1#pragma once
2
3#include "pixelbullet/serialization/node.h"
4
5namespace pixelbullet
6{
8{
9 bool enabled = true;
10
11 [[nodiscard]] bool operator==(const AudioListenerComponent&) const noexcept = default;
12};
13
14inline Node& operator<<(Node& node, const AudioListenerComponent& component)
15{
16 node["enabled"] << component.enabled;
17 return node;
18}
19
20inline const Node& operator>>(const Node& node, AudioListenerComponent& component)
21{
22 if (node.HasProperty("enabled"))
23 {
24 node["enabled"] >> component.enabled;
25 }
26 return node;
27}
28} // namespace pixelbullet
Represents a hierarchical node capable of storing various data types and supporting YAML serializatio...
Definition node.h:45
Definition audio_listener_component.h:8