Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
MurtleMan10 authored Nov 27, 2022
0 parents commit 495daa5
Show file tree
Hide file tree
Showing 2 changed files with 134 additions and 0 deletions.
40 changes: 40 additions & 0 deletions AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -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")]
94 changes: 94 additions & 0 deletions ModMain.cs
Original file line number Diff line number Diff line change
@@ -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;
}
}

0 comments on commit 495daa5

Please sign in to comment.