Ejemplo n.º 1
0
 /// <summary>
 /// Create a new monster
 /// </summary>
 /// <param name="map">Reference to the map (to be able to load certain values)</param>
 /// <param name="x">Starting X Coord in Tile units</param>
 /// <param name="y">Starting Y Coord in Tile units</param>
 public CActorMonster(CMap map, int x, int y)
 {
     m_tileset = new Surface("Data/white.png");
     m_rect = m_rect = map.ConvertToWorldUnits(x, y, m_tileset.Width / 3, m_tileset.Height / 4);
     MoveSpeed = 1;
     m_tileset.Transparent = true;
     m_tileset.TransparentColor = Color.FromArgb(255, 0, 255);
     m_player = map.Avatar;
     m_map = map;
     m_collidable = true;
 }
Ejemplo n.º 2
0
        public CActorPlayer(CMap map)
        {
            m_tileset = new Surface("Data/avatar.png");
            m_rect = map.ConvertToWorldUnits(0, 0, m_tileset.Width / 3, m_tileset.Height / 4);
            m_tileset.Transparent = true;
            m_tileset.TransparentColor = Color.FromArgb(255, 0, 255);

            m_moveup = m_movedown = m_moveleft = m_moveright = false;
            m_movespeed = 2;
            m_map = map;
            m_collidable = true;
        }