Esempio n. 1
0
        protected override void Initialize()
        {
            // TODO: Add your initialization logic here
            this.Window.Title   = "Navigation Field";
            this.IsMouseVisible = true;

            arrowSource    = new Rectangle(0, 0, 71, 27);
            aimSource      = new Rectangle(0, 0, 100, 100);
            obstacleSource = new Rectangle(0, 0, 100, 100);

            bckgrColor = Color.Gray;

            GuidanseFieldSpace1 = new FieldSpace();

            Random random = new Random();

            for (int i = 0; i < 10; i++)
            {
                for (int j = 0; j < 10; j++)
                {
                    GuidanseFieldSpace1.UpdateCell(false, i, j, 0 * Math.PI / 4, 0);
                }
            }

            NavigationFieldSpace1           = new NavigationFieldSpace(50, 30);
            NavigationFieldSpace1.sleepTime = 0;

            System.Threading.Thread t = new System.Threading.Thread(thr);

            t.Start();


            base.Initialize();
        }
Esempio n. 2
0
        protected override void Initialize()
        {
            // TODO: Add your initialization logic here
            this.Window.Title = "Navigation Field";
            this.IsMouseVisible = true;

            arrowSource = new Rectangle(0, 0, 71, 27);
            aimSource = new Rectangle(0, 0, 100, 100);
            obstacleSource = new Rectangle(0, 0, 100, 100);

            bckgrColor = Color.Gray;

            GuidanseFieldSpace1 = new FieldSpace();

            Random random = new Random();

            for (int i = 0; i < 10; i++)
                for (int j = 0; j < 10; j++)
                    GuidanseFieldSpace1.UpdateCell(false, i, j, 0 * Math.PI/4, 0);

            NavigationFieldSpace1 = new NavigationFieldSpace(50, 30);
            NavigationFieldSpace1.sleepTime = 0;

            System.Threading.Thread t = new System.Threading.Thread(thr);

            t.Start();

            base.Initialize();
        }