Beispiel #1
0
 void OnGUI()
 {
     if (Draw)
     {
         UltiDraw.Begin(Camera);
         UltiDraw.OnGUILabel(Rect.GetCenter() + new Vector2(0f, 0.175f), new Vector2(0f, 0.2f), 0.02f, "Expert Activation", Color.black);
         UltiDraw.End();
     }
 }
Beispiel #2
0
 public override void GUI(Camera canvas = null)
 {
     if (DrawGUI)
     {
         UltiDraw.Begin(canvas);
         UltiDraw.OnGUILabel(Rect.GetCenter() + new Vector2(0f, 0.075f), Rect.GetSize(), 0.0175f, "Actions", UltiDraw.Black);
         Color[] colors = UltiDraw.GetRainbowColors(Styles.Length);
         for (int i = 0; i < Styles.Length; i++)
         {
             float value = Values[Pivot][i];
             UltiDraw.OnGUILabel(new Vector2(Rect.X, value.Normalize(0f, 1f, Rect.Y - Rect.H / 2f, Rect.Y + Rect.H / 2f)), Rect.GetSize(), 0.0175f, Styles[i], colors[i]);
         }
         UltiDraw.End();
     }
 }
Beispiel #3
0
    public override void GUI(Camera canvas = null)
    {
        if (DrawGUI)
        {
            UltiDraw.Begin(canvas);
            UltiDraw.OnGUILabel(Rect.GetCenter() + new Vector2(Rect.W / 2f, Rect.H + 0.04f), Rect.ToScreen(new Vector2(1f, 0.25f)), 0.02f, "Phases", UltiDraw.Black);

            float xMin = Rect.X;
            float xMax = Rect.X + Rect.W;
            float yMin = Rect.Y;
            float yMax = Rect.Y + Rect.H;
            for (int b = 0; b < Bones.Length; b++)
            {
                float w        = (float)b / (float)(Bones.Length - 1);
                float vertical = w.Normalize(0f, 1f, yMax, yMin);
                float height   = 0.95f * (yMax - yMin) / (Bones.Length - 1);
                float border   = 0.025f * (yMax - yMin) / (Bones.Length - 1);
                if (!Active[b])
                {
                    UltiDraw.OnGUILabel(new Vector2(0.5f * (xMin + xMax), vertical), new Vector2(xMax - xMin, height), 0.015f, "Disabled", UltiDraw.White, UltiDraw.None);
                }
            }
            UltiDraw.End();
        }
    }
Beispiel #4
0
    void OnRenderObject()
    {
        if (!Application.isPlaying)
        {
            return;
        }

        if (!Draw)
        {
            return;
        }

        if (!Setup())
        {
            return;
        }

        if (Background.GetSize() != Vector2.zero)
        {
            UltiDraw.Begin();
            UltiDraw.GUIRectangle(Background.GetCenter(), Background.GetSize(), Color.white);
            UltiDraw.End();
        }

        switch (Mode)
        {
        case MODE.Function:
            DrawFunction();
            break;

        case MODE.Graph:
            DrawGraph();
            break;
        }
    }
 public override void GUI(Camera canvas = null)
 {
     if (DrawGUI)
     {
         UltiDraw.Begin(canvas);
         UltiDraw.OnGUILabel(Rect.GetCenter() + new Vector2(0f, 0.13f), Rect.GetSize(), 0.0175f, "Contacts", UltiDraw.Black);
         UltiDraw.End();
     }
 }
 public override void GUI(Camera canvas = null)
 {
     if (DrawGUI)
     {
         UltiDraw.Begin(canvas);
         UltiDraw.OnGUILabel(rect.GetCenter() + rect.ToScreen(new Vector2(0f, 1.25f)), rect.ToScreen(new Vector2(1f, 0.25f)), 0.02f, "Ball Control", UltiDraw.Black);
         UltiDraw.OnGUILabel(rect.GetCenter() + rect.ToScreen(new Vector2(-1.175f, 1f)), rect.ToScreen(new Vector2(1f, 0.25f)), 0.015f, "Height", UltiDraw.Black);
         UltiDraw.OnGUILabel(rect.GetCenter() + rect.ToScreen(new Vector2(1.175f, 1f)), rect.ToScreen(new Vector2(1f, 0.25f)), 0.015f, "Speed", UltiDraw.Black);
         UltiDraw.OnGUILabel(opponent.GetCenter() + new Vector2(0f, opponent.H + 0.02f), rect.ToScreen(new Vector2(1f, 0.25f)), 0.0175f, "Opponent", UltiDraw.Black);
         UltiDraw.End();
     }
 }
Beispiel #7
0
    public void DrawDistribution(Color color, UltiDraw.GUIRect rect)
    {
        float max = Distances.Max();

        float[] distances = new float[Distances.Length];
        for (int i = 0; i < distances.Length; i++)
        {
            distances[i] = Distances[i].Normalize(0f, max, 1f, 0f);
        }

        UltiDraw.Begin();
        UltiDraw.PlotFunction(rect.GetCenter(), rect.GetSize(), distances, yMin: 0f, yMax: 1f, backgroundColor: UltiDraw.White, lineColor: color);
        UltiDraw.End();
    }
Beispiel #8
0
 public void DrawDistribution(Color color, UltiDraw.GUIRect rect)
 {
     UltiDraw.Begin();
     UltiDraw.PlotFunction(rect.GetCenter(), rect.GetSize(), Occupancies, yMin: 0f, yMax: 1f, backgroundColor: UltiDraw.White, lineColor: color);
     UltiDraw.End();
 }