-
Notifications
You must be signed in to change notification settings - Fork 80
Expand file tree
/
Copy pathITorchPlugin.cs
More file actions
60 lines (52 loc) · 1.42 KB
/
ITorchPlugin.cs
File metadata and controls
60 lines (52 loc) · 1.42 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
50
51
52
53
54
55
56
57
58
59
60
using System;
using System.Collections.Generic;
using System.Linq;
using System.Security.Cryptography.X509Certificates;
using System.Text;
using System.Threading.Tasks;
namespace Torch.API.Plugins
{
public interface ITorchPlugin : IDisposable
{
/// <summary>
/// A unique ID for the plugin.
/// </summary>
Guid Id { get; }
/// <summary>
/// The version of the plugin.
/// </summary>
string Version { get; }
/// <summary>
/// The name of the plugin.
/// </summary>
string Name { get; }
/// <summary>
/// Enable/Disable Plugin reloading
/// </summary>
bool IsReloadable { get; set; }
/// <summary>
/// This is called before the game loop is started.
/// </summary>
/// <param name="torchBase">Torch instance</param>
void Init(ITorchBase torchBase);
/// <summary>
/// This is called on the game thread after each tick.
/// </summary>
void Update();
/// <summary>
/// Plugin's enabled state. Mainly for UI niceness
/// </summary>
PluginState State { get; }
}
public enum PluginState
{
NotInitialized,
DisabledError,
DisabledUser,
UpdateRequired,
UninstallRequested,
NotInstalled,
MissingDependency,
Enabled
}
}