using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using BepInEx;
using BepInEx.Logging;
using HarmonyLib;
using NewPlugin;
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("GravityRotate")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("GravityRotate")]
[assembly: AssemblyCopyright("Copyright © 2024")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("65d93016-b3ad-443b-9c89-5fa8e55aee74")]
[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")]
namespace GravityRotate;
[BepInPlugin("com.comradecheeses.gravityrotate", "GravityRotate", "1.0.0")]
public class Plugin : BaseUnityPlugin
{
public static ManualLogSource logger;
public static Vector2 grav_dir;
private void Awake()
{
//IL_0022: Unknown result type (might be due to invalid IL or missing references)
//IL_0028: Expected O, but got Unknown
logger = ((BaseUnityPlugin)this).Logger;
((BaseUnityPlugin)this).Logger.LogInfo((object)"GravityRotate is loaded!");
Harmony val = new Harmony("com.comradecheeses.gravityrotate");
val.PatchAll(typeof(Patches));
}
private void LateUpdate()
{
//IL_000b: 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_0015: Unknown result type (might be due to invalid IL or missing references)
//IL_0034: 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_006c: Unknown result type (might be due to invalid IL or missing references)
//IL_006d: Unknown result type (might be due to invalid IL or missing references)
Vector2 val = Vector2.op_Implicit(((Component)Camera.main).transform.up);
((Vector2)(ref val)).Normalize();
PlayerBody[] array = Object.FindObjectsOfType<PlayerBody>();
foreach (PlayerBody val2 in array)
{
OmniGravityPlugin.reflectSet((object)val2, "grav_dir", (object)(-val));
}
BoplBody[] array2 = Object.FindObjectsOfType<BoplBody>();
foreach (BoplBody val3 in array2)
{
OmniGravityPlugin.reflectSet((object)val3, "grav_dir", (object)(-val));
}
}
}