// Support Lesson media package now. public ContentMapfileManager(IBaseModule baseModule, IConstants constants) { this.baseModule = baseModule; this.constants = constants; this.Mapfile = new Mapfile(); this.filePath = this.constants.LocalContentPath + string.Format(@"level_{0}_{1}.json", this.baseModule.Id, this.constants.CultureCode); }
// Support Lesson media package now. public MediaMapfileManager(IBaseModule baseModule, IConstants constants) { this.baseModule = baseModule; this.constants = constants; this.Mapfile = new Mapfile(); this.filePath = this.constants.LocalMediaPath + string.Format(@"lesson_{0}.json", this.baseModule.Id); }
// Delete unused files. private void DeleteUnusedFiles(string oldMapfile, Mapfile newMapfile) { // Need Remove unused files. Mapfile mapfile = JsonConvert.DeserializeObject <Mapfile>(oldMapfile); foreach (var a in mapfile.Files) { int s = newMapfile.Files.Where(f => f.FileName == a.FileName).Count(); if (s == 0) { var filepath = this.constants.LocalMediaPath + string.Format(@"lesson_{0}\{1}", this.baseModule.Id, a.FileName); File.Delete(filepath); } } }
public override World constructGameWorld(Mapfile path) { return(new GameWorld(this, path)); }
public GameWorld(Game theEngine, Mapfile map) : base(theEngine, map) { teams = new List <LinkedList <AnimalActor> >(); }