Esempio n. 1
0
 private void toolStripButton1_Click(object sender, EventArgs e)
 {
     peopleSimulation = new PeopleSimulation(20, new FxVector2f(560,145), new FxVector2f(-1,0), katopsi);
     peopleSimulation.Start(peopleRefreshCB);
 }
Esempio n. 2
0
        private void peopleRefreshCB(PeopleSimulation ps)
        {
            /* now we must update People Overview */
            if (UIPeopleOverview != null)
                UIPeopleOverview.PeopleUpdate(ps.PersonList);

            /* create a heet map */
            if (refreshCount < 10)
            {
                if (refreshCount == 0)
                {
                    heatMap = katopsi.Copy();
                }

                foreach(Person p in ps.PersonList)
                {
                    heatMap.DrawCircle(p.Position, 10.0f, 0.5f);
                }
            }
            else
            {
                refreshCount = 0;
            }

            refreshCount++;
        }