Example #1
0
    // Token: 0x0600157E RID: 5502 RVA: 0x0009A098 File Offset: 0x00098298
    public static float JFPJKBNQKQG(float CGHQEHCBQHB, float BKMCCCGOGOM, float GNJFQDKGEMF)
    {
        float num = JNNGOIIKENH.MCKGBIELBHK(BKMCCCGOGOM - CGHQEHCBQHB);

        if (Mathf.Abs(num) > GNJFQDKGEMF)
        {
            num = GNJFQDKGEMF * Mathf.Sign(num);
        }
        return(CGHQEHCBQHB + num);
    }
Example #2
0
 // Token: 0x0600170E RID: 5902 RVA: 0x000A6478 File Offset: 0x000A4678
 private void OnWillRenderObject()
 {
     this.DLMQCMOQICN();
     if (this.MBHJEBPQHEF != null)
     {
         this.DPBIEKGLOFP.SetPropertyBlock(this.MBHJEBPQHEF);
     }
     if (this.IOOHNELQHIO != null)
     {
         this.IOOHNELQHIO(this.GLDEQICKCGJ ?? this.JKFJKMBEOHJ);
     }
     if (!(this.GLDEQICKCGJ == null) && this.OHKNJLDNPCQ != 0)
     {
         if (this.QGJDDCCKJCI)
         {
             Vector4 dpjglgeeoim = this.BCHNDNICINJ.DPJGLGEEOIM;
             Vector2 phlkebhkgee = this.BCHNDNICINJ.PHLKEBHKGEE;
             Vector2 vector      = new Vector2(1000f, 1000f);
             if (phlkebhkgee.x > 0f)
             {
                 vector.x = dpjglgeeoim.z / phlkebhkgee.x;
             }
             if (phlkebhkgee.y > 0f)
             {
                 vector.y = dpjglgeeoim.w / phlkebhkgee.y;
             }
             this.GLDEQICKCGJ.SetVector(KMCGDKDIJIE.FDKBIKIEKOO[0], new Vector4(-dpjglgeeoim.x / dpjglgeeoim.z, -dpjglgeeoim.y / dpjglgeeoim.w, 1f / dpjglgeeoim.z, 1f / dpjglgeeoim.w));
             this.GLDEQICKCGJ.SetTexture("_ClipTex", this.MHFDHQHMQQC);
         }
         else if (!this.MFNKQJGBFQP)
         {
             KQHJOLQLQBJ kqhjolqlqbj = this.BCHNDNICINJ;
             int         num         = 0;
             while (kqhjolqlqbj != null)
             {
                 if (kqhjolqlqbj.BDFKBGCMLHC)
                 {
                     float   mpnnmhjbopn  = 0f;
                     Vector4 dpjglgeeoim2 = kqhjolqlqbj.DPJGLGEEOIM;
                     if (kqhjolqlqbj != this.BCHNDNICINJ)
                     {
                         Vector3 vector2 = kqhjolqlqbj.CGDFDPHIENG.InverseTransformPoint(this.BCHNDNICINJ.CGDFDPHIENG.position);
                         dpjglgeeoim2.x -= vector2.x;
                         dpjglgeeoim2.y -= vector2.y;
                         Vector3 eulerAngles  = this.BCHNDNICINJ.CGDFDPHIENG.rotation.eulerAngles;
                         Vector3 eulerAngles2 = kqhjolqlqbj.CGDFDPHIENG.rotation.eulerAngles;
                         Vector3 vector3      = eulerAngles2 - eulerAngles;
                         vector3.x = JNNGOIIKENH.MCKGBIELBHK(vector3.x);
                         vector3.y = JNNGOIIKENH.MCKGBIELBHK(vector3.y);
                         vector3.z = JNNGOIIKENH.MCKGBIELBHK(vector3.z);
                         if (Mathf.Abs(vector3.x) > 0.001f || Mathf.Abs(vector3.y) > 0.001f)
                         {
                             Debug.LogWarning("Panel can only be clipped properly if X and Y rotation is left at 0", this.BCHNDNICINJ);
                         }
                         mpnnmhjbopn = vector3.z;
                     }
                     this.JEDBOKHFCFP(num++, dpjglgeeoim2, kqhjolqlqbj.PHLKEBHKGEE, mpnnmhjbopn);
                 }
                 kqhjolqlqbj = kqhjolqlqbj.IEPOOINFQBL;
             }
         }
         else
         {
             Vector2 phlkebhkgee2      = this.BCHNDNICINJ.PHLKEBHKGEE;
             Vector4 dpjglgeeoim3      = this.BCHNDNICINJ.DPJGLGEEOIM;
             Vector2 mainTextureOffset = new Vector2(-dpjglgeeoim3.x / dpjglgeeoim3.z, -dpjglgeeoim3.y / dpjglgeeoim3.w);
             Vector2 mainTextureScale  = new Vector2(1f / dpjglgeeoim3.z, 1f / dpjglgeeoim3.w);
             Vector2 v = new Vector2(1000f, 1000f);
             if (phlkebhkgee2.x > 0f)
             {
                 v.x = dpjglgeeoim3.z / phlkebhkgee2.x;
             }
             if (phlkebhkgee2.y > 0f)
             {
                 v.y = dpjglgeeoim3.w / phlkebhkgee2.y;
             }
             this.GLDEQICKCGJ.mainTextureOffset = mainTextureOffset;
             this.GLDEQICKCGJ.mainTextureScale  = mainTextureScale;
             this.GLDEQICKCGJ.SetVector("_ClipSharpness", v);
         }
         return;
     }
 }