示例#1
0
        protected override void AddStatus(string pageId, string value)
        {
            string[]      arr = value.Split(jointChar0);
            GearSizeValue gv;

            if (pageId == null)
            {
                gv = _default;
            }
            else
            {
                gv = new GearSizeValue(0, 0, 1, 1);
                _storage[pageId] = gv;
            }
            gv.width  = int.Parse(arr[0]);
            gv.height = int.Parse(arr[1]);
            if (arr.Length > 2)
            {
                gv.scaleX = float.Parse(arr[2]);
                gv.scaleY = float.Parse(arr[3]);
            }
        }
示例#2
0
 protected override void Init()
 {
     _default = new GearSizeValue(_owner.width, _owner.height, _owner.scaleX, _owner.scaleY);
     _storage = new Dictionary <string, GearSizeValue>();
 }