Beispiel #1
0
        public static THHGame initGameWithoutPlayers(string name, GameOption option)
        {
            TaskExceptionHandler.register();
            THHGame game = new THHGame(option != null ? option : GameOption.Default, CardHelper.getCardDefines())
            {
                answers  = new GameObject(nameof(AnswerManager)).AddComponent <AnswerManager>(),
                triggers = new GameObject("TriggerManager").AddComponent <TriggerManager>(),
                logger   = new ULogger()
            };

            (game.triggers as TriggerManager).logger = game.logger;
            return(game);
        }
Beispiel #2
0
        public static THHGame initGameWithoutPlayers(string name, GameOption option)
        {
            TaskExceptionHandler.register();
            ULogger logger = new ULogger(name)
            {
                blackList = new List <string>()
                {
                    "Load"
                }
            };
            THHGame game = new THHGame(option != null ? option : GameOption.Default, CardHelper.getCardDefines(logger))
            {
                answers  = new GameObject(nameof(AnswerManager)).AddComponent <AnswerManager>(),
                triggers = new GameObject(nameof(TriggerManager)).AddComponent <TriggerManager>(),
                time     = new GameObject(nameof(TimeManager)).AddComponent <TimeManager>(),
                logger   = logger
            };

            game.answers.game = game;
            (game.triggers as TriggerManager).logger = game.logger;
            return(game);
        }