BsScriptColor.h 701 B

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