예제 #1
0
        /// <summary>
        /// Initializes the game processor instance.
        /// </summary>
        private void InitGameProcessor()
        {
            if (CurrentParameter.IsReplay)
            {
                gameProcessor = GameGui.CreateChild <ReplayGameProcessor>();
            }
            else
            {
                gameProcessor = GameGui.CreateChild <LocalGameProcessor>();
            }

            Dependencies.Cache(gameProcessor);
        }
예제 #2
0
        private void Init()
        {
            Dependencies.CacheAs <IRecycler <ReplayableInput> >(replayInputRecycler);
            Dependencies.CacheAs <IRecycler <ReplayFrame> >(replayFrameRecycler);

            base.OnHardInit += () =>
            {
                InitGameProcessor();
            };
            base.OnHardDispose += () =>
            {
                Dependencies.Remove(gameProcessor);
                gameProcessor.Destroy();
                gameProcessor = null;
            };
        }