diff --git a/AssemblyInfo.cs b/AssemblyInfo.cs new file mode 100644 index 0000000..ac51908 --- /dev/null +++ b/AssemblyInfo.cs @@ -0,0 +1,40 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using MelonLoader; +using System.Runtime.InteropServices; + +[assembly: MelonInfo(typeof(MurtleMod.ModMain), "MurtleBATDRMod", "1.0.0", "Murtle")] +[assembly: MelonGame("Joey Drew Studios", "Bendy and the Dark Revival")] + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("MurtleMod")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("MurtleMod")] +[assembly: AssemblyCopyright("Copyright © 2022")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("a990934d-0fbf-4773-bd03-4fcaa8c3c48a")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/ModMain.cs b/ModMain.cs new file mode 100644 index 0000000..eccc41c --- /dev/null +++ b/ModMain.cs @@ -0,0 +1,94 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using UnityEngine; + +namespace MurtleMod +{ + public class ModMain : MonoBehaviour + { + + public static void Create() + { + new GameObject("ModHandler", new Type[] + { + typeof(ModMain) + }); + } + + public void Start() + { + GameManager.Instance.ShowSubtitles("You are using Murtle's BATDR Mod", 2f, false); + } + + public void Update() + { + if (this.player == null) + { + this.player = GameManager.Instance.Player.gameObject; + } + if (Input.GetKeyDown(KeyCode.K)) + { + GameManager.Instance.Player.gameObject.SetActive(true); + GameManager.Instance.Player.enabled = true; + GameManager.Instance.HideCutsceneBars(); + GameManager.Instance.Player.HeadContainer.SetParent(this.player.transform); + GameManager.Instance.GameCamera.InitializeFreeRoamCam(); + GameManager.Instance.GameCamera.CameraContainer.SetParent(GameManager.Instance.GameCamera.HeadContainer); + GameManager.Instance.GameCamera.CameraContainer.localPosition = Vector3.zero; + GameManager.Instance.GameCamera.CameraContainer.localScale = Vector3.one; + GameManager.Instance.Player.transform.localEulerAngles = new Vector3(0f, 0f, 0f); + GameManager.Instance.GameCamera.HeadContainer.transform.localEulerAngles = new Vector3(0f, 0f, 0f); + GameManager.Instance.GameCamera.CameraContainer.localEulerAngles = new Vector3(0f, 0f, 0f); + GameManager.Instance.Player.UnlockRotation(); + GameManager.Instance.Player.SetCollision(true); + GameManager.Instance.Player.SetAllTrackers(true); + GameManager.Instance.Player.ShowFirstPersonArms(); + GameManager.Instance.Player.ExitAnimationCamera(); + GameManager.Instance.Player.ResetRotation(); + GameManager.Instance.Player.SetState(State.Player.Default); + GameManager.Instance.Player.PlayerMovement.ResetMoveSpeed(); + GameManager.Instance.Player.PlayerMovement.UnlockCrouch(); + GameManager.Instance.Player.PlayerMovement.UnlockRun(); + GameManager.Instance.Player.PlayerMovement.UnlockJump(); + GameManager.Instance.ShowSubtitles("Character Unlocked", 2f, false); + } + if (Input.GetKeyDown(KeyCode.Q)) + { + this.player.gameObject.transform.position += this.player.gameObject.transform.forward * 5f; + } + if (Input.GetKeyDown(KeyCode.H)) + { + GameManager.Instance.Player.SetHealth(100); + } + if (Input.GetKeyDown(KeyCode.J)) + { + GameManager.Instance.HideInspect(); + GameManager.Instance.HideHealthBar(); + GameManager.Instance.HideCrosshair(); + GameManager.Instance.HideInteraction(); + GameManager.Instance.HideSprintBar(); + GameManager.Instance.HideTeleport(); + GameManager.Instance.ShowSubtitles("UI Hidden", 1f, false); + } + if (Input.GetKeyDown(KeyCode.L)) + { + GameManager.Instance.ShowCrosshair(); + GameManager.Instance.ShowTeleport(); + GameManager.Instance.ShowSubtitles("UI Shown", 2f, false); + } + if (Input.GetKeyDown(KeyCode.Alpha9)) + { + this.player.gameObject.transform.position += this.player.gameObject.transform.up * 10f; + } + if (Input.GetKeyDown(KeyCode.Alpha0)) + { + this.player.gameObject.transform.position += this.player.gameObject.transform.up * -10f; + } + } + public GameObject player; + } +} +