using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.Graphics;
namespace CarFire
{
///
/// A key entity. Keys can be used to unlock doors... what a surprise.
/// All that stuff is handled by the trigger, though.
///
public class Key : Trigger
{
#region Public Methods
///
/// Construct a key entity.
///
/// The entity identifier.
/// The position.
/// The key-value pairs.
/// The game reference.
public Key(char identifier, Point position, Dictionary info, Game game) :
base(identifier, position, info, game)
{
// No implementation needed.
}
public override void LoadContent(ContentManager contentManager)
{
mTexture = contentManager.Load("default");
}
public override void Draw(SpriteBatch spriteBatch)
{
Rectangle position = Game.State.Map.GetRectangleFromCoordinates(Position);
spriteBatch.Draw(mTexture, position, Color.White);
}
#endregion
#region Private Variables
Texture2D mTexture;
#endregion
}
}