예제 #1
0
        public override void Registered(EntityManager entityManager)
        {
            DiagnosticsProvider.EnableGroup <ChunkRegionLoadingDiagnosticGroup>();

            InputManager.Instance.RegisterInputAction(() => Log.Debug(string.Format(FormatHelper.DEFAULT_LOGGING, nameof(ChunkRegionSystem),
                                                                                    $"Average update time: {DiagnosticsProvider.GetGroup<ChunkRegionLoadingDiagnosticGroup>().Average():0.00}ms")), Key.ShiftLeft, Key.X);
            InputManager.Instance.RegisterInputAction(() =>
            {
                foreach (Chunk chunk in _VoxelWorld.Entities.Select(entity => entity.Component <Chunk>() !))
                {
                    chunk !.State = GenerationState.AwaitingMesh;
                }
            }, Key.ShiftLeft, Key.R);
        }