| 1 | //************************************ bs::framework - Copyright 2018 Marko Pintera **************************************// |
|---|---|
| 2 | //*********** Licensed under the MIT license. See LICENSE.md for full terms. This notice is not to be removed. ***********// |
| 3 | #include "Script/BsScriptManager.h" |
| 4 | |
| 5 | namespace bs |
| 6 | { |
| 7 | SPtr<ScriptLibrary> ScriptManager::sScriptLibrary; |
| 8 | |
| 9 | ScriptManager::ScriptManager() |
| 10 | { |
| 11 | if (sScriptLibrary) |
| 12 | sScriptLibrary->initialize(); |
| 13 | } |
| 14 | |
| 15 | ScriptManager::~ScriptManager() |
| 16 | { |
| 17 | if (sScriptLibrary) |
| 18 | sScriptLibrary->destroy(); |
| 19 | } |
| 20 | |
| 21 | void ScriptManager::update() |
| 22 | { |
| 23 | if(sScriptLibrary) |
| 24 | sScriptLibrary->update(); |
| 25 | } |
| 26 | |
| 27 | void ScriptManager::reload() |
| 28 | { |
| 29 | if (sScriptLibrary) |
| 30 | sScriptLibrary->reload(); |
| 31 | } |
| 32 | } |