Пример #1
0
        public _Forest(Game game)
        {
            billboards = new _Billboard[10];

            for (int i = 0; i <= 9; i++)
            {
                billboards[i] = new _Billboard(game.GraphicsDevice, game, @"Textures\arvre2", @"Textures\arvre",
                                               Vector3.Zero, new Vector2(15, 25), _WallOrientation.South);
            }
        }
Пример #2
0
 public void SelectionSort(_Billboard[] vetor)
 {
     for (int indice = 0; indice < vetor.Length; ++indice)
     {
         int indiceMenor = indice;
         for (int indiceSeguinte = indice + 1; indiceSeguinte < vetor.Length; ++indiceSeguinte)
         {
             if (vetor[indiceSeguinte].getDistance() > vetor[indiceMenor].getDistance())
             {
                 indiceMenor = indiceSeguinte;
             }
         }
         _Billboard aux = vetor[indice];
         vetor[indice]      = vetor[indiceMenor];
         vetor[indiceMenor] = aux;
     }
 }