asmrobot
2019-11-13 576b92fd82f568572bc4beb125fa0ba0191a602f
src/RichCreator/StateMachines/ChannelStateMachine.cs
@@ -1,5 +1,6 @@
using Emgu.CV;
using Emgu.CV.Structure;
using RichCreator.Utility;
using RichCreator.Utility.Captures;
using RichCreator.Utility.CV;
using RichCreator.Utility.Structs;
@@ -15,7 +16,7 @@
    /// <summary>
    /// 频道状态机
    /// </summary>
    public class ChannelStateMachine
    public class ChannelStateMachine:StateMachineBase
    {
        //默认状态
        private ChannelStates currentState = ChannelStates.Start;
@@ -33,6 +34,9 @@
                new ZTPoint(-279,246),
                new ZTPoint(-279,291)
            };
        //首次进入标记
        private bool FirstEntryHouse = true;
        /// <summary>
        /// 开始工作
@@ -78,12 +82,29 @@
                        if (DnfCVHelper.IsInSaiLiYaHouse(gameRect))
                        {
                            //检测是否组队模式
                            currentState = ChannelStates.CheckGroupMode;
                            currentState = ChannelStates.IsFirstEntry;
                        }
                        else
                        {
                            currentState = ChannelStates.IsChoiceRolePage;
                        }
                        break;
                    case ChannelStates.IsFirstEntry:
                        //是否初次进入
                        if (this.FirstEntryHouse)
                        {
                            this.FirstEntryHouse = false;
                            currentState = ChannelStates.CloseAllWindow1;
                        }
                        else
                        {
                            currentState = ChannelStates.CheckGroupMode;
                        }
                        break;
                    case ChannelStates.CloseAllWindow1:
                        //关闭所有窗口1
                        CloseAllAlertWindow(cancelToken, gameRect);
                        currentState = ChannelStates.CheckGroupMode;
                        break;
                    case ChannelStates.IsChoiceRolePage:
                        //检测是否角色选择界面
@@ -231,6 +252,8 @@
            ChangeChannel,//双击切换频道,等待两秒
            OpenChangeChannelPage,//打开切换频道界面
            CloseAllWindow,//关闭所有窗口
            IsFirstEntry,//是否首次进入赛丽亚的房间
            CloseAllWindow1,//关闭所有窗口1
            Complete//完成
        }
    }