using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using BepInEx;
using HarmonyLib;
using UnityEngine;
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: AssemblyTitle("SimpleDoubleJump")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("SimpleDoubleJump")]
[assembly: AssemblyCopyright("Copyright © 2026")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("4ed20d4e-f5d6-4276-a18b-ee2cd891ed9e")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]
[assembly: AssemblyVersion("1.0.0.0")]
[BepInPlugin("my.doublejump", "Stamina Double Jump", "1.0.0")]
public class DoubleJumpMod : BaseUnityPlugin
{
private void Awake()
{
//IL_0006: Unknown result type (might be due to invalid IL or missing references)
new Harmony("my.doublejump").PatchAll();
}
}
[HarmonyPatch(typeof(NewMovement), "Update")]
internal class DoubleJumpPatch
{
private const float StaminaCost = 100f;
private const float HeightMultiplier = 0.707f;
private static void Postfix(NewMovement __instance)
{
//IL_004b: 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_006a: Unknown result type (might be due to invalid IL or missing references)
if (!__instance.gc.onGround && Input.GetKeyDown((KeyCode)32) && __instance.boostCharge >= 100f)
{
__instance.boostCharge -= 100f;
Vector3 velocity = __instance.rb.velocity;
velocity.y = __instance.jumpPower * 0.707f;
__instance.rb.velocity = velocity;
}
}
}