Decompiled source of GreenRhino v1.0.0

plugins/Greenrhino.dll

Decompiled a month ago
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using Il2Cpp;
using Il2CppInterop.Runtime.InteropTypes.Arrays;
using MelonLoader;
using UnityEngine;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: MelonInfo(typeof(MyMod), "GreenRhino", "1.0.0", "Spike", null)]
[assembly: TargetFramework(".NETCoreApp,Version=v6.0", FrameworkDisplayName = ".NET 6.0")]
[assembly: AssemblyCompany("Greenrhino")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("Greenrhino")]
[assembly: AssemblyTitle("Greenrhino")]
[assembly: AssemblyVersion("1.0.0.0")]
public class MyMod : MelonMod
{
	public override void OnSceneWasLoaded(int buildIndex, string sceneName)
	{
		//IL_00c0: Unknown result type (might be due to invalid IL or missing references)
		//IL_00ef: Unknown result type (might be due to invalid IL or missing references)
		//IL_005e: Unknown result type (might be due to invalid IL or missing references)
		//IL_008d: Unknown result type (might be due to invalid IL or missing references)
		BeetleClass_Rhino[] array = Il2CppArrayBase<BeetleClass_Rhino>.op_Implicit(Object.FindObjectsOfType<BeetleClass_Rhino>());
		BeetleClass_Rhino[] array2 = array;
		foreach (BeetleClass_Rhino val in array2)
		{
			if (((Component)val).gameObject.GetComponent<BeetleSkinController>()._selectedSkinIndex.Value == 1)
			{
				((Renderer)((Component)val.bigSpikePrefab).gameObject.GetComponentInChildren<MeshRenderer>()).material.color = new Color(0f, 0.5f, 0f);
				((Renderer)((Component)val.smallSpikePrefab).gameObject.GetComponentInChildren<MeshRenderer>()).material.color = new Color(0f, 0.5f, 0f);
			}
			else
			{
				((Renderer)((Component)val.bigSpikePrefab).gameObject.GetComponentInChildren<MeshRenderer>()).material.color = new Color(1f, 1f, 1f);
				((Renderer)((Component)val.smallSpikePrefab).gameObject.GetComponentInChildren<MeshRenderer>()).material.color = new Color(1f, 1f, 1f);
			}
		}
	}
}