using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using BepInEx;
using UnityEngine;
using UnityEngine.UI;
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: AssemblyTitle("Fish2SizeIsTrue")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("Fish2SizeIsTrue")]
[assembly: AssemblyCopyright("Copyright © 2024")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("222b88ef-140a-4483-98af-a544a8f82eeb")]
[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 Fish2SizeIsTrue;
[BepInPlugin("swish.ultrakill.fish2sizeistrue", "Fish 2 size is true?", "1.0.0")]
public class Fish2SizeIsTrue : BaseUnityPlugin
{
public const string pluginGuid = "swish.ultrakill.fish2sizeistrue";
public const string pluginName = "Fish 2 size is true?";
public const string pluginVersion = "1.0.0";
private GameObject sizeTextContainer;
private float sizeMin = 0.5f;
private float sizeMax = 2.5f;
private float size;
private bool isAllObjectsFinded = false;
public void Awake()
{
((BaseUnityPlugin)this).Logger.LogInfo((object)"Fish2SizeIsTrue Awaked");
}
public void Update()
{
if (!isAllObjectsFinded)
{
sizeTextContainer = GameObject.Find("Fish Size Text");
if ((Object)(object)sizeTextContainer != (Object)null)
{
((BaseUnityPlugin)this).Logger.LogInfo((object)"Text finded, starting mod");
sizeTextContainer.GetComponent<Text>().horizontalOverflow = (HorizontalWrapMode)1;
isAllObjectsFinded = true;
}
}
else if (sizeTextContainer.activeSelf)
{
if (size == 0f)
{
size = Random.Range(sizeMin, sizeMax);
string text = "SIZE:" + size;
sizeTextContainer.GetComponent<Text>().text = text.Remove(9, 4);
}
}
else
{
size = 0f;
}
}
}