/// <summary> /// Call this to initialize a Behaviour with data supplied in a file. /// </summary> /// <param name="fileName">The file to load from.</param> public override void LoadContent(String fileName) { base.LoadContent(fileName); PathFindDefinition def = GameObjectManager.pInstance.pContentManager.Load <PathFindDefinition>(fileName); // TODO: This should be read in from the xml. mUpdateSourceAutomatically = false; mSearchPassLimit = def.mSearchPassLimit; mSearchPassCount = 0; mPlannerNavMesh = new Planner(); mPlannerTileMap = new Planner(); // Preallocate messages to avoid GC during gameplay. // mOnPathFindFailedMsg = new OnPathFindFailedMessage(); mGetTileAtPositionMsg = new Level.GetTileAtPositionMessage(); mGetNavMeshMsg = new Level.GetNavMeshMessage(); }
/// <summary> /// Call this to initialize a Behaviour with data supplied in a file. /// </summary> /// <param name="fileName">The file to load from.</param> public override void LoadContent(String fileName) { base.LoadContent(fileName); PathFindDefinition def = GameObjectManager.pInstance.pContentManager.Load<PathFindDefinition>(fileName); // TODO: This should be read in from the xml. mUpdateSourceAutomatically = false; mSearchPassLimit = def.mSearchPassLimit; mSearchPassCount = 0; mPlannerNavMesh = new Planner(); mPlannerTileMap = new Planner(); // Preallocate messages to avoid GC during gameplay. // mOnPathFindFailedMsg = new OnPathFindFailedMessage(); mGetTileAtPositionMsg = new Level.GetTileAtPositionMessage(); mGetNavMeshMsg = new Level.GetNavMeshMessage(); }