Parcourir la source

lua boot file is loaded at device init

mikymod il y a 12 ans
Parent
commit
26227e7ddf
1 fichiers modifiés avec 3 ajouts et 0 suppressions
  1. 3 0
      src/Device.cpp

+ 3 - 0
src/Device.cpp

@@ -477,7 +477,10 @@ void Device::create_debug_renderer()
 //-----------------------------------------------------------------------------
 //-----------------------------------------------------------------------------
 void Device::create_script_system()
 void Device::create_script_system()
 {
 {
+	// Create script system
 	m_script_system = new ScriptSystem();
 	m_script_system = new ScriptSystem();
+	// Load boot script which contains init, update and shutdown functions
+	m_script_system->load_file(BOOT_SCRIPT);
 }
 }
 
 
 //-----------------------------------------------------------------------------
 //-----------------------------------------------------------------------------