-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCheat DLL.cs
More file actions
41 lines (34 loc) · 1.02 KB
/
Cheat DLL.cs
File metadata and controls
41 lines (34 loc) · 1.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
using System;
using UnityEngine;
using UnityEngine.Rendering;
namespace CheatDLL
{
public class Cheat : MonoBehaviour
{
private Rect windowRect = new Rect(100, 100, 300, 75);
public float hSliderValue = 1.0F;
public bool speedChanged;
void OnGUI()
{
windowRect = GUI.Window(0, windowRect, DrawWindow, "Speed Hack");
}
void DrawWindow(int windowID)
{
GUI.Label(new Rect(140, 25, 100, 20), Mathf.Round(hSliderValue).ToString());
hSliderValue = GUI.HorizontalSlider(new Rect(50, 40, 200, 100), hSliderValue, 0.0F, 100.0F);
GUI.DragWindow(new Rect(0, 0, 10000, 20));
}
public void Update()
{
Time.timeScale = hSliderValue;
}
}
public class Loader
{
public static void Init()
{
GameObject gameObject = new GameObject("CheatObject");
gameObject.AddComponent<Cheat>();
}
}
}