Example #1
0
    public IEnumerator Summon()
    {
        GraphHolder graphHolder = GameObject.FindObjectOfType <GraphHolder>();

        CheckAndRenderGraph(graphHolder);

        BotSummoner summoner = GameObject.FindObjectOfType <BotSummoner>();

        Assert.IsNotNull(summoner, "BotSummoner is null");

        GameObject bot = summoner.SummonBot("base", 15);

        Assert.IsNotNull(bot, "bot is null");

        Vector3           nodePos  = graphHolder.GetNodePosition(15);
        MoveDataComponent moveData = bot.GetComponent <MoveDataComponent>();

        Assert.IsNotNull(moveData, "MoveDataComponent on bot is null");

        yield return(null);
    }
Example #2
0
        /// <summary>
        /// Shows A Graph (Testing)
        /// </summary>
        private void ShowGraph()
        {
            GraphInfo area    = new AreaGraphInfo("Area Graph", Companies.Instance.StatusKeyValue(), Brushes.Purple);
            GraphInfo bar     = new BarGraphInfo("Bar Graph", Companies.Instance.StatusKeyValue(), Brushes.Green);
            GraphInfo column  = new ColumnGraphInfo("Column Graph", Companies.Instance.StatusKeyValue(), Brushes.Red);
            GraphInfo line    = new LineGraphInfo("Line Graph", Companies.Instance.StatusKeyValue());
            GraphInfo pie     = new PieGraphInfo(Companies.Instance.StatusKeyValue());
            GraphInfo scatter = new ScatterGraphInfo("Scatter Graph", Companies.Instance.StatusKeyValue(), Brushes.Black);

            ChartInfo ac = new ChartInfo("Area Chart");

            ac.AddGraph(area);
            ChartInfo bc = new ChartInfo("Bar Chart");

            bc.AddGraph(bar);
            ChartInfo cc = new ChartInfo("Column Chart");

            cc.AddGraph(column);
            ChartInfo lc = new ChartInfo("Line Chart");

            lc.AddGraph(line);
            ChartInfo pc = new ChartInfo("Pie Chart");

            pc.AddGraph(pie);
            ChartInfo sc = new ChartInfo("Scatter Chart");

            sc.AddGraph(scatter);

            GraphHolder bg  = new GraphHolder("Statistics");
            GraphHolder bg2 = new GraphHolder("Window 2");

            bg.AddChart(ac);
            bg.AddChart(bc);
            bg.AddChart(cc);
            bg2.AddChart(lc);
            bg2.AddChart(pc);
            bg2.AddChart(sc);
            bg.Show();
            bg2.Show();
        }
Example #3
0
 private void CheckAndRenderGraph(GraphHolder graphHolder)
 {
     Assert.IsNotNull(graphHolder, "GraphHolder is  null");
     graphHolder.RenderGraph();
 }