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.
14 public class Key : Trigger
16 #region Public Methods
19 /// Construct a key entity.
21 /// <param name="identifier">The entity identifier.</param>
22 /// <param name="position">The position.</param>
23 /// <param name="info">The key-value pairs.</param>
24 /// <param name="game">The game reference.</param>
25 public Key(char identifier, Point position, Dictionary<string, string> info, Game game) :
26 base(identifier, position, info, game)
28 mPosition = new Vector2(position.X, position.Y);
32 public override void LoadContent(ContentManager contentManager)
34 mTexture = contentManager.Load<Texture2D>("default");
37 public override void Draw(SpriteBatch spriteBatch)
39 Rectangle position = mGame.State.Map.GetRectangleFromCoordinates(mPosition);
40 spriteBatch.Draw(mTexture, position, Color.White);
46 #region Private Variables