asmrobot
2019-11-13 576b92fd82f568572bc4beb125fa0ba0191a602f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
using RichCreator.Utility;
using RichCreator.Utility.Maps;
using RichCreator.Utility.Structs;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
 
namespace RichCreator.Dnf
{
    /// <summary>
    /// 地图信息
    /// </summary>
    public abstract class MapInfo
    {
        public MapInfo(MapType mapType, ZTRectangle gameRect, CancellationToken cancellationToken)
        {
            this.MapType = mapType;
            this.GameRect = gameRect;
            this.CancelToken = cancellationToken;
        }
 
        /// <summary>
        /// 游戏区域
        /// </summary>
        public ZTRectangle GameRect { get; set; }
 
        /// <summary>
        /// 小地图
        /// </summary>
        public IMiniMap MiniMap { get; set; }
 
       
 
        /// <summary>
        /// 取消令牌
        /// </summary>
        public CancellationToken CancelToken { get; set; }
 
 
        /// <summary>
        /// 地图类型
        /// </summary>
        public MapType MapType { get; set; }
 
        /// <summary>
        /// 开始刷图
        /// </summary>
        /// <returns></returns>
        public abstract ZTResult Start(Int32 runningStep);
 
 
        /// <summary>
        /// 是否已进入地图
        /// </summary>
        /// <returns></returns>
        public virtual bool IsEntryMap()
        {
            return true;
        }
 
        /// <summary>
        /// 进入每个房间后的前置工作
        /// </summary>
        /// <param name="houseIndex"></param>
        /// <param name="preHouseIndex"></param>
        public virtual void EntryHousePrework(Int32 houseIndex, Int32 preHouseIndex)
        { }
    }
}