コード例 #1
0
        public void Unload()
        {
            _isLoaded = false;
            _cell     = null;

            UpdateManager.Instance.OnUpdate -= TimeUpdate;
        }
コード例 #2
0
        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);
        }
コード例 #3
0
        public void Load()
        {
            _isLoaded = false;

            Action load = () =>
            {
                _cell     = OverwatchDataManager.Load(_index);
                _isLoaded = true;

                UpdateManager.Instance.OnUpdate += TimeUpdate;
            };

            ThreadTaskQueuer.AddTask(load);
        }
コード例 #4
0
        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);
        }