using System;
using System.Diagnostics;
using System.IO;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using BepInEx.Logging;
using HarmonyLib;
using Microsoft.CodeAnalysis;
using UnityEngine;
using UnityEngine.AddressableAssets;
using UnityEngine.SceneManagement;
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")]
[assembly: AssemblyCompany("bitmotte.BouncyV1")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("BouncyV1")]
[assembly: AssemblyTitle("bitmotte.BouncyV1")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.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 BouncyV1
{
[HarmonyPatch(typeof(MaliciousFace), "HandleCollision")]
public class BallPatch : MonoBehaviour
{
[HarmonyPatch(typeof(NewMovement), "Start")]
public class GgDrthgzghb : MonoBehaviour
{
private static void Prefix(NewMovement __instance)
{
((Component)__instance).gameObject.AddComponent<Bounce>();
}
}
[HarmonyPatch(typeof(NewMovement), "OnCollisionEnter")]
public class AAaaaaaaAAAAAAaaAaAaaaaaAAaaaa : MonoBehaviour
{
private static void Postfix(NewMovement __instance)
{
((Component)__instance).gameObject.GetComponent<Bounce>().BBoouunnccee();
}
}
}
public class Bounce : MonoBehaviour
{
private Rigidbody rb;
private NewMovement nm;
private Vector3 velocity;
private void Awake()
{
rb = ((Component)this).GetComponent<Rigidbody>();
nm = ((Component)this).GetComponent<NewMovement>();
}
private void LateUpdate()
{
//IL_0008: Unknown result type (might be due to invalid IL or missing references)
//IL_000d: Unknown result type (might be due to invalid IL or missing references)
velocity = rb.velocity;
}
public void BBoouunnccee()
{
//IL_0008: Unknown result type (might be due to invalid IL or missing references)
//IL_000d: 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_002e: Unknown result type (might be due to invalid IL or missing references)
nm.Launch(-velocity * 13f, 8f, false);
Plugin.Logger.LogInfo((object)velocity);
}
}
[BepInPlugin("bitmotte.BouncyV1", "BouncyV1", "1.0.0")]
public class Plugin : BaseUnityPlugin
{
internal static ManualLogSource Logger;
private void Awake()
{
//IL_0021: Unknown result type (might be due to invalid IL or missing references)
//IL_0027: Expected O, but got Unknown
Logger = ((BaseUnityPlugin)this).Logger;
Logger.LogInfo((object)"Plugin bitmotte.BouncyV1 is loaded!");
Harmony val = new Harmony("bitmotte.BouncyV1");
val.PatchAll();
SceneManager.sceneLoaded += SceneUtility.OnSceneLoad;
}
}
public static class BundleTool
{
public static AssetBundle Load(string fileName)
{
return AssetBundle.LoadFromMemory(EmbeddedAccess.AccessFile(fileName));
}
}
public static class EmbeddedAccess
{
public static byte[] AccessFile(string fileName)
{
Assembly executingAssembly = Assembly.GetExecutingAssembly();
byte[] array;
using (Stream stream = executingAssembly.GetManifestResourceStream("MauriceBaller.resources." + fileName))
{
if (stream == null)
{
return null;
}
array = new byte[stream.Length];
stream.Read(array, 0, array.Length);
}
return array;
}
}
public static class SceneUtility
{
public static string sceneName;
public static void OnSceneLoad(Scene scene, LoadSceneMode mode)
{
sceneName = ((Scene)(ref scene)).name;
}
}
public static class SetupResource
{
public static GameObject FixShader(GameObject gameObject)
{
//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)
Shader shader = Addressables.LoadAssetAsync<Material>((object)"Assets/Materials/Environment/Metal/Pattern 1/Metal Pattern 1 8.mat").WaitForCompletion().shader;
SkinnedMeshRenderer[] componentsInChildren = gameObject.GetComponentsInChildren<SkinnedMeshRenderer>();
foreach (SkinnedMeshRenderer val in componentsInChildren)
{
Material[] materials = ((Renderer)val).materials;
foreach (Material val2 in materials)
{
val2.shader = shader;
}
}
MeshRenderer[] componentsInChildren2 = gameObject.GetComponentsInChildren<MeshRenderer>();
foreach (MeshRenderer val3 in componentsInChildren2)
{
Material[] materials2 = ((Renderer)val3).materials;
foreach (Material val4 in materials2)
{
val4.shader = shader;
}
}
ParticleSystem[] componentsInChildren3 = gameObject.GetComponentsInChildren<ParticleSystem>();
foreach (ParticleSystem val5 in componentsInChildren3)
{
Renderer[] componentsInChildren4 = ((Component)val5).gameObject.GetComponentsInChildren<Renderer>();
foreach (Renderer val6 in componentsInChildren4)
{
Material[] materials3 = val6.materials;
foreach (Material val7 in materials3)
{
val7.shader = shader;
}
}
}
return gameObject;
}
}
public static class MyPluginInfo
{
public const string PLUGIN_GUID = "bitmotte.BouncyV1";
public const string PLUGIN_NAME = "BouncyV1";
public const string PLUGIN_VERSION = "1.0.0";
}
}