public void Unload() { _isLoaded = false; _cell = null; UpdateManager.Instance.OnUpdate -= TimeUpdate; }
public static XElement ToXML(this OverwatchMemoryCell memoryCell) { var element = new XElement("Overwatch_Memory_Cell", new XAttribute("Size", memoryCell.Size) ); for (int i = 0; i < memoryCell.Size; i++) { element.Add(memoryCell[i].ToXML(i)); } return(element); }
public void Load() { _isLoaded = false; Action load = () => { _cell = OverwatchDataManager.Load(_index); _isLoaded = true; UpdateManager.Instance.OnUpdate += TimeUpdate; }; ThreadTaskQueuer.AddTask(load); }
public static OverwatchMemoryCell ReadCell(XElement xElement) { int size = (int)xElement.Attribute("Size"); var moments = new OverwatchMemoryMoment[size]; var elements = from element in xElement.Elements() orderby(int) element.Attribute("Index") select element; int index = 0; foreach (var element in elements) { moments[index] = ReadMoment(element); index++; } var cell = new OverwatchMemoryCell(moments); return(cell); }