BsCAudioSourceRTTI.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. //********************************** Banshee Engine (www.banshee3d.com) **************************************************//
  2. //**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
  3. #pragma once
  4. #include "BsCorePrerequisites.h"
  5. #include "BsRTTIType.h"
  6. #include "BsCAudioSource.h"
  7. #include "BsGameObjectRTTI.h"
  8. namespace BansheeEngine
  9. {
  10. /** @cond RTTI */
  11. /** @addtogroup RTTI-Impl-Core
  12. * @{
  13. */
  14. class BS_CORE_EXPORT CAudioSourceRTTI : public RTTIType<CAudioSource, Component, CAudioSourceRTTI>
  15. {
  16. BS_BEGIN_RTTI_MEMBERS
  17. BS_RTTI_MEMBER_REFL(mAudioClip, 0)
  18. BS_RTTI_MEMBER_PLAIN(mVolume, 1)
  19. BS_RTTI_MEMBER_PLAIN(mPitch, 2)
  20. BS_RTTI_MEMBER_PLAIN(mLoop, 3)
  21. BS_RTTI_MEMBER_PLAIN(mPriority, 4)
  22. BS_RTTI_MEMBER_PLAIN(mMinDistance, 5)
  23. BS_RTTI_MEMBER_PLAIN(mAttenuation, 6)
  24. BS_RTTI_MEMBER_PLAIN(mPlayOnStart, 7)
  25. BS_END_RTTI_MEMBERS
  26. public:
  27. CAudioSourceRTTI()
  28. :mInitMembers(this)
  29. { }
  30. const String& getRTTIName() override
  31. {
  32. static String name = "CAudioSource";
  33. return name;
  34. }
  35. UINT32 getRTTIId() override
  36. {
  37. return TID_CAudioSource;
  38. }
  39. SPtr<IReflectable> newRTTIObject() override
  40. {
  41. return GameObjectRTTI::createGameObject<CAudioSource>();
  42. }
  43. };
  44. /** @} */
  45. /** @endcond */
  46. }