-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMain.cs
More file actions
49 lines (43 loc) · 1.53 KB
/
Main.cs
File metadata and controls
49 lines (43 loc) · 1.53 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
42
43
44
45
46
47
48
49
using MelonLoader;
using HarmonyLib;
using UnityEngine;
using System.Collections;
namespace BricksVR
{
public static class BuildInfo
{
public const string Name = "SingleBrick";
public const string Description = "A single-player BricksVR Mod!";
public const string Author = "ATXLtheAxolotl#2134";
public const string Company = "BricksVR Modding";
public const string Version = "0.1.0";
public const string DownloadLink = "https://github.com/BricksVR-Modding/SingleBrick/releases";
}
public class SingleBrick : MelonMod
{
public GameObject settingsButton;
public GameObject playButton;
public GameObject joinButton;
public override void OnApplicationStart()
{
System.Action<string, string, LogType> act = HandleLog;
Application.add_logMessageReceived(act);
}
void HandleLog(string logString, string stackTrace, LogType type)
{
switch(type)
{
case LogType.Error:
MelonLogger.Error(logString + "\n\n" + stackTrace);
break;
}
}
public override void OnSceneWasInitialized(int buildIndex, string sceneName)
{
playButton = GameObject.Find("MenuBoard/Main/CreateButton");
joinButton = GameObject.Find("MenuBoard/Main/JoinButton");
settingsButton = GameObject.Find("MenuBoard/Main/SettingsButton");
HandleMenu.HandleButtons(this);
}
}
}