private void Loader_LoadMapFinished() { aimesh = new AIMesh(); gameObjects = new Dictionary <string, List <GameObject> >(); var file = scriptLoader.Parse(Path.GetFileNameWithoutExtension(loader.LoadedMapName) + ".script", ResourceGroupManager.DEFAULT_RESOURCE_GROUP_NAME); scriptLoader.ExecuteFunction(file, "map_loaded", world); TriggerManager.Instance.Init(world, scriptLoader.currentContext); editor.Initization(); LoadMapFinished?.Invoke(); }
private void Loader_LoadMapFinished() { aimesh = new AIMesh(); gameObjects = new Dictionary <string, List <GameObject> >(); var file = scriptLoader.Parse(logicScriptFile, ResourceGroupManager.DEFAULT_RESOURCE_GROUP_NAME); scriptLoader.ExecuteFunction(file, "map_loaded", world); //Currently terrain use a mesh which id is MAP_TERRAIN var terrainEntName = loader.Entities.Where(o => o == "MAP_TERRAIN").FirstOrDefault(); if (!string.IsNullOrEmpty(terrainEntName)) { var terrainEnt = sceneManager.GetEntity(terrainEntName); navmesh = MeshToNavmesh.LoadNavmesh(terrainEnt); } TriggerManager.Instance.Init(world, scriptLoader.currentContext); editor.Initization(); LoadMapFinished?.Invoke(); }
private void FileLoader_LoadSceneFinished() { LoadMapFinished?.Invoke(); }
private void Worker_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e) { LoadMapFinished?.Invoke(); }