Exemplo n.º 1
0
        public EngineCommandResult Execute(IEngineCommand c)
        {
            var ll  = (AshyCore.EngineAPI.EngineCommands.LoadLevel)c;
            var res = EngineCommandResult.Success;

            Engine.I.CreateWorld();

            foreach (var entity in ll.LoadingLevel.Entities)
            {
                res = LevelCmdHelper.InitEntity(entity).Worst(res);
            }

            return(res);
        }
Exemplo 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);
        }
Exemplo n.º 3
0
        public EngineCommandResult Execute(IEngineCommand c)
        {
            var aec = (AshyCore.EngineAPI.EngineCommands.AddEntity)c;

            return(LevelCmdHelper.InitEntity(aec.Entity));
        }