PixelBullet
0.0.1
A C++ game engine
Loading...
Searching...
No Matches
engine
include
pixelbullet
scene
components
audio_listener_component.h
1
#pragma once
2
3
#include "pixelbullet/serialization/node.h"
4
5
namespace
pixelbullet
6
{
7
struct
AudioListenerComponent
8
{
9
bool
enabled =
true
;
10
11
[[nodiscard]]
bool
operator==(
const
AudioListenerComponent
&)
const
noexcept
=
default
;
12
};
13
14
inline
Node
& operator<<(
Node
& node,
const
AudioListenerComponent
& component)
15
{
16
node[
"enabled"
] << component.enabled;
17
return
node;
18
}
19
20
inline
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
pixelbullet::Node
Represents a hierarchical node capable of storing various data types and supporting YAML serializatio...
Definition
node.h:45
pixelbullet::AudioListenerComponent
Definition
audio_listener_component.h:8
Generated by
1.16.1