Beispiel #1
0
        /// <summary>
        /// 绘制钥匙图像到窗口
        /// </summary>
        protected override void ReDraw()
        {
            Coord coordSize = new Coord(WindowFace.Width / GameIni.PropIcon.Width, WindowFace.Height / GameIni.PropIcon.Height);

            MotaWorld.GetInstance().MapManager.CurHero.Pack.DrawPacket(Graphics.FromImage(WindowFace), coordSize);
        }
Beispiel #2
0
 public EventState(Coord pos, bool isClose)
 {
     this.eventPosation = pos;
     this.closed        = isClose;
 }
Beispiel #3
0
 /// <summary>
 /// 触发坐标处的事件
 /// </summary>
 /// <param name="pos">在地图上的坐标</param>
 /// <param name="triggerMethod">触发方式</param>
 /// <param name="player">触发者</param>
 public void TriggerEvent(Coord pos, TouchMethod triggerMethod, Hero player)
 {
     //委托楼层对象处理
     CurFloorNode.TriggerEvent(pos, triggerMethod, player);
 }
Beispiel #4
0
 /// <summary>
 /// 如果墙可以被破坏的话,破坏一堵墙
 /// </summary>
 /// <param name="pos">墙的位置</param>
 /// <returns>返回一个布尔值,标示是否破坏成功,如果墙不可以破坏,则返回false</returns>
 public bool Destroy(Coord pos)
 {
     //委托楼层对象处理
     return(CurFloorNode.Destroy(pos));
 }
Beispiel #5
0
 /// <summary>
 /// 判断当前楼层中的某个位置对于某个方向是否是可通行的
 /// </summary>
 /// <param name="pos">楼层中的位置</param>
 /// <param name="moveDirection">方向</param>
 /// <returns>如果不可通行,返回false</returns>
 public bool IsPassable(Coord pos, Direction moveDirection)
 {
     //委托楼层对象处理
     return(CurFloorNode.IsPassable(pos, moveDirection));
 }
Beispiel #6
0
 /// <summary>
 /// 移动事件元素到新的位置,如果移动成功返回true
 /// </summary>
 /// <param name="souPos">源坐标</param>
 /// <param name="desPos">目标坐标</param>
 /// <param name="moveDirection">目标的移动方向,用于检测目标位置是否可通行</param>
 public bool ShiftEvent(Coord souPos, Coord desPos, Direction moveDirection)
 {
     //委托楼层对象处理
     return(CurFloorNode.ShiftEvent(souPos, desPos, moveDirection));
 }
Beispiel #7
0
 /// <summary>
 /// 获取结点字符串描述(xml格式)
 /// </summary>
 /// <param name="desPos">目标坐标</param>
 /// <returns>xml字符串</returns>
 public string GetNodeString(Coord desPos)
 {
     return(this.CurFloorNode.GetNodeString(desPos));
 }
Beispiel #8
0
 /// <summary>
 /// 根据Xml元素重新加载结点
 /// </summary>
 /// <param name="desPos">结点坐标</param>
 /// <param name="xmlStr">xml字符串</param>
 public void LoadNode(Coord desPos, string xmlStr)
 {
     this.CurFloorNode.LoadNode(desPos, xmlStr);
 }
Beispiel #9
0
 /// <summary>
 /// 根据结点坐标获取结点元素
 /// </summary>
 /// <param name="desPos">结点坐标</param>
 /// <returns>结点元素</returns>
 public ElementNode GetNode(Coord desPos)
 {
     return(this.CurFloorNode.GetNode(desPos));
 }
Beispiel #10
0
 /// <summary>
 /// 拷贝源节点到新节点(覆盖)
 /// </summary>
 /// <param name="node">源节点元素</param>
 /// <param name="desNode">新节点元素坐标</param>
 public void CopyNode(ElementNode node, Coord desNode)
 {
     this.CurFloorNode.CopyNode(node, desNode);
 }
Beispiel #11
0
 /// <summary>
 /// 删除目标元素,事件设为空,地表设为默认
 /// </summary>
 /// <param name="souPos">目标元素的坐标</param>
 public void Delete(Coord souPos)
 {
     this.CurFloorNode.Delete(souPos);
 }