]> Dogcows Code - chaz/carfire/blob - CarFire/CarFire/CarFire/Key.cs
git-svn-id: https://bd85.net/svn/cs3505_group@163 92bb83a3-7c8f-8a45-bc97-515c4e399668
[chaz/carfire] / CarFire / CarFire / CarFire / Key.cs
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.Content;
7 using Microsoft.Xna.Framework.Graphics;
8
9 namespace CarFire
10 {
11 /// <summary>
12 /// A key entity. Keys can be used to unlock doors... what a surprise.
13 /// All that stuff is handled by the trigger, though.
14 /// </summary>
15 public class Key : Trigger
16 {
17 #region Public Methods
18
19 /// <summary>
20 /// Construct a key entity.
21 /// </summary>
22 /// <param name="identifier">The entity identifier.</param>
23 /// <param name="position">The position.</param>
24 /// <param name="info">The key-value pairs.</param>
25 /// <param name="game">The game reference.</param>
26 public Key(char identifier, Point position, Dictionary<string, string> info, Game game) :
27 base(identifier, position, info, game)
28 {
29 // No implementation needed.
30 }
31
32 public override void LoadContent(ContentManager contentManager)
33 {
34 mTexture = contentManager.Load<Texture2D>("default");
35 }
36
37 public override void Draw(SpriteBatch spriteBatch)
38 {
39 Rectangle position = Game.State.Map.GetRectangleFromCoordinates(Position);
40 spriteBatch.Draw(mTexture, position, Color.White);
41 }
42
43 #endregion
44
45
46 #region Private Variables
47
48 Texture2D mTexture;
49
50 #endregion
51 }
52 }
This page took 0.032631 seconds and 4 git commands to generate.