示例#1
0
 // Token: 0x0600001A RID: 26 RVA: 0x000027EC File Offset: 0x000009EC
 public static void DrawBox(Vector2 pos, Vector2 size, float thick, Color color)
 {
     Renders.BoxRect(new Rect(pos.x, pos.y, size.x, thick), color);
     Renders.BoxRect(new Rect(pos.x, pos.y, thick, size.y), color);
     Renders.BoxRect(new Rect(pos.x + size.x, pos.y, thick, size.y), color);
     Renders.BoxRect(new Rect(pos.x, pos.y + size.y, size.x + thick, thick), color);
 }
示例#2
0
        // Token: 0x0600001B RID: 27 RVA: 0x00002888 File Offset: 0x00000A88
        public static void DrawHealth(Vector2 pos, float health, bool center = false)
        {
            if (center)
            {
                pos -= new Vector2(26f, 0f);
            }
            pos += new Vector2(0f, 18f);
            Renders.BoxRect(new Rect(pos.x, pos.y, 52f, 5f), Color.black);
            pos += new Vector2(1f, 1f);
            Color color = Color.green;
            bool  flag  = health <= 50f;

            if (flag)
            {
                color = Color.yellow;
            }
            bool flag2 = health <= 25f;

            if (flag2)
            {
                color = Color.red;
            }
            Renders.BoxRect(new Rect(pos.x, pos.y, 0.5f * health, 3f), color);
        }