Exemple #1
0
/////// SUBROUTINES


        void displayMyLocation()
        {
            //string myLocation = prettyLocation(client.Self.SimPosition);
            float x, y;

            myAvatar.Coordinates(out x, out y);
            textBoxUpdate(locationBox, "<" + x.ToString("0.0") + "," + y.ToString("0.0") + ">");
        }
Exemple #2
0
        private void update_exploredMap()
        {
            float x, y;

            myDog.Coordinates(out x, out y);
            int xx = (int)x;
            int yy = (int)y;
            int wb = xx - 10;
            int sb = yy - 10;

            for (int i = 1; i < 21; i++)
            {
                for (int j = 1; j < 21; j++)
                {
                    int xi = wb + i;
                    int yj = sb + j;
                    if (xi >= 0 && xi <= 255 && yj >= 0 && yj <= 255 &&
                        (xi - x) * (xi - x) + (yj - y) * (yj - y) <= 100)
                    {
                        exploredMap[xi, yj] = true;
                    }
                }
            }
        }