2 using System.Collections.Generic;
5 using Microsoft.Xna.Framework;
6 using Microsoft.Xna.Framework.Content;
7 using Microsoft.Xna.Framework.Graphics;
12 /// A key entity. Keys can be used to unlock doors... what a surprise.
13 /// All that stuff is handled by the trigger, though.
15 public class Key : Trigger
17 #region Public Methods
20 /// Construct a key entity.
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)
29 // No implementation needed.
32 public override void LoadContent(ContentManager contentManager)
34 mTexture = contentManager.Load<Texture2D>("default");
37 public override void Draw(SpriteBatch spriteBatch)
39 Rectangle position = Game.State.Map.GetRectangleFromCoordinates(Position);
40 spriteBatch.Draw(mTexture, position, Color.White);
46 #region Private Variables