Exemplo n.º 1
0
        private static void GenerateDefaultSnapshot()
        {
            var snapshotEntities = new Dictionary <EntityId, Entity>();
            var currentEntityId  = 1;

            var islandEntityId = new EntityId(currentEntityId++);

            snapshotEntities.Add(islandEntityId, EntityTemplateFactory.CreateIslandTemplate(0, 0, "Greenish Land"));

            var playerCreatorPlatformPosition = new PlatformPosition.Data(new Vector3f(0.0f, 0.0f, 0.0f), islandEntityId);

            snapshotEntities.Add(new EntityId(currentEntityId++), EntityTemplateFactory.CreatePlayerCreatorTemplate(playerCreatorPlatformPosition));
            snapshotEntities.Add(new EntityId(currentEntityId++), EntityTemplateFactory.CreateShipTemplate(-5, 25, 0, "SS McBoatFace"));

            SaveSnapshot(snapshotEntities);
        }