using System; using System.Collections.Generic; using System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using Microsoft.CodeAnalysis; using UnityEngine; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")] [assembly: AssemblyCompany("SlipSkid.MapSDK")] [assembly: AssemblyConfiguration("Release")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0")] [assembly: AssemblyProduct("SlipSkid.MapSDK")] [assembly: AssemblyTitle("SlipSkid.MapSDK")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] [module: RefSafetyRules(11)] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Embedded] [AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)] internal sealed class RefSafetyRulesAttribute : Attribute { public readonly int Version; public RefSafetyRulesAttribute(int P_0) { Version = P_0; } } } namespace SlipSkid.MapSDK { [AddComponentMenu("Slip & Skid/Map Root")] public class MapRoot : MonoBehaviour { [Header("Identity")] public string mapName = "My Map"; public string author = ""; [Range(1f, 5f)] public int difficulty = 1; [Tooltip("Lets the Random level picker run this map in reverse.")] public bool isReversible; [Header("Environment")] [Tooltip("Index into the game's SurfaceManager.surfaces, used when a road tile doesn't pick its own. Surfaces are global and networked by index, so maps have to reuse the game's rather than ship their own.")] public int defaultSurfaceIndex; [Tooltip("Copy biome and lighting from this stock level. Empty = the first one.")] public string biomeFromLevel = ""; [Tooltip("Force the backdrop scenery regardless of what the track is made of. Matched loosely against the stock biome names: Asphalt, Dirt, Ice, Magma, Mud, Sand. Empty = picked from the dominant surface.\n\nThis is how you get desert scenery on an asphalt track. Choosing it through the surface instead would also change how the car handles.")] public string forceEnvironmentBiome = ""; } [AddComponentMenu("Slip & Skid/Road Tile")] public class MapRoadTile : MonoBehaviour { [Tooltip("-1 = use the map's default. Otherwise an index into SurfaceManager.surfaces.")] public int surfaceIndex = -1; [Tooltip("Stable unique id, filled in automatically. Surface swaps are networked by this GUID, so changing it between builds desyncs clients.")] public string tileGuid = ""; [Tooltip("Swap this tile's geometry for a real road piece taken from a stock level. The tile's own mesh becomes placement data only; the piece brings the game's mesh, borders and materials with it.")] public bool useStockRoadPiece = true; [Tooltip("Skin this tile with the game's own surface material. Recommended: the surface-swap mechanic matches materials by name, so a tile that keeps a custom material never changes surface with the rest of the track. Uncheck for decorative geometry.")] public bool useGameSurfaceMaterial = true; private void Reset() { if (string.IsNullOrEmpty(tileGuid)) { tileGuid = Guid.NewGuid().ToString(); } } } [AddComponentMenu("Slip & Skid/Road Border")] public class MapRoadBorder : MonoBehaviour { } [AddComponentMenu("Slip & Skid/Boost Pad")] public class MapBoostPad : MonoBehaviour { [Tooltip("Speed added along the car's forward when you drive onto the pad.")] public float boostSpeed = 15f; [Tooltip("ON: the game's own behaviour, where Boost Speed is a TARGET and nothing happens if you're already faster. Values below cruising speed do nothing.\n\nOFF (default): Boost Speed is always added, so small values give a small nudge and the pad still helps at top speed.")] public bool capAtBoostSpeed; [Tooltip("Continuous push while the car is on the pad, along the PAD's forward. Zero by default: imported meshes rarely face down the track, and a non-zero value here shoves cars sideways.")] public float continuousAcceleration; } [AddComponentMenu("Slip & Skid/Map Music")] [RequireComponent(typeof(AudioSource))] public class MapMusic : MonoBehaviour { [Tooltip("Play instead of the game's racing track while this map is loaded.")] public bool replaceStockMusic = true; [Tooltip("Route through the game's music mixer so the volume setting applies. Off = full volume regardless of settings.")] public bool useGameMusicVolume = true; [Tooltip("Fade this music out while the game plays one of its own tracks, such as the obstacle picker or the scoreboard, and fade back in for the race. Off = both play at once.")] public bool duckForGameMusic = true; [Tooltip("How long the fade takes, in seconds.")] public float fadeSeconds = 1.5f; } [AddComponentMenu("Slip & Skid/Collision Mesh")] public class MapCollisionMesh : MonoBehaviour { } [AddComponentMenu("Slip & Skid/Start Line")] public class MapStartLine : MonoBehaviour { } [AddComponentMenu("Slip & Skid/Finish Line")] public class MapFinishLine : MonoBehaviour { public float width = 14f; public float height = 8f; } [AddComponentMenu("Slip & Skid/Checkpoint")] public class MapCheckpoint : MonoBehaviour { [Tooltip("Pass order, ascending. Ties break by sibling index.")] public int order; public float width = 14f; public float height = 8f; } [AddComponentMenu("Slip & Skid/Spawn Points")] public class MapSpawnPoints : MonoBehaviour { [Tooltip("In grid order. Children are used automatically when this is empty.")] public List points = new List(); [Tooltip("Optional dedicated time-trial spawn. Falls back to the first point.")] public Transform timeTrialSpawn; public List Resolve() { //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Expected O, but got Unknown if (points != null && points.Count > 0) { return points; } List list = new List(); foreach (Transform item2 in ((Component)this).transform) { Transform item = item2; list.Add(item); } return list; } } [AddComponentMenu("Slip & Skid/End Game Platform")] public class MapEndGamePlatform : MonoBehaviour { public List finishOrderSpawns = new List(); } [AddComponentMenu("Slip & Skid/Gravity Sphere")] public class MapGravitySphere : MonoBehaviour { public float gravity = 40f; public float innerRadius = 2.5f; public float outerRadius = 10f; public bool useObjectScale = true; } }