|
using System;
using System.Collections.Generic;
using System.Text;
using System.Drawing;
namespace DungeonOfDespair
{
public class Doors
{
private static Image s_imageNorth = Properties.Resources.DoorNorth;
private static Image s_imageSouth = Properties.Resources.DoorSouth;
private static Image s_imageWest = Properties.Resources.DoorWest;
private static Image s_imageEast = Properties.Resources.DoorEast;
private String m_strNorth;
private String m_strSouth;
private String m_strWest;
private String m_strEast;
public Doors()
{
m_strNorth = null;
m_strSouth = null;
m_strWest = null;
m_strEast = null;
}
public void Draw(Graphics graphics)
{
if (m_strNorth != null)
graphics.DrawImage(s_imageNorth,
258, 6,
s_imageNorth.Width, s_imageNorth.Height);
if (m_strSouth != null)
graphics.DrawImage(s_imageSouth,
258, 369,
s_imageSouth.Width, s_imageSouth.Height);
if (m_strWest != null)
graphics.DrawImage(s_imageWest,
2, 173,
s_imageWest.Width, s_imageWest.Height);
if (m_strEast != null)
graphics.DrawImage(s_imageEast,
533, 173,
s_imageEast.Width, s_imageEast.Height);
}
public String North
{
get { return m_strNorth; }
set { m_strNorth = value; }
}
public String South
{
get { return m_strSouth; }
set { m_strSouth = value; }
}
public String West
{
get { return m_strWest; }
set { m_strWest = value; }
}
public String East
{
get { return m_strEast; }
set { m_strEast = value; }
}
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.