public override object Clone() { AdventureData ad = (AdventureData)base.Clone(); ad.buttons = new List <CustomButton>(); foreach (CustomButton cb in buttons) { ad.buttons.Add((CustomButton)cb.Clone()); } foreach (CustomArrow ca in arrows) { ad.arrows.Add((CustomArrow)ca.Clone()); } //ad.chapters = new List<Chapter>(); //for (Chapter c : chapters) // ad.chapters.Add((Chapter) c.Clone()); ad.commentaries = commentaries; ad.contents = new List <ChapterSummary>(); foreach (ChapterSummary cs in contents) { ad.contents.Add((ChapterSummary)cs.Clone()); } ad.cursors = new List <CustomCursor>(); foreach (CustomCursor cc in cursors) { ad.cursors.Add((CustomCursor)cc.Clone()); } ad.description = description; ad.guiCustomized = guiCustomized; ad.guiType = guiType; ad.playerMode = playerMode; ad.playerName = (playerName != null ? playerName : null); ad.title = (title != null ? title : null); return(ad); }
public static AdventureData loadAdventureData(string path, List <Incidence> incidences) { AdventureData adventureDataTemp = new AdventureData(); try { AdventureHandler_ adventureParser = new AdventureHandler_(adventureDataTemp); // Read and close the input stream adventureParser.Parse(path + "\\descriptor.xml"); //descriptorIS.close(); adventureDataTemp = adventureParser.getAdventureData(); } catch (Exception e) { Debug.LogError(e); } return(adventureDataTemp); }
/** * @param adventureData * the adventureData to set */ public static void setAdventureData(AdventureData adventureData) { Loader.adventureData = adventureData; }
// TODO mhm.... //private List<Chapter> chapters; /** * Constructor. * * @param zipFile * Path to the zip file which helds the chapter files */ public AdventureHandler_(AdventureData adventuredata) { adventureData = adventuredata; //chapters = new List<Chapter>(); }