o
asmrobot
2019-10-27 c4bd9d8c587bd1401f0fb2f60c34a4964d7afe20
src/RichCreator/StateMachines/ChannelStateMachine.cs
@@ -15,7 +15,7 @@
    /// <summary>
    /// 频道状态机
    /// </summary>
    public class ChannelStateMachine
    public class ChannelStateMachine:StateMachineBase
    {
        //默认状态
        private ChannelStates currentState = ChannelStates.Start;
@@ -33,6 +33,9 @@
                new ZTPoint(-279,246),
                new ZTPoint(-279,291)
            };
        //首次进入标记
        private bool FirstEntryHouse = true;
        /// <summary>
        /// 开始工作
@@ -78,12 +81,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 +251,8 @@
            ChangeChannel,//双击切换频道,等待两秒
            OpenChangeChannelPage,//打开切换频道界面
            CloseAllWindow,//关闭所有窗口
            IsFirstEntry,//是否首次进入赛丽亚的房间
            CloseAllWindow1,//关闭所有窗口1
            Complete//完成
        }
    }