示例#1
0
        static StackObject *AssignFromStack_geometry_2(ref object o, ILIntepreter __intp, StackObject *ptr_of_this_method, IList <object> __mStack)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            global::UIGeometry @geometry = (global::UIGeometry)typeof(global::UIGeometry).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));

            ((global::UIWidget)o).geometry = @geometry;
            return(ptr_of_this_method);
        }
示例#2
0
        static StackObject *Clear_0(ILIntepreter __intp, StackObject *__esp, IList <object> __mStack, CLRMethod __method, bool isNewObj)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject *ptr_of_this_method;
            StackObject *__ret = ILIntepreter.Minus(__esp, 1);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
            global::UIGeometry instance_of_this_method = (global::UIGeometry)typeof(global::UIGeometry).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));

            __intp.Free(ptr_of_this_method);

            instance_of_this_method.Clear();

            return(__ret);
        }
    // Token: 0x06004B8D RID: 19341 RVA: 0x00126F2C File Offset: 0x0012512C
    public bool UpdateGeometry(ref Matrix4x4 worldToPanel, bool parentMoved, bool generateNormals)
    {
        if (!this.material)
        {
            return(false);
        }
        global::UIGeometry mGeom = this.mGeom;

        if (this.OnUpdate() || this.mChangedCall || this.mForcedChanged)
        {
            this.mChangedCall   = false;
            this.mForcedChanged = false;
            mGeom.Clear();
            if (this.mAlphaUnchecked || !global::NGUITools.ZeroAlpha(this.mColor.a))
            {
                this.OnFill(mGeom.meshBuffer);
            }
            if (mGeom.hasVertices)
            {
                Vector2 vector;
                Vector2 vector2;
                switch ((byte)(this.widgetFlags & (global::UIWidget.WidgetFlags.CustomPivotOffset | global::UIWidget.WidgetFlags.CustomRelativeSize)))
                {
                case 1:
                    global::UIWidget.tempWidgetFlags[0] = global::UIWidget.WidgetFlags.CustomPivotOffset;
                    this.GetCustomVector2s(0, 1, global::UIWidget.tempWidgetFlags, global::UIWidget.tempVector2s);
                    vector    = global::UIWidget.tempVector2s[0];
                    vector2.x = (vector2.y = 1f);
                    break;

                case 2:
                    global::UIWidget.tempWidgetFlags[0] = global::UIWidget.WidgetFlags.CustomRelativeSize;
                    this.GetCustomVector2s(0, 1, global::UIWidget.tempWidgetFlags, global::UIWidget.tempVector2s);
                    vector2 = global::UIWidget.tempVector2s[0];
                    vector  = global::UIWidget.DefaultPivot(this.mPivot);
                    break;

                case 3:
                    global::UIWidget.tempWidgetFlags[0] = global::UIWidget.WidgetFlags.CustomPivotOffset;
                    global::UIWidget.tempWidgetFlags[1] = global::UIWidget.WidgetFlags.CustomRelativeSize;
                    this.GetCustomVector2s(0, 2, global::UIWidget.tempWidgetFlags, global::UIWidget.tempVector2s);
                    vector  = global::UIWidget.tempVector2s[0];
                    vector2 = global::UIWidget.tempVector2s[1];
                    break;

                default:
                    vector    = global::UIWidget.DefaultPivot(this.mPivot);
                    vector2.x = (vector2.y = 1f);
                    break;
                }
                Vector3 vector3;
                vector3.x = vector.x * vector2.x;
                vector3.y = vector.y * vector2.y;
                vector3.z = 0f;
                Matrix4x4 matrix4x = worldToPanel * this.cachedTransform.localToWorldMatrix;
                mGeom.Apply(ref vector3, ref matrix4x);
            }
            return(true);
        }
        if (mGeom.hasVertices && parentMoved)
        {
            Matrix4x4 matrix4x2 = worldToPanel * this.cachedTransform.localToWorldMatrix;
            mGeom.Apply(ref matrix4x2);
        }
        return(false);
    }