Skip to content

Commit

Permalink
Create plugin.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
AbstractMelon authored Apr 9, 2024
1 parent 3a55bb2 commit b10259f
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions Bepinex/MegaBeam/plugin.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
using BepInEx;
using BoplFixedMath;
using HarmonyLib;
using System.Reflection;
using UnityEngine;

namespace BEAM
{
[BepInPlugin("com.Melon.MegaBeam", "MegaBeam!", "1.0.0")]
public class Plugin : BaseUnityPlugin
{
private void Awake()
{
Logger.LogInfo("MegaBeam has loaded!");

Harmony harmony = new Harmony("com.Melon.MegaBeam");


MethodInfo original = AccessTools.Method(typeof(Beam), "Awake");
MethodInfo patch = AccessTools.Method(typeof(myPatches), "MegaBeam");
harmony.Patch(original, new HarmonyMethod(patch));
}

public class myPatches
{
public static void MegaBeam(Beam __instance)
{
__instance.angularAimSpeed = (Fix)100f;
__instance.maxTime = (Fix)10000;
__instance.maxTimeAir = (Fix)10000;
}
}
}
}

0 comments on commit b10259f

Please sign in to comment.