Exemplo n.º 1
0
        private void WriteMapDataTo(BinaryWriter writer, AssetNameCollection assetNames)
        {
            if (ScriptImportSize != null)
            {
                writer.Write(assetNames.GetOrCreateAssetIndex(ScriptImportSize.AssetName));
                ScriptImportSize.WriteTo(writer, assetNames);
            }

            writer.Write(assetNames.GetOrCreateAssetIndex(PlayerScriptsList.AssetName));
            PlayerScripts.WriteTo(writer, assetNames);

            if (NamedCameras != null)
            {
                writer.Write(assetNames.GetOrCreateAssetIndex(NamedCameras.AssetName));
                NamedCameras.WriteTo(writer);
            }

            if (CameraAnimationList != null)
            {
                writer.Write(assetNames.GetOrCreateAssetIndex(CameraAnimationList.AssetName));
                CameraAnimationList.WriteTo(writer);
            }

            writer.Write(assetNames.GetOrCreateAssetIndex(ScriptsPlayers.AssetName));
            ScriptsPlayers.WriteTo(writer, assetNames);

            writer.Write(assetNames.GetOrCreateAssetIndex(ObjectsList.AssetName));
            ObjectsList.WriteTo(writer, assetNames);

            if (PolygonTriggers != null)
            {
                writer.Write(assetNames.GetOrCreateAssetIndex(PolygonTriggers.AssetName));
                PolygonTriggers.WriteTo(writer);
            }

            if (TriggerAreas != null)
            {
                writer.Write(assetNames.GetOrCreateAssetIndex(TriggerAreas.AssetName));
                TriggerAreas.WriteTo(writer);
            }

            writer.Write(assetNames.GetOrCreateAssetIndex(ScriptTeams.AssetName));
            Teams.WriteTo(writer, assetNames);

            writer.Write(assetNames.GetOrCreateAssetIndex(WaypointsList.AssetName));
            WaypointsList.WriteTo(writer);
        }
Exemplo n.º 2
0
        private void WriteMapDataTo(BinaryWriter writer, AssetNameCollection assetNames)
        {
            writer.Write(assetNames.GetOrCreateAssetIndex(PlayerScriptsList.AssetName));
            PlayerScripts.WriteTo(writer, assetNames);

            writer.Write(assetNames.GetOrCreateAssetIndex(ScriptsPlayers.AssetName));
            Players.WriteTo(writer);

            writer.Write(assetNames.GetOrCreateAssetIndex(ObjectsList.AssetName));
            ObjectsList.WriteTo(writer, assetNames);

            writer.Write(assetNames.GetOrCreateAssetIndex(PolygonTriggers.AssetName));
            PolygonTriggers.WriteTo(writer);

            writer.Write(assetNames.GetOrCreateAssetIndex(ScriptTeams.AssetName));
            Teams.WriteTo(writer, assetNames);

            writer.Write(assetNames.GetOrCreateAssetIndex(WaypointsList.AssetName));
            WaypointsList.WriteTo(writer);
        }