private double calcularDistancia(Character enemy)
        {
            cat1 = enemy.getPosition().X - posicaoDaTorre.X;
            cat2 = enemy.getPosition().Z - posicaoDaTorre.Z;

            double hip = (cat1 * cat1) + (cat2 * cat2);
            hip = Math.Sqrt(hip);

            return hip;
        }
        protected override void LoadContent()
        {
            ordenation = new QuickSort();

            spriteBatch = new SpriteBatch(GraphicsDevice);

            ImageLibrary.getInstance().putImage("Tree", Content.Load<Texture2D>(@"tree"));
            ImageLibrary.getInstance().putImage("Clear", Content.Load<Texture2D>(@"clear"));
            ImageLibrary.getInstance().putImage("Floor", Content.Load<Texture2D>(@"ground"));
            ImageLibrary.getInstance().putImage("FloorSelected", Content.Load<Texture2D>(@"ground_selected"));
            ImageLibrary.getInstance().putImage("Origin", Content.Load<Texture2D>(@"origin"));
            ImageLibrary.getInstance().putImage("Player", Content.Load<Texture2D>(@"player"));

            grid = new Grid(this, cam, 6, 6);

            this.path = new AStar();

            Random rand = new Random();

            int x = rand.Next(3, 6);
            int y = rand.Next(3, 6);

            this.path.Search(this.grid.nodes[0, 0], this.grid.nodes[x, y], ref this.grid, this, ref allTrees, ref this.nodePath);
            ArrangeNodes(ref this.nodePath);

            player = new Character(this, new Vector3(1.25f, 0, 1.25f), new Vector3(0, 90, 0), new Vector3(0, 1, 0), ImageLibrary.getInstance().getImage("Player"), cam, path.origin);
            enemys = new List<Character>();
            enemys.Add(player);

            activeNode = grid.nodes[0, 0];
        }