[][src]Function movingai::parser::parse_scen_file

pub fn parse_scen_file(path: &Path) -> Result<Vec<SceneRecord>>

Parse a MovingAI .scen file.

Arguments

  • path represents the path to the file location.

Returns

It returns the parsed map as a Vec<SceneRecord> or an Err.

Panics

For the time, it panics if the map format it is not correct.

Errors

Return errors if it is not possible to open the specified file.

Examples

use std::path::Path;
use movingai::parser::parse_scen_file;

let scen = parse_scen_file(Path::new("./tests/arena2.map.scen")).unwrap();