Exemplo n.º 1
0
        public World BackupWorld()
        {
            var world = new World("lockStepWorld", WorldFlags.Simulation);

            world.EntityManager.CopyAndReplaceEntitiesFrom(activeWorld.EntityManager);
            world.SetTime(new Unity.Core.TimeData(activeWorld.Time.ElapsedTime, activeWorld.Time.DeltaTime));
            return(world);
        }
Exemplo n.º 2
0
 public void CopyWorld(World toWorld, World fromWorld)
 {
     //snapShotWorld.EntityManager.DestroyAndResetAllEntities();
     toWorld.EntityManager.CopyAndReplaceEntitiesFrom(fromWorld.EntityManager);
     toWorld.SetTime(new Unity.Core.TimeData(fromWorld.Time.ElapsedTime, fromWorld.Time.DeltaTime));
 }