コード例 #1
0
ファイル: Program.cs プロジェクト: mattshoe81/SamuraiDojo
        static Program()
        {
            IoC.Dojector.BindAssembliesReflectively();

            battleCollection = Factory.Get <IBattleCollection>();

            WIDTH         = 180;
            HEIGHT        = 40;
            DEFAULT_COLOR = ConsoleColor.Yellow;
            INFO_COLOR    = ConsoleColor.DarkYellow;
            ERROR_COLOR   = ConsoleColor.DarkRed;

            Console.WindowWidth     = WIDTH;
            Console.WindowHeight    = HEIGHT;
            Console.ForegroundColor = DEFAULT_COLOR;

            timeUnits = new Dictionary <TimeUnit, string>
            {
                { TimeUnit.Nanosecond, "ns" },
                { TimeUnit.Microsecond, "micros" },
                { TimeUnit.Millisecond, "ms" },
                { TimeUnit.Second, "s" },
                { TimeUnit.Minute, "mins" }
            };
            sizeUnits = new Dictionary <SizeUnit, string>
            {
                { SizeUnit.B, "B" },
                { SizeUnit.KB, "KB" },
                { SizeUnit.MB, "MB" },
                { SizeUnit.GB, "GB" }
            };
        }
コード例 #2
0
        public GameStateService(
            IUniverseCollection universeCollection,
            IWorldCollection worldCollection,
            IAreaCollection areaCollection,
            ISectionCollection sectionCollection,
            IPlayerCollection playerCollection,
            ICharacterCollection characterCollection,
            IBattleCollection battleCollection,
            ILogService logService,
            IHubService hubService)
        {
            UniverseCollection  = universeCollection;
            WorldCollection     = worldCollection;
            AreaCollection      = areaCollection;
            SectionCollection   = sectionCollection;
            PlayerCollection    = playerCollection;
            CharacterCollection = characterCollection;
            BattleCollection    = battleCollection;

            this.logService = logService;
            this.hubService = hubService;
        }