From dc1cc8378f4271a6fffbe60dff0630cdead6cab1 Mon Sep 17 00:00:00 2001
From: client_Wu Xijin <364452445@qq.com>
Date: 星期四, 31 一月 2019 12:00:53 +0800
Subject: [PATCH] 3335 场景切换重构
---
System/Chat/VoiceHttpRequest.cs | 56 ++++++++++++++++++++++++++++----------------------------
1 files changed, 28 insertions(+), 28 deletions(-)
diff --git a/System/Chat/VoiceHttpRequest.cs b/System/Chat/VoiceHttpRequest.cs
index 757319e..89e796d 100644
--- a/System/Chat/VoiceHttpRequest.cs
+++ b/System/Chat/VoiceHttpRequest.cs
@@ -1,33 +1,33 @@
锘縰sing System;
-using System.Collections;
-using System.Collections.Generic;
+using System.Collections;
+using System.Collections.Generic;
using System.Text;
-using UnityEngine;
-
+using UnityEngine;
+
[XLua.LuaCallCSharp]
public class VoiceHttpRequest : SingletonMonobehaviour<VoiceHttpRequest>
-
-{
+
+{
const string uploadUrl = "http://{0}.voice.2460web.com:53001/voice/upload";
- const string downloadUrl = "http://{0}.voice.2460web.com:53001/voice/download";
-
-
- public Queue<VoiceHttp> speechs = new Queue<VoiceHttp>();
- public Queue<VoiceDecodec> decodecSamples = new Queue<VoiceDecodec>();
-
- public event Action<VoiceDecodec> samplesDecodecComplete;
-
- private bool onceSuccessRemind = false;
-
+ const string downloadUrl = "http://{0}.voice.2460web.com:53001/voice/download";
+
+
+ public Queue<VoiceHttp> speechs = new Queue<VoiceHttp>();
+ public Queue<VoiceDecodec> decodecSamples = new Queue<VoiceDecodec>();
+
+ public event Action<VoiceDecodec> samplesDecodecComplete;
+
+ private bool onceSuccessRemind = false;
+
private void Awake()
{
DTC0102_tagCDBPlayer.beforePlayerDataInitializeEvent += OnBeforePlayerDataInitialize;
- StageManager.Instance.onStageLoadFinish += OnStageLoadFinish;
+ StageLoad.Instance.onStageLoadFinish += OnStageLoadFinish;
}
private void OnStageLoadFinish()
{
- if (StageManager.Instance.CurrentStage is LoginStage)
+ if (StageLoad.Instance.currentStage is LoginStage)
{
speechs.Clear();
}
@@ -47,8 +47,8 @@
playerId = _playerId
});
onceSuccessRemind = false;
- }
-
+ }
+
private void LateUpdate()
{
if (speechs.Count > 0)
@@ -75,8 +75,8 @@
{
samplesDecodecComplete(decodecSamples.Dequeue());
}
- }
-
+ }
+
public void Enqueue(float[] _samples, long _tick, int _playerId)
{
decodecSamples.Enqueue(new VoiceDecodec()
@@ -85,19 +85,19 @@
samples = _samples,
playerId = _playerId,
});
- }
-
+ }
+
public struct VoiceHttp
{
public byte[] encode;
public long tick;
public int playerId;
- }
-
+ }
+
public struct VoiceDecodec
{
public long tick;
public int playerId;
public float[] samples;
- }
-}
+ }
+}
--
Gitblit v1.8.0