void Init() { m_CommentDictionary = new Dictionary <int, Comment>(); m_CommentReferenceDictionary = new Dictionary <float, int>(); m_CommentUIDictionary = new Dictionary <int, CommentUIPrefab>(); m_CommentDictionary = XMLReader.ReadCommentsFile(GlobalDefine.PathDefines.XML_Path + GlobalDefine.FileName.Comments[(int)m_CurrentLevel]); foreach (KeyValuePair <int, Comment> comment in m_CommentDictionary) { m_CommentReferenceDictionary.Add(comment.Value.InVideoTime, comment.Key); } /*AddComment("hello", 1f, DateTime.Now,2); * AddComment("anyone here?", 2.5f, DateTime.Now,1); * AddComment("bad example you made!", 3.5f, DateTime.Now,2); * AddComment("stupid", 4.5f, DateTime.Now,3); * AddComment("pet a cat", 5.5f, DateTime.Now,4); * AddComment("good job", 6.8f, DateTime.Now,2); * AddComment("bad game!", 8.5f, DateTime.Now,1); * AddComment("this video sucks", 9.5f, DateTime.Now,3); * AddComment("pet a cat", 10.5f, DateTime.Now,4); * AddComment("good job", 11.8f, DateTime.Now,2); * AddComment("dont do it wrong", 15.5f, DateTime.Now,4); * AddComment("hey", 15.8f, DateTime.Now,2); * AddComment("nonsense", 16.8f, DateTime.Now,2); * AddComment("written in c#", 18.5f, DateTime.Now,1); * AddComment("there are zombies around", 19.5f, DateTime.Now,3); * AddComment("come from bilibili", 20.5f, DateTime.Now,4); * AddComment("control", 21.8f, DateTime.Now,2); * AddComment("+c+v", 22.8f, DateTime.Now,0); * AddComment("to make this happen", 23.5f, DateTime.Now,2); * AddComment("basically not finnished", 25.5f, DateTime.Now,3); * AddComment("come from bilibili", 26.5f, DateTime.Now,4);*/ RefreshUI(); }
public override void Init() { base.Init(); if (Application.platform == RuntimePlatform.Android) { // Debug.Log ("ASSET PATH: " + Application.streamingAssetsPath + GlobalDefine.PathDefines.XML_Path + // GlobalDefine.FileName.SoldierType); // Debug.Log ("FILE EXISTS: " + System.IO.File.Exists (Application.streamingAssetsPath + GlobalDefine.PathDefines.XML_Path + // GlobalDefine.FileName.SoldierType)); // SoldierTypes = XMLReader.ReadSoldierTypeFile("file:///android_asset/XML/" + GlobalDefine.FileName.SoldierType); // Fractions = XMLReader.ReadFractionsFile(Application.streamingAssetsPath + GlobalDefine.PathDefines.XML_Path + // GlobalDefine.FileName.Fraction); CommentDic = XMLReader.ReadCommentsFile(Application.streamingAssetsPath + GlobalDefine.PathDefines.XML_Path + GlobalDefine.FileName.Comments); } else { CommentDic = XMLReader.ReadCommentsFile(Application.dataPath + GlobalDefine.PathDefines.XML_Path + GlobalDefine.FileName.Comments); } }