Repository navigation
Expand file tree
/
Copy pathIGame.cs
More file actions
95 lines (79 loc) · 2.97 KB
/
Copy pathIGame.cs
File metadata and controls
95 lines (79 loc) · 2.97 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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
using System;
using System.Drawing;
using engenious.Content;
using engenious.Graphics;
namespace engenious
{
/// <summary>
/// Base interface for all game types.
/// </summary>
public interface IGame : IDisposable
{
/// <summary>
/// Occurs when a key is pressed while the <see cref="Game"/> is in focus.
/// </summary>
event KeyPressDelegate? KeyPress;
/// <summary>
/// Occurs when the <see cref="Game"/> is getting focus.
/// </summary>
event EventHandler? Activated;
/// <summary>
/// Occurs when the <see cref="Game"/> is losing focus.
/// </summary>
event EventHandler? Deactivated;
/// <summary>
/// Occurs when the <see cref="Game"/> is exiting.
/// </summary>
event EventHandler? Exiting;
/// <summary>
/// Occurs when the <see cref="Game"/> game rendering view is being resized.
/// </summary>
event EventHandler? Resized;
/// <summary>
/// Gets a <see cref="ContentManagerBase"/> for basic game content management.
/// </summary>
ContentManagerBase Content { get; }
/// <summary>
/// Gets or sets whether the mouse cursor is visible while on the rendering view.
/// </summary>
bool IsMouseVisible { get; set; }
/// <summary>
/// Gets or sets whether the mouse cursor is grabbed while on the rendering view.
/// </summary>
bool IsCursorGrabbed { get; set; }
/// <summary>
/// Gets whether the rendering view is currently in focus.
/// </summary>
bool IsActive { get; }
/// <summary>
/// Gets a collection of game components associated with this <see cref="Game"/>.
/// </summary>
GameComponentCollection Components { get; }
/// <summary>
/// Gets a rendering view associated with this <see cref="IGame"/>.
/// </summary>
IRenderingSurface RenderingSurface { get; }
/// <summary>
/// Called when <see cref="Game"/> related content should be loaded.
/// </summary>
void LoadContent();
/// <summary>
///Called when <see cref="Game"/> related content should be unloaded.
/// </summary>
void UnloadContent();
/// <summary>
/// Executes a single update tick.
/// </summary>
/// <param name="gameTime">Contains the elapsed time since the last update, as well as total elapsed time.</param>
void Update(GameTime gameTime);
/// <summary>
/// Executes a single frame render.
/// </summary>
/// <param name="gameTime">Contains the elapsed time since the last render, as well as total elapsed time.</param>
void Draw(GameTime gameTime);
/// <summary>
/// Gets the <see cref="GraphicsDevice"/> associated with this game.
/// </summary>
GraphicsDevice GraphicsDevice { get; }
}
}