Exemplo n.º 1
0
        public void ReadLogFile(string fileFullPath)
        {
            string[] lines = File.ReadAllLines(fileFullPath);

            const int contentI = 7;
            string    content;

            foreach (string line in lines)
            {
                content = line.Substring(contentI);
                if (content.Length <= 0)
                {
                    continue;
                }

                if (content.StartsWith("InitGame: "))
                {
                    string[] toks  = content.Split('\\');
                    bool     isMap = false;
                    foreach (string tok in toks)
                    {
                        if (isMap)
                        {
                            _mapList.SetCurrentMap(tok);
                            isMap = false;
                        }

                        if (tok == "mapname")
                        {
                            isMap = true;
                        }
                    }
                }
                else if (content.StartsWith("DIAG;"))
                {
                    MapLogicEvent ml = MapLogicEvent.Parse(content);
                    if (ml != null)
                    {
                        _mapList.RegisterMapLogicEvent(ml);
                    }
                }
                else
                {
                    ModEvent me = ModEvent.Parse(content);
                    if (me != null)
                    {
                        _mapList.RegisterModEvent(me);
                    }
                }
            }
        }
Exemplo n.º 2
0
 public void RegisterMapLogicEvent(MapLogicEvent ml)
 {
     _currentMap.RegisterMapLogicEvent(ml);
 }
Exemplo n.º 3
0
 public void RegisterMapLogicEvent(MapLogicEvent ml)
 {
     ml.Process(this);
     //_mapLogicEvents.Add(ml);
 }