ScriptManager.cpp 719 B

123456789101112131415161718192021222324252627282930313233
  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. {
  10. ScriptManager::ScriptManager()
  11. {
  12. }
  13. ScriptManager::~ScriptManager()
  14. {
  15. ANKI_SCRIPT_LOGI("Destroying scripting engine...");
  16. }
  17. Error ScriptManager::init(AllocAlignedCallback allocCb, void* allocCbData)
  18. {
  19. ANKI_SCRIPT_LOGI("Initializing scripting engine...");
  20. m_alloc = ScriptAllocator(allocCb, allocCbData);
  21. ANKI_CHECK(m_lua.init(m_alloc, &m_otherSystems));
  22. return Error::NONE;
  23. }
  24. } // end namespace anki