Пример #1
0
 // call before using anything else!
 public void Init(WMG_Axis_Graph graph)
 {
     this.graph  = graph;
     positioning = new GraphPositioning(graph as WMG_Graph_Manager);
     xAxis       = new AxisFormatting(graph.xAxis);
     yAxis       = new AxisFormatting(graph.yAxis);
 }
Пример #2
0
    // sets the placeholder transform to the graph, then destroys the placeholder
    public void SetPlaceAndDestroyHolder(GraphPositioning positioning, GraphAppearance appearance)
    {
        // find placeholder
        PlaceholderController placeholder = transform.GetComponentInChildren <PlaceholderController>();

        // assign offsets as placeholder offsets
        positioning.SetAllVariables(
            anchorMin: new Vector2(0, 0), anchorMax: new Vector2(1, 1),
            anchoredPosition: new Vector2(0.5f, 0.5f),
            offsetMin: placeholder.GetOffsetMin(), offsetMax: placeholder.GetOffsetMax());
        // apply placeholder colors to graph appearance
        appearance.SetAllVariables(
            backgroundColor: placeholder.background.color,
            detailColor: placeholder.text.color);
        // remove placeholder
        GameObject.Destroy(placeholder.gameObject);
    }
Пример #3
0
 public void Init(WMG_Pie_Graph graph)
 {
     this.graph  = graph;
     positioning = new GraphPositioning(graph as WMG_Graph_Manager);
 }