示例#1
0
 void OnEnable()
 {
     scriptProp       = serializedObject.FindProperty("m_Script");
     sepraterCharProp = serializedObject.FindProperty("sepraterChar");
     argumentCharProp = serializedObject.FindProperty("argumentChar");
     obj = target as RouleObject;
 }
示例#2
0
 /// <summary>
 /// 将名字转换(去除标记性字符)
 /// </summary>
 /// <returns></returns>
 public ImgNode Analyzing(RouleObject roule, string name)
 {
     this.Name = roule.AnalySisImgName(name, out source, out type);
     //添加后缀
     if (texture != null)
     {
         this.hashImage    = rect.GetHashCode();
         this.texture.name = TextureName;
     }
     return(this);
 }
示例#3
0
        public GroupNode Analyzing(RouleObject roule, string name)
        {
            string[] areguments = null;
            this.Name = roule.AnalysisGroupName(name, out groupType, out areguments);
            switch (groupType)
            {
            case GroupType.GRID:
                if (areguments != null && areguments.Length > 1)
                {
                    var key = areguments[0];
                    direction = RouleObject.GetDirectionByKey(key);
                }
                if (areguments != null && areguments.Length > 2)
                {
                    var key = areguments[1];
                    constraintCount = int.Parse(key);
                }
                break;

            case GroupType.SCROLLVIEW:
            case GroupType.SLIDER:
            case GroupType.SCROLLBAR:
                if (areguments != null && areguments.Length > 0)
                {
                    var key = areguments[0];
                    direction = RouleObject.GetDirectionByKey(key);
                }
                break;

            case GroupType.GROUP:
                if (areguments != null && areguments.Length > 1)
                {
                    var key = areguments[0];
                    direction = RouleObject.GetDirectionByKey(key);
                }
                if (areguments != null && areguments.Length > 2)
                {
                    var key = areguments[1];
                    spacing = float.Parse(key);
                }
                break;

            default:
                break;
            }
            return(this);
        }