From 5597c0b354f881994a75878731c3a02183e9c970 Mon Sep 17 00:00:00 2001
From: asmrobot <asmrobot@hotmail.com>
Date: Wed, 16 Oct 2019 00:58:07 +0000
Subject: [PATCH] format project
---
src/RichCreator/Maps/Test/TestMap.cs | 28 +++++++++-------------------
1 files changed, 9 insertions(+), 19 deletions(-)
diff --git a/src/RichCreator/Maps/Group/GroupMap.cs b/src/RichCreator/Maps/Test/TestMap.cs
similarity index 93%
rename from src/RichCreator/Maps/Group/GroupMap.cs
rename to src/RichCreator/Maps/Test/TestMap.cs
index 7349497..b9e49e7 100644
--- a/src/RichCreator/Maps/Group/GroupMap.cs
+++ b/src/RichCreator/Maps/Test/TestMap.cs
@@ -17,38 +17,28 @@
namespace RichCreator.Maps
{
/// <summary>
- /// 组队
+ /// 测试地图
/// </summary>
- public class GroupMap : MapInfo
+ public class TestMap : MapInfo
{
/// <summary>
/// 游戏区域
/// </summary>
- public ZTRectangle GameRect { get; set; }
-
-
+ public ZTRectangle GameRect { get; set; }
public CancellationToken cancellationToken { get; set; }
private const bool isCreateGroup = true;
- public override bool Start(ZTRectangle gameRect, CancellationToken cancelToken, Int32 runningStep)
+ public override ZTResult Start(ZTRectangle gameRect, CancellationToken cancelToken, Int32 runningStep)
{
this.GameRect = gameRect;
this.cancellationToken = cancelToken;
WindowUtils.SetDnfToTop();
-
- ChannelStateMachine csm = new ChannelStateMachine();
- ZTResult workResult = csm.Work(this.GameRect, true, cancelToken, 5 * 60 * 1000);
- if (workResult != ZTResult.Success)
- {
- G.Instance.InfoWriter("切换频道没有成功,"+workResult);
- Thread.Sleep(5 * 60 * 1000);
- return false;
- }
- G.Instance.InfoWriter("切换频道成功,开始组队逻辑");
+
+
string groupName = "aabbccddee";
if (isCreateGroup)
@@ -57,7 +47,7 @@
if (!CreateGroup(groupName))
{
G.Instance.InfoWriter("创建队伍失败");
- return false;
+ return ZTResult.Failed;
}
}
else
@@ -66,13 +56,13 @@
if (!JoinGroup(groupName))
{
G.Instance.InfoWriter("加入队伍失败");
- return false;
+ return ZTResult.Failed;
}
}
//沉默一段时间
Thread.Sleep(50000000);
CloseAllAlertWindow(this.cancellationToken, this.GameRect);
- return true;
+ return ZTResult.Success;
}
--
Gitblit v1.9.3