This repository was archived by the owner on Dec 28, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGame.cs
More file actions
63 lines (53 loc) · 1.5 KB
/
Game.cs
File metadata and controls
63 lines (53 loc) · 1.5 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
61
62
63
namespace Rift.RiftEngine.Core
{
public class Game
{
public readonly Config config;
List<Interaction> interactions = new List<Interaction>();
public List<Interaction> Interactions { get { return interactions; } }
public Game(Config configuration)
{
config = configuration;
}
/// <summary>
/// Sets the title of the console
/// </summary>
/// <param name="title">What to set the title to</param>
public static void SetTitle(string title)
{
Console.Title = title;
}
/// <summary>
/// Adds an interaction to the list of interactions included in the game
/// </summary>
/// <param name="interaction">The interaction to add</param>
public void AddInteraction(Interaction interaction)
{
interactions.Add(interaction);
}
/// <summary>
/// Runs once before the game starts
/// </summary>
public virtual void Init()
{
}
/// <summary>
/// Runs once when the game starts
/// </summary>
public virtual void Start()
{
}
/// <summary>
/// Runs continuously from the start of the game to the end
/// </summary>
public virtual void Update()
{
}
/// <summary>
/// Runs once when the game stops
/// </summary>
public virtual void Stop()
{
}
}
}