This repository was archived by the owner on Jul 11, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +13
-8
lines changed
Assets/TextInlineSprite/Scripts Expand file tree Collapse file tree 2 files changed +13
-8
lines changed Original file line number Diff line number Diff line change 11using System . Collections ;
22using System . Collections . Generic ;
33using UnityEngine ;
4-
4+ using System . Text . RegularExpressions ;
55namespace EmojiUI
66{
77 public class AutoContainer
@@ -11,9 +11,11 @@ public class AutoContainer
1111#else
1212 public const int hot = 100 ;
1313#endif
14-
1514 private List < IParser > parsers = new List < IParser > ( 8 ) ;
1615
16+ private Regex TagRegex = new Regex ( @"{\S+}" ) ;
17+
18+ private List < SpriteTagInfo > tagList ;
1719
1820 public void Add ( IParser data )
1921 {
@@ -23,7 +25,6 @@ public void Add(IParser data)
2325 Debug . LogErrorFormat ( "has contains it :{0}" , data ) ;
2426 }
2527#endif
26-
2728 parsers . Add ( data ) ;
2829 }
2930
@@ -32,17 +33,18 @@ public bool Remove(IParser data)
3233 return parsers . Remove ( data ) ;
3334 }
3435
35- public void DoStep ( )
36+ public void DoParser ( string content )
3637 {
37- bool needfix = false ;
38+ if ( tagList == null )
39+ tagList = new List < SpriteTagInfo > ( 8 ) ;
40+ else
41+ tagList . Clear ( ) ;
42+
3843 for ( int i = 0 ; i < parsers . Count ; ++ i )
3944 {
4045 var data = parsers [ i ] ;
4146
4247 }
43-
44- //reset
45-
4648 }
4749 }
4850
Original file line number Diff line number Diff line change 11using System . Collections ;
22using System . Collections . Generic ;
33using UnityEngine ;
4+ using System . Text . RegularExpressions ;
45
56namespace EmojiUI
67{
78 public interface IParser
89 {
910 int Hot { get ; set ; }
1011
12+ Regex regex { get ; }
13+
1114 bool ParsetContent ( string data ) ;
1215 }
1316
You can’t perform that action at this time.
0 commit comments