Ejemplo n.º 1
0
        internal static EngineCommandResult Process(AshyCore.EngineAPI.EngineCommands.ChangeLevel c)
        {
            Engine.I.DestroyWorld();
            Engine.I.CreateWorld();

            foreach (var entity in c.LoadingLevel.Entities)
            {
                LevelCmdHelper.InitEntity(entity);
            }

            return(EngineCommandResult.Success);
        }
Ejemplo n.º 2
0
        internal static EngineCommandResult Process(AshyCore.EngineAPI.EngineCommands.ChangeLevel c)
        {
            if (!CoreAPI.I.CheckAllInitialized || c == null)
            {
                return(EngineCommandResult.Failed);
            }

            Engine.I.DestroyWorld();
            Memory.Collect(showLog: true);
            Engine.I.CreateWorld();

            foreach (var entity in c.LoadingLevel.Entities)
            {
                LevelCmdHelper.InitEntity(entity);
            }

            return(EngineCommandResult.Success);
        }