public void LoadLevel(string level, Action <string> over) { IDataNode tmpAssetManager = GetInstence <IDataNode>("", "AssetManager", new Dictionary <string, object>() { { "Identify", level } }); IDataNode tmpScriptManager = GetInstence <IDataNode>("", "ScriptManager", new Dictionary <string, object>() { { "Identify", level } }); IDataNode tmpGameObjectManager = GetInstence <IDataNode>("", "GameObjectManager", new Dictionary <string, object>() { { "Identify", level } }); if (level == AppConst.RootLevel) { assetManager = tmpAssetManager; scriptManager = tmpScriptManager; gameObjectManager = tmpGameObjectManager; } else { assetManager.AddNode(tmpAssetManager); scriptManager.AddNode(tmpScriptManager); gameObjectManager.AddNode(tmpGameObjectManager); } LoadLevelState.TmpReductionStateEvent = over; LoadLevelState.ChangeState(level); }