Esempio n. 1
0
        /// <summary>
        /// 新規ゲームを生成し、ゲームループをスレッドプールに登録
        /// </summary>
        /// <param name="looperPool"></param>
        /// <param name="logger"></param>
        public static void CreateNew(ILogicLooperPool looperPool, ILogger logger, LoopData loopData)
        {
            ServerPlayingState.LogicInfo info;
            info.input         = loopData.Input;
            info.threadLockObj = threadLockObj;

            // ゲームループを登録
            var gameLoop = new ServerMainGameLoop(logger, loopData, info);

            looperPool.RegisterActionAsync(gameLoop.UpdateFrame);
        }
Esempio n. 2
0
        /// <summary>
        /// Create a new life-game loop and register into the LooperPool.
        /// </summary>
        /// <param name="looperPool"></param>
        /// <param name="logger"></param>
        public static void CreateNew(ILogicLooperPool looperPool, ILogger logger)
        {
            var gameLoop = new LifeGameLoop(logger);

            looperPool.RegisterActionAsync(gameLoop.UpdateFrame);
        }