protected override void LoadContent()
        {
            font = Content.Load <SpriteFont>("fonts//Xolonium");
            font.DefaultCharacter = ' ';
            spriteBatch           = new SpriteBatch(GraphicsDevice);
            Generate();

            t.OnFinish += () =>
            {
                Genetics.Evolve(generation, () => Rand * Rand * Rand * Rand);
                //t.Reset(false);
                t.Start();
            };

            t.Start();
        }
Ejemplo n.º 2
0
    public void Evolve()
    {
        _startTime = Time.time;
        Vector2 pos = StartPosition.position;

        _genetics.Evolve();
        _genetics.Reset(pos);
        _bestCurrentScore = 0;

        /*
         * int arena = Random.Range(0, Arenas.Length);
         * while (_prevArena == arena)
         * {
         *  arena = Random.Range(0, Arenas.Length);
         * }
         * Arenas[_prevArena].transform.position = new Vector3(0, -10, 0);
         * Arenas[arena].transform.position = new Vector3(0, 0, 0);
         * _prevArena = arena;
         */
    }