using System;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using BepInEx;
using HarmonyLib;
using Microsoft.CodeAnalysis;
using UnityEngine;
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]
[assembly: AssemblyCompany("DashGlassBreaker")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("DashGlassBreaker")]
[assembly: AssemblyTitle("DashGlassBreaker")]
[assembly: AssemblyVersion("1.0.0.0")]
[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 DashGlassBreaker
{
[BepInPlugin("DashGlassBreaker.adry.ultrakill", "Dash Glass Breaker", "1.0.0")]
public class DashGlassBreaker : BaseUnityPlugin
{
private Harmony _harmony;
public void Awake()
{
//IL_0007: Unknown result type (might be due to invalid IL or missing references)
//IL_0011: Expected O, but got Unknown
_harmony = new Harmony("DashGlassBreaker.adry.ultrakill");
_harmony.PatchAll();
}
public void OnDestroy()
{
Harmony harmony = _harmony;
if (harmony != null)
{
harmony.UnpatchSelf();
}
}
}
[HarmonyPatch(typeof(NewMovement), "Dodge")]
public class NewMovement_Dodge_Patch
{
private static void Postfix(NewMovement __instance)
{
//IL_000a: Unknown result type (might be due to invalid IL or missing references)
//IL_000f: 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_0031: 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_0040: 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_0050: 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)
//IL_008a: Unknown result type (might be due to invalid IL or missing references)
if (!__instance.boost || !(__instance.dodgeDirection != Vector3.zero))
{
return;
}
Ray val = default(Ray);
((Ray)(ref val))..ctor(((Component)__instance).transform.position + Vector3.up * 0.5f, __instance.dodgeDirection);
RaycastHit val2 = default(RaycastHit);
if (Physics.Raycast(val, ref val2, 2f, LayerMask.op_Implicit(LayerMaskDefaults.Get((LMD)1))))
{
Glass componentInParent = ((Component)((RaycastHit)(ref val2)).collider).GetComponentInParent<Glass>();
if ((Object)(object)componentInParent != (Object)null)
{
Object.Instantiate<GameObject>(((Component)new GameObject().AddComponent<GlassBreaker>()).gameObject, ((RaycastHit)(ref val2)).transform);
}
}
}
}
[HarmonyPatch(typeof(NewMovement), "FixedUpdate")]
public class NewMovement_FixedUpdate_Patch
{
private static void Postfix(NewMovement __instance)
{
//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_002b: 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_0035: 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_0048: 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)
if (!__instance.gc.heavyFall)
{
return;
}
Ray val = default(Ray);
((Ray)(ref val))..ctor(((Component)__instance).transform.position + Vector3.up * 0.5f, Vector3.down);
RaycastHit val2 = default(RaycastHit);
if (Physics.Raycast(val, ref val2, 2f, LayerMask.op_Implicit(LayerMaskDefaults.Get((LMD)1))))
{
Glass componentInParent = ((Component)((RaycastHit)(ref val2)).collider).GetComponentInParent<Glass>();
if ((Object)(object)componentInParent != (Object)null)
{
Object.Instantiate<GameObject>(((Component)new GameObject().AddComponent<GlassBreaker>()).gameObject, ((RaycastHit)(ref val2)).transform);
}
}
}
}
}