feat: initial commit
This commit is contained in:
66
Hacks/Misc.cs
Normal file
66
Hacks/Misc.cs
Normal file
@@ -0,0 +1,66 @@
|
||||
using SlimeRanger.Helpers;
|
||||
using UnityEngine;
|
||||
|
||||
namespace SlimeRanger.Hacks
|
||||
{
|
||||
internal class Misc
|
||||
{
|
||||
public static void Fly(float speed) //normal speed 50f
|
||||
{
|
||||
TeleportablePlayer tpp = UnityEngine.Object.FindObjectOfType<TeleportablePlayer>();
|
||||
Vector3 pos = tpp.transform.position;
|
||||
|
||||
if (Input.GetKey(KeyCode.Z))
|
||||
{
|
||||
pos += tpp.transform.forward * speed * Time.deltaTime;
|
||||
}
|
||||
if (Input.GetKey(KeyCode.S))
|
||||
{
|
||||
pos += -tpp.transform.forward * speed * Time.deltaTime;
|
||||
}
|
||||
if (Input.GetKey(KeyCode.D))
|
||||
{
|
||||
pos += tpp.transform.right * speed * Time.deltaTime;
|
||||
}
|
||||
if (Input.GetKey(KeyCode.Q))
|
||||
{
|
||||
pos += -tpp.transform.right * speed * Time.deltaTime;
|
||||
}
|
||||
if (Input.GetKey(KeyCode.Keypad8))
|
||||
{
|
||||
pos += tpp.transform.up * speed * Time.deltaTime;
|
||||
}
|
||||
if (Input.GetKey(KeyCode.Keypad2))
|
||||
{
|
||||
pos += -tpp.transform.up * speed * Time.deltaTime;
|
||||
}
|
||||
Misc.SetPlayerPosition(pos);
|
||||
}
|
||||
|
||||
public static void AddCurrency(int amount, PlayerState.CoinsType type = PlayerState.CoinsType.NORM)
|
||||
{
|
||||
StateHelpers.GetPlayerState().AddCurrency(amount, type);
|
||||
}
|
||||
|
||||
public static void AddKey()
|
||||
{
|
||||
StateHelpers.GetPlayerState().AddKey();
|
||||
}
|
||||
|
||||
public static void SetEnergy(int amount)
|
||||
{
|
||||
StateHelpers.GetPlayerState().SetEnergy(amount);
|
||||
}
|
||||
|
||||
public static void SetHealth(int amount)
|
||||
{
|
||||
StateHelpers.GetPlayerState().SetHealth(amount);
|
||||
}
|
||||
|
||||
public static void SetPlayerPosition(Vector3 position)
|
||||
{
|
||||
TeleportablePlayer tpp = UnityEngine.Object.FindObjectOfType<TeleportablePlayer>();
|
||||
tpp.playerEventHandler.Position.Set(position);
|
||||
}
|
||||
}
|
||||
}
|
||||
17
Hacks/Unlocks.cs
Normal file
17
Hacks/Unlocks.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
using UnityEngine;
|
||||
using SlimeRanger.Helpers;
|
||||
using System;
|
||||
|
||||
namespace SlimeRanger.Hacks
|
||||
{
|
||||
internal class Unlocks
|
||||
{
|
||||
public static void UnlockAllUpgrades()
|
||||
{
|
||||
foreach (PlayerState.Upgrade up in Enum.GetValues(typeof(PlayerState.Upgrade)))
|
||||
{
|
||||
StateHelpers.GetPlayerState().AddUpgrade(up);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user