-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathSave.cs
36 lines (32 loc) · 922 Bytes
/
Save.cs
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
using System.Diagnostics.CodeAnalysis;
using ModAPI;
using ModAPI.Attributes;
using TheForest.Utils;
using UnityEngine;
using Input = ModAPI.Input;
namespace Blueprints
{
internal class Save : MonoBehaviour
{
[ExecuteOnGameStart]
[SuppressMessage("ReSharper", "UnusedMember.Local")]
private static void Init()
{
var go = new GameObject("__Save__");
go.AddComponent<Save>();
Log.Write("Save added to scene");
}
[SuppressMessage("ReSharper", "UnusedMember.Local")]
private void OnGUI()
{
//base.ToString();
}
[SuppressMessage("ReSharper", "UnusedMember.Local")]
private void Update()
{
if (!Input.GetButtonDown("Save_State", "Blueprints")) return;
Log.Write("Saved current state");
LocalPlayer.Stats.JustSave();
}
}
}