| 1 | //************************************ bs::framework - Copyright 2018 Marko Pintera **************************************// |
| 2 | //*********** Licensed under the MIT license. See LICENSE.md for full terms. This notice is not to be removed. ***********// |
| 3 | #pragma once |
| 4 | |
| 5 | #include "BsCorePrerequisites.h" |
| 6 | #include "Reflection/BsRTTIType.h" |
| 7 | #include "Components/BsCAudioSource.h" |
| 8 | #include "Private/RTTI/BsGameObjectRTTI.h" |
| 9 | |
| 10 | namespace bs |
| 11 | { |
| 12 | /** @cond RTTI */ |
| 13 | /** @addtogroup RTTI-Impl-Core |
| 14 | * @{ |
| 15 | */ |
| 16 | |
| 17 | class BS_CORE_EXPORT CAudioSourceRTTI : public RTTIType<CAudioSource, Component, CAudioSourceRTTI> |
| 18 | { |
| 19 | BS_BEGIN_RTTI_MEMBERS |
| 20 | //BS_RTTI_MEMBER_REFLPTR(mInternal, 0) |
| 21 | BS_RTTI_MEMBER_PLAIN(mPlayOnStart, 1) |
| 22 | BS_RTTI_MEMBER_REFL(mAudioClip, 2) |
| 23 | BS_RTTI_MEMBER_PLAIN(mVolume, 3) |
| 24 | BS_RTTI_MEMBER_PLAIN(mPitch, 4) |
| 25 | BS_RTTI_MEMBER_PLAIN(mLoop, 5) |
| 26 | BS_RTTI_MEMBER_PLAIN(mPriority, 6) |
| 27 | BS_RTTI_MEMBER_PLAIN(mMinDistance, 7) |
| 28 | BS_RTTI_MEMBER_PLAIN(mAttenuation, 8) |
| 29 | BS_END_RTTI_MEMBERS |
| 30 | public: |
| 31 | const String& getRTTIName() override |
| 32 | { |
| 33 | static String name = "CAudioSource" ; |
| 34 | return name; |
| 35 | } |
| 36 | |
| 37 | UINT32 getRTTIId() override |
| 38 | { |
| 39 | return TID_CAudioSource; |
| 40 | } |
| 41 | |
| 42 | SPtr<IReflectable> newRTTIObject() override |
| 43 | { |
| 44 | return SceneObject::createEmptyComponent<CAudioSource>(); |
| 45 | } |
| 46 | }; |
| 47 | |
| 48 | /** @} */ |
| 49 | /** @endcond */ |
| 50 | } |
| 51 | |