BsScriptColor.h 951 B

12345678910111213141516171819202122232425262728293031323334
  1. //********************************** Banshee Engine (www.banshee3d.com) **************************************************//
  2. //**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
  3. #pragma once
  4. #include "BsScriptEnginePrerequisites.h"
  5. #include "BsScriptObject.h"
  6. #include "BsColor.h"
  7. namespace BansheeEngine
  8. {
  9. /**
  10. * @brief Interop class between C++ & CLR for ScriptColor.
  11. */
  12. class BS_SCR_BE_EXPORT ScriptColor : public ScriptObject <ScriptColor>
  13. {
  14. public:
  15. SCRIPT_OBJ(ENGINE_ASSEMBLY, "BansheeEngine", "Color")
  16. /**
  17. * @brief Unboxes a boxed managed Color struct and returns
  18. * the native version of the structure.
  19. */
  20. static Color unbox(MonoObject* obj);
  21. /**
  22. * @brief Boxes a native Color struct and returns
  23. * a managed object containing it.
  24. */
  25. static MonoObject* box(const Color& value);
  26. private:
  27. ScriptColor(MonoObject* instance);
  28. };
  29. }