diff --git a/Assets/Scripts/ServerDebug.cs b/Assets/Scripts/ServerDebug.cs new file mode 100644 index 0000000..cffa7c3 --- /dev/null +++ b/Assets/Scripts/ServerDebug.cs @@ -0,0 +1,63 @@ +/********************** +********LAVID********** +*******VLibras********* +*------------------------------------------------------------------------ +*Description: +*Server gets pts from Core (client) by TCP connection +*and runs the animations until a final tag is found. +*------------------------------------------------------------------------ +*Author: Claudiomar Araujo # claudiomar.araujo@lavid.ufpb.br +*------------------------------------------------------------------------ +***********************/ + +using UnityEngine; +using System; +using System.IO; +using System.Net; +using System.Net.Sockets; +using System.Collections.Generic; + +public class ServerDebug { + + private bool isReady = false; + private PlayerManager manager; + + public ServerDebug(PlayerManager manager) + { + this.manager = manager; + } + + public bool IsNotReady { + get { return !isReady; } + } + + /** + * Starts receiving of glosa and time from server. + * Stops when receive "FINALIZE". + */ + public void StartCommunication() + { + List messages = new List() { + "TESTE#1000", "TEST2'#2000", "FINALIZE" + }; + + Debug.Log("S.SC()"); + + foreach (string text in messages) + { + Message message = new Message(text); + + Debug.Log("S.SC(): Received: " + message.Text); + + if (message.Text.Equals("FINALIZE")) + { + isReady = true; + break; + } + else manager.enqueueMessage(message); + } + + Debug.Log("S.SC(): END"); + } + +} \ No newline at end of file diff --git a/Assets/Scripts/ServerDebug.cs.meta b/Assets/Scripts/ServerDebug.cs.meta new file mode 100644 index 0000000..e81486d --- /dev/null +++ b/Assets/Scripts/ServerDebug.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: e7a0444f46906424a9edd021650e6cd0 +timeCreated: 1469631182 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: -- libgit2 0.21.2