-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMyGame.cs
More file actions
35 lines (27 loc) · 1 KB
/
MyGame.cs
File metadata and controls
35 lines (27 loc) · 1 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
namespace MyGame;
#nullable disable
public class MyGame : Game
{
Player player;
public override void OnLoad()
{
// TODO: Initialize and load stuff here. eg:
screenColor = Color.CornflowerBlue;
// Load the player and set it's position to be at the center of the screen.
player = new Player(new Vector2(400, 300));
}
public override void OnUpdate(double deltaTime)
{
// TODO: Update stuff here.
// DISCLAIMER: This method is called after updating EVERYTHING else. You don't
// need to update GameObjects and their Components, they're automatically
// updated.
}
public override void OnDraw(Graphics graphics)
{
// TODO: Draw your stuff here.
// DISCLAIMER: This method is called after drawing EVERYTHING else. So GameObjects
// will have their OnDraw method called first, then this is called. So you could
// use this for drawing stuff like debug, UI, screen shaders, ect...
}
}