Revision 1749,
947 bytes
checked in by tekrjant, 12 years ago
(diff) |
Phew..
Changes:
- We now have a minimap
- Camera has been modified
- Lot of minor stuff
|
Line | |
---|
1 | using System; |
---|
2 | using System.Collections.Generic; |
---|
3 | using System.Linq; |
---|
4 | using System.Text; |
---|
5 | using Microsoft.Xna.Framework; |
---|
6 | using Microsoft.Xna.Framework.Graphics; |
---|
7 | |
---|
8 | namespace AdventureGame |
---|
9 | { |
---|
10 | public class HUD |
---|
11 | { |
---|
12 | public Viewport ViewPort { get; set; } |
---|
13 | public List<Button> Buttons { get; set; } |
---|
14 | public MiniMap MiniMap; |
---|
15 | |
---|
16 | public HUD() |
---|
17 | { |
---|
18 | Buttons = new List<Button>(); |
---|
19 | } |
---|
20 | |
---|
21 | public void AddMiniMap(MiniMap minimap) |
---|
22 | { |
---|
23 | MiniMap = minimap; |
---|
24 | } |
---|
25 | |
---|
26 | public void AddButton(Button button) |
---|
27 | { |
---|
28 | Buttons.Add(button); |
---|
29 | } |
---|
30 | |
---|
31 | public void Draw(SpriteBatch sb) |
---|
32 | { |
---|
33 | foreach (Button button in Buttons) |
---|
34 | { |
---|
35 | button.Draw(sb); |
---|
36 | } |
---|
37 | } |
---|
38 | |
---|
39 | public void DrawMinimap(SpriteBatch sb) |
---|
40 | { |
---|
41 | MiniMap.Draw(sb); |
---|
42 | } |
---|
43 | } |
---|
44 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.