public GameMapEditor(GameMap map) { this.map = map; aimesh = map.AIMesh; scm = map.SceneManager; objPivot = map.CreateEntityWithMaterial("MARKER_PIVOT", "marker_pivot.mesh", "marker_pivot"); SceneNode objPivotSceneNode = scm.RootSceneNode.CreateChildSceneNode(); objPivotSceneNode.AttachObject(objPivot); objPivot.Visible = false; }
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 mapLoader_LoadMapFinished() { if (LoadMapFinished != null) { agents = new List <Character>(); gameObjects = new Dictionary <string, List <GameObject> >(); var file = scriptLoader.Parse(mapLoader.ScriptName, ResourceGroupManager.DEFAULT_RESOURCE_GROUP_NAME); scriptLoader.ExecuteFunction(file, "map_loaded", world); TriggerManager.Instance.Init(world, scriptLoader.currentContext); aimesh = mapLoader.AIMesh; editor.Initization(aimesh); LoadMapFinished(); } }
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(); }
public void Initization(AIMesh aimesh) { this.aimesh = aimesh; GenerateVisualAIMesh(); }