using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.Globalization; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using BombRushMP.Common; using BombRushMP.PluginCommon; using CommonAPI; using Microsoft.CodeAnalysis; using Reptile; using TMPro; using UnityEngine; using UnityEngine.UI; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: TargetFramework(".NETFramework,Version=v4.6.2", FrameworkDisplayName = ".NET Framework 4.6.2")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("0.0.0.0")] [module: UnverifiableCode] [module: RefSafetyRules(11)] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Microsoft.CodeAnalysis.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 BombRushMP.Mono { public class SpecialSkinDefinition : MonoBehaviour { [Header("Visuals")] public bool CanBlink; public string MainRendererName; public Material[] Variants; [Header("Voice Lines")] public AudioClip[] Jump; public AudioClip[] GetHit; public AudioClip[] Die; public AudioClip[] DieFall; public AudioClip[] Combo; public AudioClip[] BoostTrick; public AudioClip[] Talk; } public class ToggleInteractable : CustomInteractable { public AudioSource ToggleOnSFX; public AudioSource ToggleOffSFX; public GameObject ObjectToToggleOn; public GameObject ObjectToToggleOff; public bool StartsOn; private bool _isOn; private void Awake() { base.PlacePlayerAtSnapPosition = false; base.LookAt = false; _isOn = StartsOn; UpdateState(); } public override void Interact(Player player) { _isOn = !_isOn; if (_isOn) { if ((Object)(object)ToggleOnSFX != (Object)null) { ToggleOnSFX.Play(); } } else if ((Object)(object)ToggleOffSFX != (Object)null) { ToggleOffSFX.Play(); } UpdateState(); } private void UpdateState() { if (_isOn) { ObjectToToggleOn.gameObject.SetActive(true); ObjectToToggleOff.gameObject.SetActive(false); } else { ObjectToToggleOn.gameObject.SetActive(false); ObjectToToggleOff.gameObject.SetActive(true); } } } public static class PluginInfo { public const string PLUGIN_GUID = "BombRushMP.Mono"; public const string PLUGIN_NAME = "BombRushMP.Mono"; public const string PLUGIN_VERSION = "1.0.0"; } } namespace BombRushMP.Mono.Runtime { public class Creeper : MonoBehaviour { public enum States { None, LookAround, Wander, Attack } public float AnimationSpeed = 5f; public float AnimationDegrees = 30f; public float Knockback = 1f; public float KnockbackUp = 1f; public float KnockbackTime = 0.5f; private float _knockbackTimer; public AudioSource PrimeAudioSource; public Material FlashMaterial; public float DetectionRange = 10f; public float AttackRange = 0.8f; public float KillPlaneY; public Renderer MovementArea; public AudioClip[] ExplosionSFX; public GameObject ExplosionEffect; public float ExplosionTime = 1.5f; public int ExplosionDamage = 3; public float ExplosionRadius = 2f; public float PrimeRadius = 3f; public float TurnSpeed = 200f; public float TopSpeed = 5f; public float Acceleration = 2f; public float PrimeGrace = 0.8f; public float PrimeGraceRadius = 4f; public float GrowTime = 1.2f; public float GrowSize = 0.3f; public float FlashInterval = 0.1f; public float FlashTime = 0.05f; public float HeadHeight = 1.8f; public float WanderUpdateTime = 1.5f; private Bounds _movementBounds; private Rigidbody _rb; private Renderer _renderer; private Material _originalMaterial; private Player _player; private States _currentState; private float _stateTimer; private bool _primed; private float _primeTimer; private float _flashTimer; private Transform _frontLLeg; private Transform _frontRLeg; private Transform _backLLeg; private Transform _backRLeg; private Vector3 _movementVector = Vector3.zero; private static States[] WanderStates = new States[2] { States.Wander, States.LookAround }; private static List Creepers = new List(); private void OnDrawGizmos() { //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Unknown result type (might be due to invalid IL or missing references) Gizmos.color = new Color(1f, 0f, 0f, 0.25f); Gizmos.DrawSphere(((Component)this).transform.position, ExplosionRadius); Gizmos.color = new Color(0f, 0f, 1f, 1f); Gizmos.DrawWireSphere(((Component)this).transform.position, DetectionRange); Gizmos.color = new Color(1f, 1f, 0f, 1f); Gizmos.DrawWireSphere(((Component)this).transform.position + HeadHeight * ((Component)this).transform.up, 0.5f); } private void Awake() { //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)MovementArea != (Object)null) { _movementBounds = MovementArea.bounds; } else { _movementBounds = new Bounds(((Component)this).transform.position, new Vector3(float.PositiveInfinity, float.PositiveInfinity, float.PositiveInfinity)); } _rb = ((Component)this).GetComponent(); _renderer = ((Component)this).GetComponentInChildren(); _originalMaterial = _renderer.sharedMaterial; Transform val = TransformExtentions.FindRecursive(((Component)this).transform, "root"); _frontLLeg = val.Find("footf.L"); _frontRLeg = val.Find("footf.R"); _backLLeg = val.Find("footb.L"); _backRLeg = val.Find("footb.R"); Creepers.Add(this); } private void UpdateAnimation() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: Unknown result type (might be due to invalid IL or missing references) Vector3 velocity = _rb.velocity; velocity.y = 0f; float magnitude = ((Vector3)(ref velocity)).magnitude; float num = Mathf.Min(1f, magnitude / TopSpeed); float num2 = Mathf.Sin(Time.timeSinceLevelLoad * AnimationSpeed) * AnimationDegrees; ((Component)_frontLLeg).transform.localRotation = Quaternion.Euler(147.323f + num2 * num, 0f, 0f); ((Component)_frontRLeg).transform.localRotation = Quaternion.Euler(147.323f - num2 * num, 0f, 0f); ((Component)_backRLeg).transform.localRotation = Quaternion.Euler(-146.254f + num2 * num, 0f, 0f); ((Component)_backLLeg).transform.localRotation = Quaternion.Euler(-146.254f - num2 * num, 0f, 0f); } private void UpdateDetection() { //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00ca: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: Unknown result type (might be due to invalid IL or missing references) _player = null; Player currentPlayer = WorldHandler.instance.GetCurrentPlayer(); if (Vector3.Distance(((Component)this).transform.position + ((Component)this).transform.up * HeadHeight, ((Component)currentPlayer).transform.position) <= DetectionRange && !currentPlayer.IsDead() && (CalculateVisibility(((Component)currentPlayer).transform.position + ((Component)currentPlayer).transform.up * 0.25f) || CalculateVisibility(((Component)currentPlayer).transform.position + ((Component)currentPlayer).transform.up * 0.8f) || CalculateVisibility(((Component)currentPlayer).transform.position + ((Component)currentPlayer).transform.up * 1.3f))) { _player = currentPlayer; } } private void PickRandomWanderState() { SetState(WanderStates[Random.Range(0, WanderStates.Length)], forceResetTimer: true); } private void CalculateState() { if ((Object)(object)_player != (Object)null) { SetState(States.Attack); } else if (_currentState == States.None || _currentState == States.Attack || _stateTimer >= WanderUpdateTime) { PickRandomWanderState(); } } private void SetState(States newState, bool forceResetTimer = false) { if (forceResetTimer) { _stateTimer = 0f; } if (newState != _currentState) { _currentState = newState; _stateTimer = 0f; } } private void AttackStateUpdate() { //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_009f: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00e7: Unknown result type (might be due to invalid IL or missing references) //IL_00ec: Unknown result type (might be due to invalid IL or missing references) //IL_00f2: Unknown result type (might be due to invalid IL or missing references) //IL_00f9: Unknown result type (might be due to invalid IL or missing references) //IL_00fe: Unknown result type (might be due to invalid IL or missing references) //IL_0103: Unknown result type (might be due to invalid IL or missing references) //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_010c: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_0117: Unknown result type (might be due to invalid IL or missing references) //IL_0118: Unknown result type (might be due to invalid IL or missing references) //IL_0134: Unknown result type (might be due to invalid IL or missing references) //IL_0139: Unknown result type (might be due to invalid IL or missing references) Vector3 val = ((Component)_player).transform.position - ((Component)this).transform.position; Vector3 normalized = ((Vector3)(ref val)).normalized; _ = ((Vector3)(ref normalized)).normalized; float num = Vector3.Distance(((Component)this).transform.position, ((Component)_player).transform.position); if (num <= PrimeRadius && !_primed) { Prime(); } if (_primed && num > PrimeGraceRadius && _primeTimer <= PrimeGrace) { UnPrime(); } Vector3 val2 = ((Component)_player).transform.position; if (!((Bounds)(ref _movementBounds)).Contains(val2)) { val2 = ((Bounds)(ref _movementBounds)).ClosestPoint(((Component)_player).transform.position); } val2.y = ((Component)this).transform.position.y; float num2 = Vector3.Distance(((Component)this).transform.position, val2); val = val2 - ((Component)this).transform.position; Vector3 normalized2 = ((Vector3)(ref val)).normalized; if (!(num2 <= AttackRange)) { _movementVector = normalized2; _movementVector.y = 0f; _movementVector = ((Vector3)(ref _movementVector)).normalized; } } private void MovementUpdate() { //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Unknown result type (might be due to invalid IL or missing references) if (_knockbackTimer > 0f) { return; } Vector3 velocity = _rb.velocity; float y = velocity.y; velocity.y = 0f; float num = ((Vector3)(ref velocity)).magnitude; Vector3 val = _movementVector; if (((Vector3)(ref _movementVector)).magnitude <= 0f) { val = ((Vector3)(ref velocity)).normalized; if (num > 0f) { num = Mathf.Max(0f, num - Acceleration * Time.deltaTime); } } else { num = Mathf.Min(TopSpeed, num + Acceleration * Time.deltaTime); } Vector3 velocity2 = num * val; velocity2.y = y; _rb.velocity = velocity2; } private void LookUpdate() { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) Vector3 val = Vector3.zero; if (_currentState == States.Attack && (Object)(object)_player != (Object)null) { Vector3 val2 = ((Component)_player).transform.position - _rb.position; Vector3 normalized = ((Vector3)(ref val2)).normalized; normalized.y = 0f; val = ((Vector3)(ref normalized)).normalized; } float num = Vector3.SignedAngle(_rb.rotation * Vector3.forward, val, Vector3.up); _rb.MoveRotation(_rb.rotation * Quaternion.Euler(0f, Mathf.Clamp(num, (0f - TurnSpeed) * Time.deltaTime, TurnSpeed * Time.deltaTime), 0f)); } private void StateUpdate() { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) _movementVector = Vector3.zero; if (_currentState == States.Attack) { AttackStateUpdate(); } _stateTimer += Time.deltaTime; } private bool CalculateVisibility(Vector3 to) { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) Vector3 val = ((Component)this).transform.position + HeadHeight * ((Component)this).transform.up; float num = Vector3.Distance(val, to); Vector3 val2 = to - val; Vector3 normalized = ((Vector3)(ref val2)).normalized; return !Physics.Raycast(new Ray(val, normalized), num, 1, (QueryTriggerInteraction)1); } private void CalculateCreeperCollision() { //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) foreach (Creeper creeper in Creepers) { if (!((Object)(object)creeper == (Object)(object)this)) { Vector3 position = ((Component)creeper).transform.position; position.y = ((Component)this).transform.position.y; float num = Vector3.Distance(position, ((Component)this).transform.position); if (num <= 1f) { Vector3 val = position - ((Component)this).transform.position; Vector3 normalized = ((Vector3)(ref val)).normalized; Transform transform = ((Component)this).transform; transform.position -= normalized * (1f - num); } } } } private void FixedUpdate() { //IL_002a: Unknown result type (might be due to invalid IL or missing references) UpdateDetection(); CalculateState(); StateUpdate(); MovementUpdate(); LookUpdate(); CalculateCreeperCollision(); if (((Component)this).transform.localPosition.y <= KillPlaneY) { Kill(); } _knockbackTimer -= Time.deltaTime; if (_knockbackTimer < 0f) { _knockbackTimer = 0f; } } private void OnTriggerStay(Collider other) { //IL_004d: Unknown result type (might be due to invalid IL or missing references) if (!(_knockbackTimer > 0f) && ((Component)other).gameObject.layer == 18) { Player componentInParent = ((Component)other).gameObject.GetComponentInParent(); if (!((Object)(object)componentInParent == (Object)null) && !componentInParent.isAI && !componentInParent.IsDead()) { GetKnockBack(((Component)componentInParent).transform.position); } } } private void GetKnockBack(Vector3 from) { //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) if (!(_knockbackTimer > 0f)) { Vector3 val = from - ((Component)this).transform.position; Vector3 normalized = ((Vector3)(ref val)).normalized; normalized.y = 0f; normalized = ((Vector3)(ref normalized)).normalized; _rb.velocity = -normalized * Knockback; Rigidbody rb = _rb; rb.velocity += Vector3.up * KnockbackUp; _knockbackTimer = KnockbackTime; } } private void Prime() { if (!_primed) { _primed = true; PrimeAudioSource.Play(); } } private void UnPrime() { //IL_0042: Unknown result type (might be due to invalid IL or missing references) if (_primed) { _primed = false; _flashTimer = 0f; _primeTimer = 0f; _renderer.sharedMaterial = _originalMaterial; ((Component)_renderer).transform.localScale = Vector3.one; } } private void UpdatePrime() { //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Unknown result type (might be due to invalid IL or missing references) if (_primed) { if (_flashTimer >= FlashInterval + FlashTime) { _flashTimer = 0f; _renderer.sharedMaterial = _originalMaterial; } else if (_flashTimer >= FlashInterval) { _renderer.sharedMaterial = FlashMaterial; } float num = (Mathf.Clamp(_primeTimer, GrowTime, ExplosionTime) - GrowTime) / (ExplosionTime - GrowTime) * GrowSize; ((Component)_renderer).transform.localScale = Vector3.one + new Vector3(num, num, num); if (_primeTimer >= ExplosionTime) { Explode(); } _primeTimer += Time.deltaTime; _flashTimer += Time.deltaTime; } } private void Explode() { //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) Object.Instantiate(ExplosionEffect).transform.position = ((Component)this).transform.position; OneShotAudio.Create(ExplosionSFX[Random.Range(0, ExplosionSFX.Length)], ((Component)this).transform.position, 1f, 10f, 15f); Player currentPlayer = WorldHandler.instance.GetCurrentPlayer(); if (Vector3.Distance(((Component)this).transform.position, ((Component)currentPlayer).transform.position) <= ExplosionRadius && !currentPlayer.IsDead()) { int explosionDamage = ExplosionDamage; Vector3 val = ((Component)this).transform.position - ((Component)currentPlayer).transform.position; currentPlayer.GetHit(explosionDamage, ((Vector3)(ref val)).normalized, (KnockbackType)2); GameplayCamera.StartScreenShake((ScreenShakeType)2, 0.3f, false); } _primeTimer = 0f; Kill(); } private void LateUpdate() { UpdatePrime(); UpdateAnimation(); } private void Kill() { Creepers.Remove(this); Object.Destroy((Object)(object)((Component)this).gameObject); } } public class CutsceneCharacterMesh : MonoBehaviour { [CompilerGenerated] private sealed class d__11 : IEnumerator, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; public CutsceneCharacterMesh <>4__this; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__11(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Expected O, but got Unknown int num = <>1__state; CutsceneCharacterMesh cutsceneCharacterMesh = <>4__this; switch (num) { default: return false; case 0: <>1__state = -1; cutsceneCharacterMesh.ResetBlinkTimer(); cutsceneCharacterMesh.CloseEyes(); <>2__current = (object)new WaitForSeconds(0.1f); <>1__state = 1; return true; case 1: <>1__state = -1; cutsceneCharacterMesh.OpenEyes(); return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } public int CharacterIndex = -1; public bool CanBlink; private SkinnedMeshRenderer _renderer; private int _prevOutfit = -1; private float _blinkTimer; private float _blendShape; public Characters Character => (Characters)CharacterIndex; private void Start() { _renderer = ((Component)this).GetComponent(); UpdateSkin(); } private void ResetBlinkTimer() { _blinkTimer = Random.Range(2, 4); } private void Update() { UpdateSkin(); if (CanBlink) { _blinkTimer -= Time.deltaTime; if (_blinkTimer <= 0f) { ((MonoBehaviour)this).StartCoroutine(Blink()); } } } [IteratorStateMachine(typeof(d__11))] private IEnumerator Blink() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__11(0) { <>4__this = this }; } private void CloseEyes() { _blendShape = 100f; } private void OpenEyes() { _blendShape = 0f; } private void LateUpdate() { if (CanBlink) { _renderer.SetBlendShapeWeight(0, _blendShape); } } private void UpdateSkin() { //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) if (CharacterIndex != -1) { int outfit = Core.Instance.SaveManager.CurrentSaveSlot.GetCharacterProgress(Character).outfit; if (outfit != _prevOutfit) { _prevOutfit = outfit; Material sharedMaterial = Core.Instance.BaseModule.StageManager.characterConstructor.CreateCharacterMaterial(Character, outfit); ((Renderer)_renderer).sharedMaterial = sharedMaterial; } } } } public class CyberNPC : CustomInteractable { public GameObject DialogueCamera; public GameObject NoteCamera; public GameObject Note; public Animator DjAnimator; public Animator VehicleAnimator; public Transform MinecraftSpawnPoint; public GameObject RedGetIn; public GameObject GetInCamera; public GameObject MinecraftCamera; private CustomSequence _dialogueSequence; private CustomSequence _minecraftIntroSequence; private void Awake() { _minecraftIntroSequence = (CustomSequence)(object)new MinecraftIntroSequence(DialogueCamera, NoteCamera, DjAnimator, Note, VehicleAnimator, MinecraftSpawnPoint, RedGetIn, GetInCamera, MinecraftCamera); _dialogueSequence = (CustomSequence)(object)new CyberStartDialogue(DialogueCamera, _minecraftIntroSequence); base.PlacePlayerAtSnapPosition = true; } public override void Interact(Player player) { CustomSequenceHandler.instance.StartEnteringSequence(_dialogueSequence, (CustomInteractable)(object)this, false, true, false, true, true, true, true, false); } } public class CyberStartDialogue : CustomSequence { private GameObject _camera; private bool _saidYes = true; private CustomSequence _followUpSequence; public CyberStartDialogue(GameObject camera, CustomSequence followUpSequence) { _camera = camera; _followUpSequence = followUpSequence; } public override void Play() { //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Expected O, but got Unknown ((CustomSequence)this).Play(); _saidYes = true; ((CustomSequence)this).SetCamera(_camera); CustomDialogue askDialogue = new CustomDialogue(string.Empty, "Start Event Course?", (CustomDialogue)null); askDialogue.EndSequenceOnFinish = true; CustomDialogue obj = askDialogue; obj.OnDialogueBegin = (Action)Delegate.Combine(obj.OnDialogueBegin, (Action)delegate { ((CustomSequence)this).RequestYesNoPrompt(); }); CustomDialogue obj2 = askDialogue; obj2.OnDialogueEnd = (Action)Delegate.Combine(obj2.OnDialogueEnd, (Action)delegate { _saidYes = askDialogue.AnsweredYes; }); ((CustomSequence)this).StartDialogue(askDialogue, 0.9f); } public override void Stop() { ((CustomSequence)this).Stop(); if (_saidYes) { CustomSequenceHandler.instance.StartEnteringSequence(_followUpSequence, (CustomInteractable)null, false, true, false, true, true, true, true, false); } } } public class Dispenser : MonoBehaviour { public Tnt Prefab; public float ForwardForce = 1f; public float UpForce = 0.5f; public void Trigger() { //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) Tnt tnt = Object.Instantiate(Prefab); ((Component)tnt).transform.position = ((Component)this).transform.position + ((Component)this).transform.forward; tnt.ApplyForce(((Component)this).transform.forward * ForwardForce + Vector3.up * UpForce); } } public class ExplosionEffect : MonoBehaviour { public float Lifetime = 0.8f; private float _timer; private void Update() { if (_timer >= Lifetime) { Object.Destroy((Object)(object)((Component)this).gameObject); } _timer += Time.deltaTime; } } public class GraffitiReticle : MonoBehaviour { private void Awake() { RawImage component = ((Component)this).GetComponent(); Texture2D graffitiReticle = Theme.CurrentTheme.GraffitiReticle; if ((Object)(object)graffitiReticle != (Object)null) { component.texture = (Texture)(object)graffitiReticle; } } } public class MinecraftIntroSequence : CustomSequence { private GameObject _introDialogueCamera; private GameObject _noteCamera; private GameObject _getInCamera; private GameObject _minecraftCamera; private CustomDialogue _diag1; private CustomDialogue _diag2; private CustomDialogue _diag3; private CustomDialogue _diag4; private CustomDialogue _diag5; private CustomDialogue _diag6; private CustomDialogue _diag7; private Animator _djAnimator; private Animator _vehicleAnimator; private GameObject _noteGameObject; private GameObject _redGetInGameObject; private Transform _minecraftSpawnPoint; private const string DJName = "DJ CYBER"; private const string RedName = "RED"; private void CleanUp() { _djAnimator.Play("NPC Idle"); _vehicleAnimator.Play("Idle"); _noteGameObject.SetActive(false); SharedUtils.SetLocalSpecialSkin((SpecialSkins)8); PlaceAtMinecraft(); _redGetInGameObject.SetActive(false); MinecraftPlayer.Create(); } private void PlaceAtMinecraft() { //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) base.player.CompletelyStop(); WorldHandler.instance.PlacePlayerAt(base.player, _minecraftSpawnPoint.position, _minecraftSpawnPoint.rotation, true); base.player.CompletelyStop(); base.player.SetPosAndRotHard(_minecraftSpawnPoint.position, _minecraftSpawnPoint.rotation); } public MinecraftIntroSequence(GameObject introCamera, GameObject noteCamera, Animator djAnimator, GameObject note, Animator vehicleAnimator, Transform minecraftSpawnPoint, GameObject redGetIn, GameObject getInCamera, GameObject minecraftCamera) { _introDialogueCamera = introCamera; _noteCamera = noteCamera; _djAnimator = djAnimator; _noteGameObject = note; _minecraftSpawnPoint = minecraftSpawnPoint; _vehicleAnimator = vehicleAnimator; _redGetInGameObject = redGetIn; _getInCamera = getInCamera; _minecraftCamera = minecraftCamera; } private void InitializeDialogue() { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Expected O, but got Unknown //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Expected O, but got Unknown //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Expected O, but got Unknown //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Expected O, but got Unknown //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Expected O, but got Unknown //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Expected O, but got Unknown //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Expected O, but got Unknown _diag1 = new CustomDialogue("DJ CYBER", "Red. I've been looking for you.", (CustomDialogue)null); _diag2 = new CustomDialogue("DJ CYBER", "Does this look familiar to you?", (CustomDialogue)null); _diag3 = new CustomDialogue("DJ CYBER", "Looks innocent enough, but this little Christmas wish of yours is a huge roadblock.", (CustomDialogue)null); _diag4 = new CustomDialogue("DJ CYBER", "I suspect it has created an alternate reality. One where Minecraft is real. Part of your mind is stuck in there right now.", (CustomDialogue)null); _diag5 = new CustomDialogue("DJ CYBER", "We can't bring your memories back, much less defeat Faux and go All City if we don't get your mind out of that reality.", (CustomDialogue)null); _diag6 = new CustomDialogue("DJ CYBER", "Please, jump in. Find a way out of there, and make it quick. It all depends on it.", (CustomDialogue)null); _diag7 = new CustomDialogue("RED", "This shit is stupid.", (CustomDialogue)null); CustomDialogue diag = _diag1; diag.OnDialogueEnd = (Action)Delegate.Combine(diag.OnDialogueEnd, (Action)delegate { _djAnimator.SetTrigger("ShowNote"); _noteGameObject.SetActive(true); ((CustomSequence)this).SetCamera(_noteCamera); ((CustomSequence)this).StartDialogue(_diag2, 0.9f); }); _diag2.NextDialogue = _diag3; CustomDialogue diag2 = _diag3; diag2.OnDialogueEnd = (Action)Delegate.Combine(diag2.OnDialogueEnd, (Action)delegate { _djAnimator.SetTrigger("HideNote"); ((CustomSequence)this).SetCamera(_introDialogueCamera); ((CustomSequence)this).StartDialogue(_diag4, 0.9f); }); _diag4.NextDialogue = _diag5; _diag5.NextDialogue = _diag6; CustomDialogue diag3 = _diag6; diag3.OnDialogueEnd = (Action)Delegate.Combine(diag3.OnDialogueEnd, (Action)delegate { _vehicleAnimator.SetTrigger("Open"); _redGetInGameObject.SetActive(true); SharedUtils.SetLocalSpecialSkin((SpecialSkins)8); PlaceAtMinecraft(); ((CustomSequence)this).StartDialogue(_diag7, 4f); ((CustomSequence)this).SetCamera(_getInCamera); }); _diag7.EndSequenceOnFinish = true; CustomDialogue diag4 = _diag7; diag4.OnDialogueBegin = (Action)Delegate.Combine(diag4.OnDialogueBegin, (Action)delegate { ((CustomSequence)this).SetCamera(_minecraftCamera); PlaceAtMinecraft(); }); } public override void Play() { ((CustomSequence)this).Play(); InitializeDialogue(); SharedUtils.SetLocalCharacter((Characters)3); ((CustomSequence)this).SetCamera(_introDialogueCamera); ((CustomSequence)this).StartDialogue(_diag1, 0.9f); } public override void Stop() { ((CustomSequence)this).Stop(); CleanUp(); } } public class MinecraftPlayer : MonoBehaviour { public int CollectedObsidian; public bool CollectedFlintAndSteel; public static MinecraftPlayer Instance { get; private set; } private void Awake() { Instance = this; } private void OnDestroy() { Instance = null; } public void Kill() { SharedUtils.SetLocalCharacter((Characters)3); Object.Destroy((Object)(object)((Component)this).gameObject); } public static void Create() { //IL_0013: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)Instance != (Object)null)) { new GameObject("Minecraft Player").AddComponent(); } } } public class Moon : MonoBehaviour { public float Distance = 50f; private Transform _sun; private void Awake() { AmbientManager val = Object.FindObjectOfType(); if ((Object)(object)val != (Object)null) { Transform val2 = ((Component)val).transform.Find("SunSprite"); if ((Object)(object)val2 != (Object)null) { ((Component)val2).gameObject.SetActive(false); } _sun = ((Component)val).transform; } else { ((Component)this).gameObject.SetActive(false); } } private void LateUpdate() { //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)_sun == (Object)null)) { Transform currentCameraTransform = WorldHandler.instance.CurrentCameraTransform; if (!((Object)(object)currentCameraTransform == (Object)null)) { ((Component)this).transform.position = currentCameraTransform.position - _sun.forward * Distance; ((Component)this).transform.rotation = Quaternion.LookRotation(_sun.forward, Vector3.up); } } } } public class NPCVisibilityController : MonoBehaviour { public GameObject NPC; public int AssociatedCharacterIndex = -1; private Characters AssociatedCharacter => (Characters)AssociatedCharacterIndex; private void Update() { //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) bool flag = true; Player currentPlayer = WorldHandler.instance.GetCurrentPlayer(); if ((Object)(object)currentPlayer != (Object)null && currentPlayer.character == AssociatedCharacter) { flag = false; } else if ((Object)(object)WorldHandler.instance.currentEncounter != (Object)null) { flag = false; } if (NPC.activeSelf != flag) { NPC.SetActive(flag); } } } public class OneShotAudio : MonoBehaviour { public float SFXTime = float.PositiveInfinity; private float _timer; private void Update() { if (_timer >= SFXTime) { Object.Destroy((Object)(object)((Component)this).gameObject); } _timer += Time.deltaTime; } public static OneShotAudio Create(AudioClip clip, Vector3 pos, float pitch, float dist, float falloff) { //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) GameObject val = new GameObject("Ohe Shot Audio"); val.transform.position = pos; AudioSource obj = val.AddComponent(); obj.outputAudioMixerGroup = Core.Instance.AudioManager.mixerGroups[3]; obj.clip = clip; obj.loop = false; obj.playOnAwake = false; obj.pitch = pitch; obj.spatialBlend = 1f; obj.minDistance = dist; obj.maxDistance = dist + falloff; obj.dopplerLevel = 0f; obj.Play(); OneShotAudio oneShotAudio = val.AddComponent(); oneShotAudio.SFXTime = clip.length; return oneShotAudio; } } public class Theme { public static Theme CurrentTheme; public Texture2D GraffitiReticle; public Color LobbyNameBackgroundColor { get; private set; } public Color LobbyNameColor { get; private set; } public Color LobbyPlayerBackgroundColor { get; private set; } public Color LobbyPlayerNameColor { get; private set; } public Color LobbyPlayerScoreColor { get; private set; } public Color LobbySettingsColor { get; private set; } public Color TimerColor { get; private set; } public Color MapOutlineColor { get; private set; } public Color MapBackgroundColor { get; private set; } public Color MapContentsColor { get; private set; } public Color MapIconsColor { get; private set; } public Color MapTextColor { get; private set; } public Color ChatTextColor { get; private set; } public Color ChatScrollViewColor { get; private set; } public Color ChatScrollBarColor { get; private set; } public Color ChatForegroundColor { get; private set; } public Color NotificationBackgroundColor { get; private set; } public Color NotificationTextColor { get; private set; } public Color NotificationIconColor { get; private set; } public Color GraffitiSwirlColor { get; private set; } public Color RaceGraffitiSwirlColor { get; private set; } public float RaceReticleSize { get; private set; } public float LobbyPlayerTeamBackgroundAlpha { get; private set; } public void ParseConfig(ThemeConfig config) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Unknown result type (might be due to invalid IL or missing references) //IL_00f2: Unknown result type (might be due to invalid IL or missing references) //IL_0104: Unknown result type (might be due to invalid IL or missing references) //IL_0116: Unknown result type (might be due to invalid IL or missing references) //IL_0128: Unknown result type (might be due to invalid IL or missing references) //IL_013a: Unknown result type (might be due to invalid IL or missing references) //IL_014c: Unknown result type (might be due to invalid IL or missing references) //IL_015e: Unknown result type (might be due to invalid IL or missing references) //IL_0170: Unknown result type (might be due to invalid IL or missing references) LobbyNameBackgroundColor = ColorFromHex(config.LobbyNameBackgroundColor); LobbyNameColor = ColorFromHex(config.LobbyNameColor); LobbyPlayerBackgroundColor = ColorFromHex(config.LobbyPlayerBackgroundColor); LobbyPlayerNameColor = ColorFromHex(config.LobbyPlayerNameColor); LobbyPlayerScoreColor = ColorFromHex(config.LobbyPlayerScoreColor); LobbySettingsColor = ColorFromHex(config.LobbySettingsColor); TimerColor = ColorFromHex(config.TimerColor); MapOutlineColor = ColorFromHex(config.MapOutlineColor); MapBackgroundColor = ColorFromHex(config.MapBackgroundColor); MapContentsColor = ColorFromHex(config.MapContentsColor); MapIconsColor = ColorFromHex(config.MapIconsColor); MapTextColor = ColorFromHex(config.MapTextColor); ChatTextColor = ColorFromHex(config.ChatTextColor); ChatScrollViewColor = ColorFromHex(config.ChatScrollViewColor); ChatScrollBarColor = ColorFromHex(config.ChatScrollBarColor); ChatForegroundColor = ColorFromHex(config.ChatForegroundColor); NotificationBackgroundColor = ColorFromHex(config.NotificationBackgroundColor); NotificationTextColor = ColorFromHex(config.NotificationTextColor); NotificationIconColor = ColorFromHex(config.NotificationIconColor); GraffitiSwirlColor = ColorFromHex(config.GraffitiSwirlColor); RaceGraffitiSwirlColor = ColorFromHex(config.RaceGraffitiSwirlColor); RaceReticleSize = config.RaceReticleSize; LobbyPlayerTeamBackgroundAlpha = config.LobbyPlayerTeamBackgroundAlpha; } private Color ColorFromHex(string hex) { //IL_00c5: Unknown result type (might be due to invalid IL or missing references) if (hex[0] != '#') { throw new ArgumentException("Color code does not begin with #", "hex"); } string text = hex.Substring(1); bool flag = false; if (text.Length == 8) { flag = true; } else if (text.Length != 6) { throw new ArgumentException("Color code is not 6 (RGB) or 8 (RGBA) characters long", "hex"); } float num = (float)int.Parse(text.Substring(0, 2), NumberStyles.HexNumber) / 255f; float num2 = (float)int.Parse(text.Substring(2, 2), NumberStyles.HexNumber) / 255f; float num3 = (float)int.Parse(text.Substring(4, 2), NumberStyles.HexNumber) / 255f; float num4 = 1f; if (flag) { num4 = (float)int.Parse(text.Substring(6, 2), NumberStyles.HexNumber) / 255f; } return new Color(num, num2, num3, num4); } } public class ThemeConfig { public string LobbyNameBackgroundColor = "#1BA800CC"; public string LobbyNameColor = "#FFFFFFFF"; public string LobbyPlayerBackgroundColor = "#000000CC"; public string LobbyPlayerNameColor = "#FFFFFFFF"; public string LobbyPlayerScoreColor = "#FFE900FF"; public string LobbySettingsColor = "#FFFFFFFF"; public string TimerColor = "#ECE873FF"; public string MapOutlineColor = "#000000FF"; public string MapBackgroundColor = "#121B4BFF"; public string MapContentsColor = "#FFFFFFFF"; public string MapIconsColor = "#FFFFFFFF"; public string MapTextColor = "#FFFFFFFF"; public string ChatTextColor = "#FFFFFFFF"; public string ChatScrollViewColor = "#00000080"; public string ChatScrollBarColor = "#262626FF"; public string ChatForegroundColor = "#3A3A3AFF"; public string NotificationBackgroundColor = "#00000080"; public string NotificationTextColor = "#FFFFFFFF"; public string NotificationIconColor = "#FFFFFFFF"; public string GraffitiSwirlColor = "#F4D342FF"; public string RaceGraffitiSwirlColor = "#F4D342FF"; public float RaceReticleSize = 1f; public float LobbyPlayerTeamBackgroundAlpha = 0.8f; } public class ThemeImage : MonoBehaviour { public enum ImageKind { LobbyNameBackground, LobbyPlayerNameBackground, MapOutline, MapBackground, MapTexture, MapIcon, NotificationBackground, NotificationIcon, ChatScrollView, ChatScrollBar, ChatForeground } public ImageKind Kind; private void Awake() { //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_0093: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00d2: Unknown result type (might be due to invalid IL or missing references) Image component = ((Component)this).GetComponent(); RawImage component2 = ((Component)this).GetComponent(); Color color = Color.white; Theme currentTheme = Theme.CurrentTheme; switch (Kind) { case ImageKind.LobbyNameBackground: color = currentTheme.LobbyNameBackgroundColor; break; case ImageKind.LobbyPlayerNameBackground: color = currentTheme.LobbyPlayerBackgroundColor; break; case ImageKind.MapOutline: color = currentTheme.MapOutlineColor; break; case ImageKind.MapBackground: color = currentTheme.MapBackgroundColor; break; case ImageKind.MapTexture: color = currentTheme.MapContentsColor; break; case ImageKind.MapIcon: color = currentTheme.MapIconsColor; break; case ImageKind.NotificationBackground: color = currentTheme.NotificationBackgroundColor; break; case ImageKind.NotificationIcon: color = currentTheme.NotificationIconColor; break; case ImageKind.ChatScrollView: color = currentTheme.ChatScrollViewColor; break; case ImageKind.ChatScrollBar: color = currentTheme.ChatScrollBarColor; break; case ImageKind.ChatForeground: color = currentTheme.ChatForegroundColor; break; } if ((Object)(object)component != (Object)null) { ((Graphic)component).color = color; } if ((Object)(object)component2 != (Object)null) { ((Graphic)component2).color = color; } } } public class ThemeText : MonoBehaviour { public enum TextKind { LobbyName, LobbyPlayerName, LobbyPlayerScore, LobbySettings, Timer, MapText, ChatText, NotificationText } public TextKind Kind; private void Awake() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) TextMeshProUGUI component = ((Component)this).GetComponent(); Color color = Color.white; Theme currentTheme = Theme.CurrentTheme; switch (Kind) { case TextKind.LobbyName: color = currentTheme.LobbyNameColor; break; case TextKind.LobbyPlayerName: color = currentTheme.LobbyPlayerNameColor; break; case TextKind.LobbyPlayerScore: color = currentTheme.LobbyPlayerScoreColor; break; case TextKind.LobbySettings: color = currentTheme.LobbySettingsColor; break; case TextKind.Timer: color = currentTheme.TimerColor; break; case TextKind.MapText: color = currentTheme.MapTextColor; break; case TextKind.ChatText: color = currentTheme.ChatTextColor; break; case TextKind.NotificationText: color = currentTheme.NotificationTextColor; break; } ((Graphic)component).color = color; } } public class Tnt : MonoBehaviour { public GameObject ExplosionEffect; public Material FlashMaterial; public float ExplosionTime = 1f; public float ExplosionRadius = 2f; public int ExplosionDamage = 2; public float GrowTime = 0.5f; public float GrowSize = 0.3f; public float FlashInterval = 0.1f; public float FlashTime = 0.05f; public AudioClip[] ExplosionSounds; private Material _originalMaterial; private Renderer _renderer; private float _flashTimer; private float _timer; private Rigidbody _rb; private AudioSource _audioSource; private void OnDrawGizmos() { //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) Gizmos.color = new Color(1f, 0f, 0f, 0.25f); Gizmos.DrawSphere(((Component)this).transform.position, ExplosionRadius); } public void ApplyForce(Vector3 force) { //IL_0006: Unknown result type (might be due to invalid IL or missing references) _rb.AddForce(force, (ForceMode)2); } private void Awake() { _renderer = ((Component)this).GetComponentInChildren(); _originalMaterial = _renderer.sharedMaterial; _rb = ((Component)this).GetComponent(); _audioSource = ((Component)this).GetComponentInChildren(); } private void Update() { //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) if (_flashTimer >= FlashInterval + FlashTime) { _flashTimer = 0f; _renderer.sharedMaterial = _originalMaterial; } else if (_flashTimer >= FlashInterval) { _renderer.sharedMaterial = FlashMaterial; } float num = (Mathf.Clamp(_timer, GrowTime, ExplosionTime) - GrowTime) / (ExplosionTime - GrowTime) * GrowSize; ((Component)_renderer).transform.localScale = Vector3.one + new Vector3(num, num, num); if (_timer >= ExplosionTime) { Explode(); } _flashTimer += Time.deltaTime; _timer += Time.deltaTime; } private void Explode() { //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: Unknown result type (might be due to invalid IL or missing references) Object.Instantiate(ExplosionEffect).transform.position = ((Component)this).transform.position; OneShotAudio.Create(ExplosionSounds[Random.Range(0, ExplosionSounds.Length)], ((Component)this).transform.position, 1f, 10f, 15f); Collider[] array = Physics.OverlapSphere(((Component)this).transform.position, ExplosionRadius, 32768, (QueryTriggerInteraction)1); for (int i = 0; i < array.Length; i++) { Player componentInParent = ((Component)array[i]).GetComponentInParent(); if (!((Object)(object)componentInParent == (Object)null) && !componentInParent.isAI) { int explosionDamage = ExplosionDamage; Vector3 val = ((Component)this).transform.position - ((Component)componentInParent).transform.position; componentInParent.GetHit(explosionDamage, ((Vector3)(ref val)).normalized, (KnockbackType)2); GameplayCamera.StartScreenShake((ScreenShakeType)2, 0.3f, false); } } _timer = 0f; Object.Destroy((Object)(object)((Component)this).gameObject); } } public class TrapTrigger : MonoBehaviour { public Dispenser Target; public AudioSource ClickSFX; public float PushInDistance = 0.1f; private GameObject _plateMesh; private float _triggerTimer; private Vector3 _initialPos; private void OnDrawGizmos() { //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)Target != (Object)null) { Gizmos.color = new Color(0f, 1f, 0f, 1f); Gizmos.DrawLine(((Component)this).transform.position, ((Component)Target).transform.position); } } private void Awake() { //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) _plateMesh = ((Component)((Component)this).transform.parent).gameObject; _initialPos = _plateMesh.transform.position; } private void Update() { //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) if (_triggerTimer > 0f) { _plateMesh.transform.position = _initialPos + PushInDistance * Vector3.down; } else { _plateMesh.transform.position = _initialPos; } _triggerTimer -= Time.deltaTime; if (_triggerTimer < 0f) { _triggerTimer = 0f; } } private void OnTriggerStay(Collider other) { Player componentInParent = ((Component)other).GetComponentInParent(); if (!((Object)(object)componentInParent == (Object)null) && !componentInParent.isAI && componentInParent.IsGrounded()) { if (_triggerTimer <= 0f) { Fire(); } _triggerTimer = 0.1f; } } private void Fire() { ClickSFX.Play(); if ((Object)(object)Target != (Object)null) { Target.Trigger(); } } } public class XmasLights : MonoBehaviour { public GameObject Alt1; public GameObject Alt2; public float Interval = 1f; private float _timer; private void Awake() { Alt1.SetActive(true); Alt2.SetActive(false); } private void Update() { if (_timer >= Interval) { _timer = 0f; Toggle(); } _timer += Time.deltaTime; } private void Toggle() { if (Alt1.activeSelf) { Alt1.SetActive(false); Alt2.SetActive(true); } else { Alt1.SetActive(true); Alt2.SetActive(false); } } } } namespace System.Runtime.CompilerServices { [AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)] internal sealed class IgnoresAccessChecksToAttribute : Attribute { public IgnoresAccessChecksToAttribute(string assemblyName) { } } }