Decompiled source of WalkButton v1.0.0

WalkButton.dll

Decompiled a week ago
using System;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using BepInEx;
using BepInEx.Configuration;
using UnityEngine;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: AssemblyTitle("WalkButton")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("WalkButton")]
[assembly: AssemblyCopyright("Copyright ©  2026")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("aab8f646-035d-440f-bc04-5338c48f4f59")]
[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("org.sealofapproval.walkbuttonmod", "walk Button Mod", "1.0.0")]
public class WalkButton : BaseUnityPlugin
{
	private ConfigEntry<string> walkButton;

	protected WalkButton()
	{
		walkButton = ((BaseUnityPlugin)this).Config.Bind<string>("General", "walkButton", "L", "Changes the button for walking.");
	}

	private void Update()
	{
		//IL_0033: 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)
		HeroController instance = HeroController.instance;
		if ((Object)(object)instance == (Object)null)
		{
			return;
		}
		_ = instance.cState;
		if (Enum.TryParse<KeyCode>(walkButton.Value, ignoreCase: false, out KeyCode result))
		{
			((Component)instance).GetComponent<HeroAnimationController>();
			if (Input.GetKey(result))
			{
				instance.cState.inWalkZone = true;
			}
			if (Input.GetKeyUp(result))
			{
				instance.cState.inWalkZone = false;
			}
		}
		else
		{
			Debug.LogError((object)("Can not parse key=" + walkButton.Value));
		}
	}
}