From 5c6d49f48e70fd37919e948468a1c24d5aa2990e Mon Sep 17 00:00:00 2001
From: client_Wu Xijin <364452445@qq.com>
Date: 星期五, 12 四月 2019 21:09:24 +0800
Subject: [PATCH] 6498 【前端】【2.0】主界面技能转盘修改
---
System/CrossServerOneVsOne/CrossServerOneVsOneModel.cs | 15 +++++++++------
1 files changed, 9 insertions(+), 6 deletions(-)
diff --git a/System/CrossServerOneVsOne/CrossServerOneVsOneModel.cs b/System/CrossServerOneVsOne/CrossServerOneVsOneModel.cs
index daf9d70..9af6b8b 100644
--- a/System/CrossServerOneVsOne/CrossServerOneVsOneModel.cs
+++ b/System/CrossServerOneVsOne/CrossServerOneVsOneModel.cs
@@ -73,9 +73,11 @@
public void OnSwitchAccount()
{
IsMatching = false;
- if (clientMatchClock!=null )
+
+ if (clientMatchClock != null)
{
- clientMatchClock.Stop();
+ Clock.Stop(clientMatchClock);
+ clientMatchClock = null;
}
}
@@ -470,7 +472,7 @@
var onMatchPackage = new HC002_tagGCCrossRealmPKStartMatch();
GameNetSystem.Instance.PushPackage(onMatchPackage, ServerType.Main);
var randomWaitSeconds = UnityEngine.Random.Range(3, 8);
- clientMatchClock = Clock.Create(DateTime.Now + new TimeSpan(randomWaitSeconds * TimeSpan.TicksPerSecond), () =>
+ clientMatchClock = Clock.AlarmAt(DateTime.Now + new TimeSpan(randomWaitSeconds * TimeSpan.TicksPerSecond), () =>
{
IsMatching = false;
if (GameNetSystem.Instance.netState == GameNetSystem.NetState.Connected)
@@ -489,9 +491,10 @@
}
else
{
- if (clientMatchClock != null && !clientMatchClock.stopped)
+ if (clientMatchClock != null )
{
- clientMatchClock.Stop();
+ Clock.Stop(clientMatchClock);
+ clientMatchClock = null;
IsMatching = false;
}
else
@@ -506,7 +509,7 @@
public void SendBuyMatchCount()
{
- CC102_tagCMCrossRealmPKBuy pKBuy = new CC102_tagCMCrossRealmPKBuy();
+ var pKBuy = new CC102_tagCMCrossRealmPKBuy();
GameNetSystem.Instance.SendInfo(pKBuy);
}
--
Gitblit v1.8.0