private static void GenerateSnapshotProgrammatically()
    {
        var snapshotEntities = new Dictionary <EntityId, SnapshotEntity>();
        var currentEntityId  = 0;

        snapshotEntities.Add(new EntityId(currentEntityId++), TerrainEntityTemplate.GenerateTerrainSnapshotEntityTemplate());
        snapshotEntities.Add(new EntityId(currentEntityId++), PlayerSpawnerEntityTemplate.GeneratePlayerSpawnerSnapshotEntityTemplate());

        SaveSnapshot(snapshotEntities);
    }
示例#2
0
    private static void GenerateSnapshotProgrammatically()
    {
        var snapshotEntities = new Dictionary <EntityId, SnapshotEntity>();
        var currentEntityId  = 0;


        FishEntityTemplate.PopulateSnapshotWithFishEntities(ref snapshotEntities, ref currentEntityId);
        SwarmGoalEntityTemplate.PopulateSnapshotWithSwarmGoalEntities(ref snapshotEntities, ref currentEntityId);
        snapshotEntities.Add(new EntityId(currentEntityId++), PlayerSpawnerEntityTemplate.GeneratePlayerSpawnerSnapshotEntityTemplate());
        SaveSnapshot(snapshotEntities);
    }