ScriptManager.cpp 719 B

1234567891011121314151617181920212223242526272829303132
  1. // Copyright (C) 2009-2021, Panagiotis Christopoulos Charitos and contributors.
  2. // All rights reserved.
  3. // Code licensed under the BSD License.
  4. // http://www.anki3d.org/LICENSE
  5. #include <AnKi/Script/ScriptManager.h>
  6. #include <AnKi/Script/ScriptEnvironment.h>
  7. #include <AnKi/Util/Logger.h>
  8. namespace anki {
  9. ScriptManager::ScriptManager()
  10. {
  11. }
  12. ScriptManager::~ScriptManager()
  13. {
  14. ANKI_SCRIPT_LOGI("Destroying scripting engine...");
  15. }
  16. Error ScriptManager::init(AllocAlignedCallback allocCb, void* allocCbData)
  17. {
  18. ANKI_SCRIPT_LOGI("Initializing scripting engine...");
  19. m_alloc = ScriptAllocator(allocCb, allocCbData);
  20. ANKI_CHECK(m_lua.init(m_alloc, &m_otherSystems));
  21. return Error::NONE;
  22. }
  23. } // end namespace anki