Exemple #1
0
    void StartNewGame(int size, float moveInterval, int growthRate, int goalCount = int.MaxValue)
    {
        board.score = 0;

        board.cubeSize        = size;
        board.moveInterval    = moveInterval;
        board.goalCount       = goalCount;
        board.growthRate      = growthRate;
        snake.position        = Point3.Zero;
        snake.snakeLength     = 2;
        snake.planarDirection = Direction.North;

        board.Go();
        menuScreen.SetActive(false);
    }