/
MonoGameEngine.cs
84 lines (77 loc) · 2.47 KB
/
MonoGameEngine.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
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
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using EmptyKeys.UserInterface.Input;
using EmptyKeys.UserInterface.Media;
using EmptyKeys.UserInterface.Renderers;
using Microsoft.Xna.Framework.Graphics;
namespace EmptyKeys.UserInterface
{
/// <summary>
/// Implements MonoGame specific engine
/// </summary>
public class MonoGameEngine : Engine
{
private Renderer renderer;
private AudioDevice audioDevice = new MonoGameAudioDevice();
private AssetManager assetManager = new MonoGameAssetManager();
private InputDeviceBase inputDevice = new MonoGameInputDevice();
/// <summary>
/// Gets the renderer.
/// </summary>
/// <value>
/// The renderer.
/// </value>
public override Renderer Renderer
{
get { return renderer; }
}
/// <summary>
/// Gets the audio device.
/// </summary>
/// <value>
/// The audio device.
/// </value>
public override AudioDevice AudioDevice
{
get { return audioDevice; }
}
/// <summary>
/// Gets the asset manager.
/// </summary>
/// <value>
/// The asset manager.
/// </value>
public override AssetManager AssetManager
{
get { return assetManager; }
}
/// <summary>
/// Gets the input device.
/// </summary>
/// <value>
/// The input device.
/// </value>
public override InputDeviceBase InputDevice
{
get { return inputDevice; }
}
/// <summary>
/// Initializes a new instance of the <see cref="MonoGameEngine"/> class.
/// </summary>
/// <param name="graphicsDevice">The graphics device.</param>
/// <param name="nativeScreenWidth">Width of the native screen.</param>
/// <param name="nativeScreenHeight">Height of the native screen.</param>
public MonoGameEngine(GraphicsDevice graphicsDevice, int nativeScreenWidth, int nativeScreenHeight)
: base()
{
renderer = new MonoGameRenderer(graphicsDevice, nativeScreenWidth, nativeScreenHeight);
}
/// <inheritdoc/>
public override void Update()
{
}
}
}