Cogs.Core
AudioComponent.cpp
1#include "AudioComponent.h"
2
3#include "Foundation/Reflection/TypeDatabase.h"
4
5using namespace Cogs::Reflection;
6
7void Cogs::Core::AudioComponent::registerType()
8{
9 Field fields[] = {
10 Field(Name("sound"), &AudioComponent::sound),
11 Field(Name("enabled"), &AudioComponent::enabled),
12 Field(Name("loop"), &AudioComponent::loop),
13 Field(Name("radius"), &AudioComponent::radius),
14 Field(Name("volume"), &AudioComponent::volume),
15 Field(Name("frequencyModulation"), &AudioComponent::frequencyModulation),
16 Field(Name("dopplerScale"), &AudioComponent::dopplerScale),
17 };
18
19 TypeDatabase::createType<AudioComponent>().setBase<Component>().setFields(fields);
20}
Field definition describing a single data member of a data structure.
Definition: Field.h:68
Contains reflection support.
Definition: Component.h:11
Represents an unique name.
Definition: Name.h:70