BsScriptParticleSize.generated.cpp 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. #include "BsScriptParticleSize.generated.h"
  2. #include "BsMonoMethod.h"
  3. #include "BsMonoClass.h"
  4. #include "BsMonoUtil.h"
  5. #include "../../../bsf/Source/Foundation/bsfCore/Particles/BsParticleEvolver.h"
  6. #include "BsScriptPARTICLE_SIZE_DESC.generated.h"
  7. #include "BsScriptParticleSize.generated.h"
  8. namespace bs
  9. {
  10. ScriptParticleSize::ScriptParticleSize(MonoObject* managedInstance, const SPtr<ParticleSize>& value)
  11. :ScriptObject(managedInstance)
  12. {
  13. mInternal = value;
  14. }
  15. SPtr<ParticleSize> ScriptParticleSize::getInternal() const
  16. {
  17. return std::static_pointer_cast<ParticleSize>(mInternal);
  18. }
  19. void ScriptParticleSize::initRuntimeData()
  20. {
  21. metaData.scriptClass->addInternalCall("Internal_setOptions", (void*)&ScriptParticleSize::Internal_setOptions);
  22. metaData.scriptClass->addInternalCall("Internal_getOptions", (void*)&ScriptParticleSize::Internal_getOptions);
  23. metaData.scriptClass->addInternalCall("Internal_create", (void*)&ScriptParticleSize::Internal_create);
  24. metaData.scriptClass->addInternalCall("Internal_create0", (void*)&ScriptParticleSize::Internal_create0);
  25. }
  26. MonoObject* ScriptParticleSize::create(const SPtr<ParticleSize>& value)
  27. {
  28. if(value == nullptr) return nullptr;
  29. bool dummy = false;
  30. void* ctorParams[1] = { &dummy };
  31. MonoObject* managedInstance = metaData.scriptClass->createInstance("bool", ctorParams);
  32. new (bs_alloc<ScriptParticleSize>()) ScriptParticleSize(managedInstance, value);
  33. return managedInstance;
  34. }
  35. void ScriptParticleSize::Internal_setOptions(ScriptParticleSize* thisPtr, __PARTICLE_SIZE_DESCInterop* options)
  36. {
  37. PARTICLE_SIZE_DESC tmpoptions;
  38. tmpoptions = ScriptPARTICLE_SIZE_DESC::fromInterop(*options);
  39. thisPtr->getInternal()->setOptions(tmpoptions);
  40. }
  41. void ScriptParticleSize::Internal_getOptions(ScriptParticleSize* thisPtr, __PARTICLE_SIZE_DESCInterop* __output)
  42. {
  43. PARTICLE_SIZE_DESC tmp__output;
  44. tmp__output = thisPtr->getInternal()->getOptions();
  45. __PARTICLE_SIZE_DESCInterop interop__output;
  46. interop__output = ScriptPARTICLE_SIZE_DESC::toInterop(tmp__output);
  47. MonoUtil::valueCopy(__output, &interop__output, ScriptPARTICLE_SIZE_DESC::getMetaData()->scriptClass->_getInternalClass());
  48. }
  49. void ScriptParticleSize::Internal_create(MonoObject* managedInstance, __PARTICLE_SIZE_DESCInterop* desc)
  50. {
  51. PARTICLE_SIZE_DESC tmpdesc;
  52. tmpdesc = ScriptPARTICLE_SIZE_DESC::fromInterop(*desc);
  53. SPtr<ParticleSize> instance = ParticleSize::create(tmpdesc);
  54. new (bs_alloc<ScriptParticleSize>())ScriptParticleSize(managedInstance, instance);
  55. }
  56. void ScriptParticleSize::Internal_create0(MonoObject* managedInstance)
  57. {
  58. SPtr<ParticleSize> instance = ParticleSize::create();
  59. new (bs_alloc<ScriptParticleSize>())ScriptParticleSize(managedInstance, instance);
  60. }
  61. }