FairyGUI.Shape.Update C# (CSharp) Method

Update() public method

public Update ( UpdateContext context ) : void
context UpdateContext
return void
        public override void Update(UpdateContext context)
        {
            if (_requireUpdateMesh)
            {
                _requireUpdateMesh = false;
                if (_type != 0)
                {
                    if (_contentRect.width > 0 && _contentRect.height > 0)
                    {
                        if (_type == 1)
                            graphics.DrawRect(_contentRect, _lineSize, _lineColor, _fillColor, _colors);
                        else if (_type == 2)
                            graphics.DrawEllipse(_contentRect, _fillColor, _colors);
                        else
                            graphics.DrawPolygon(_polygonPoints, _fillColor, _colors);
                    }
                    else
                        graphics.ClearMesh();
                }
            }

            base.Update(context);
        }

Usage Example

 static public int Update(IntPtr l)
 {
     try {
         FairyGUI.Shape         self = (FairyGUI.Shape)checkSelf(l);
         FairyGUI.UpdateContext a1;
         checkType(l, 2, out a1);
         self.Update(a1);
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }