本文整理汇总了C#中SFSObject.PutUtfString方法的典型用法代码示例。如果您正苦于以下问题:C# SFSObject.PutUtfString方法的具体用法?C# SFSObject.PutUtfString怎么用?C# SFSObject.PutUtfString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SFSObject
的用法示例。
在下文中一共展示了SFSObject.PutUtfString方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Play
/// <summary>
/// Начать игру с N количеством игроков
/// </summary>
/// <param name="maxUsers"></param>
void Play(PlayModes playMode)
{
ISFSObject data = new SFSObject();
data.PutUtfString("playMode", Util.EnumToStr(playMode));
data.PutUtfString("nickName", IOL.Instance.UserNick);
SendToLastJoinedRoom(Reqeusts.Play, data);
}
示例2: OnConnection
void OnConnection(BaseEvent evt)
{
bool connectionSuccess = (bool)evt.Params["success"];
Debug.Log("OnConn:" + connectionSuccess);
if (connectionSuccess)
{
SFSObject loginData = new SFSObject();
loginData.PutUtfString("username", usernameField.value);
loginData.PutUtfString("password", passwordField.value);
sfs.Send(new Sfs2X.Requests.LoginRequest("", "", "MainZone", loginData));
connectionWindow.SetActive(false);
loggingWindow.SetActive(true);
}
else
{
sfs = Connection.Instance().Reset();
SetupListeners();
loginWindow.SetActive(true);
connectionWindow.SetActive(false);
}
}
示例3: insertarTutorial
public void insertarTutorial(string nick, string tutorial)
{
SFSObject sfsObject = new SFSObject();
sfsObject.PutUtfString("nick",nick);
sfsObject.PutUtfString("tutorial",tutorial);
extensionManager.sendRequest(new ExtensionRequest("insertarTutorial", sfsObject));
}
示例4: CreatePublicMessageObject
private ISFSObject CreatePublicMessageObject(JSONObject jsonData, string commandId) {
ISFSObject objOut = new SFSObject();
objOut.PutByteArray("jsonData", Utils.ToByteArray(jsonData.ToString()));
objOut.PutUtfString("message", jsonData.GetString("message"));
objOut.PutUtfString("cmd", commandId);
return objOut;
}
示例5: getBackNews
//consulta las noticias segun la categoria y facultad
public void getBackNews(string category, string faculty)
{
SFSObject sfsObject = new SFSObject();
sfsObject.PutUtfString("categoria",category);
sfsObject.PutUtfString("facultad",faculty);
//downloadFinished = false;
extensionManager.sendRequest(new ExtensionRequest("consultarNews", sfsObject), "getNews", getNewsResponse);
}
示例6: insertarMensaje
public void insertarMensaje(string nick, string mensaje)
{
Debug.Log("Entro al insertarMensaje---------------!!!");
SFSObject sfsObject = new SFSObject();
sfsObject.PutUtfString("nick",nick);
sfsObject.PutUtfString("mensaje",mensaje);
extensionManager.sendRequest(new ExtensionRequest("insertarMensaje", sfsObject));
}
示例7: SendCollisionEvent
private void SendCollisionEvent(string otherUUID)
{
SFSObject data = new SFSObject ();
data.PutUtfString ("a", UUID);
data.PutUtfString ("b", otherUUID);
Debug.Log ("Reporting collision between " + UUID + " & " + otherUUID);
server.Send (new ExtensionRequest ("collision", data, server.LastJoinedRoom));
}
示例8: Button_Clicked
public void Button_Clicked(String buttonName)
{
if(buttonName == "LoginButton")
{
String EncryptedPW = PasswordUtil.MD5Password(PasswordTB.text);
SFServer.Send(new LoginRequest(UsernameTB.text, EncryptedPW, GAME_ZONE));
SFServer.Send(new JoinRoomRequest("Game"));
}
if(buttonName == "RegisterButton")
{
this.RegisterPanel.SetActive(true);
this.LoginPanel.SetActive(false);
SFServer.Send(new LoginRequest("", "", "Registration"));
}
if(buttonName == "ExitButton")
{
SFServer.Disconnect();
SFServer.RemoveAllEventListeners();
Application.Quit();
}
if(buttonName == "CreateButton")
{
InputField UsernameTB = GameObject.Find("UsernameTB").GetComponent<InputField>();
InputField PasswordTB = GameObject.Find("PasswordTB").GetComponent<InputField>();
InputField ConfirmPasswordTB = GameObject.Find("ConfirmPasswordTB").GetComponent<InputField>();
InputField EmailTB = GameObject.Find("EmailTB").GetComponent<InputField>();
InputField RegistrationKeyTB = GameObject.Find("RegistrationKeyTB").GetComponent<InputField>();
Debug.Log("Username: " + UsernameTB.text);
Debug.Log("Password: " + PasswordTB.text);
Debug.Log("ConfirmPW: " + ConfirmPasswordTB.text);
Debug.Log("Email: " + EmailTB.text);
Debug.Log("RegistrationKey: " + RegistrationKeyTB.text);
if(PasswordTB.text == ConfirmPasswordTB.text)
{
SFSObject NewAccountObject = new SFSObject();
NewAccountObject.PutUtfString("Username", UsernameTB.text);
NewAccountObject.PutUtfString("PasswordHash", PasswordTB.text);
NewAccountObject.PutUtfString("Email", EmailTB.text);
NewAccountObject.PutUtfString("RegistrationKey", RegistrationKeyTB.text);
this.SFServer.Send(new ExtensionRequest("$SignUp.Submit", NewAccountObject));
}
else
{
if(!MessageText.activeInHierarchy)
{
MessageText.SetActive(true);
}
MessageText.GetComponent<Text>().text = "Passwords do not match! Please check and try again.";
}
}
if(buttonName == "BackButton")
{
this.LoginPanel.SetActive(true);
this.RegisterPanel.SetActive(false);
}
}
示例9: insertarAvatar
public void insertarAvatar(string nick, string avatar)
{
Debug.Log("Entro al insertarAvatar---------------!!!");
SFSObject sfsObject = new SFSObject();
sfsObject.PutUtfString("nick",nick);
Debug.Log("dato insertado = "+ avatar);
sfsObject.PutUtfString("avatar",avatar);
extensionManager.sendRequest(new ExtensionRequest("insertarAvatar", sfsObject));
}
示例10: insertarDoorLog
//Insercion de doorlog
public void insertarDoorLog(string usuario,string puerta, string siguienteescena)
{
SFSObject sfsObject = new SFSObject();
sfsObject.PutUtfString("usuario",usuario.ToString());
sfsObject.PutUtfString("escena",siguienteescena.ToString());
sfsObject.PutUtfString("puerta",puerta.ToString());
extensionManager.sendRequest(new ExtensionRequest("insertarDoorLog", sfsObject));
Debug.Log("InsertarAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA");
}
示例11: getToken
public void getToken(string usuario,string redSocial, dbCallback getCallback)
{
Debug.Log("Entro al getToken---------------!!!");
this.getCallback= getCallback;
SFSObject sfsObject = new SFSObject();
sfsObject.PutUtfString("usuario",usuario);
sfsObject.PutUtfString("redSocial",redSocial);
smartFox.Send(new ExtensionRequest("consultarToken",sfsObject));
}
示例12: eliminarToken
public void eliminarToken(string usuario,string redSocial)
{
Debug.Log("Entro al eliminarToken---------------!!!");
SFSObject sfsObject = new SFSObject();
sfsObject.PutUtfString("usuario",usuario);
sfsObject.PutUtfString("redSocial",redSocial);
smartFox.Send(new ExtensionRequest("eliminarToken",sfsObject));
}
示例13: SendPublicMessage
public void SendPublicMessage()
{
ISFSObject objOut = new SFSObject();
objOut.PutUtfString("Sender", sfs.MySelf.Name);
objOut.PutUtfString("Content", ChatBox.text);
ChatBox.text = "";
ChatBox.ActivateInputField();
ChatBox.Select();
sfs.Send(new PublicMessageRequest("PublicMessage", objOut, sfs.LastJoinedRoom));
}
示例14: OnLogin
protected override void OnLogin(BaseEvent e)
{
base.OnLogin(e);
print("OnLogin : " + e.Params.GetObject("user"));
ISFSObject objOut = new SFSObject();
objOut.PutUtfString("username", userName);
objOut.PutUtfString("password", password);
objOut.PutUtfString("email", email);
_sfs.SendExtensionRequest(CMD_SIGNUP, objOut);
}
示例15: Compress
protected void Compress()
{
GameObject tetrisDropper = GameObject.Find ("TetrisDropper");
GameObject gameManager = GameObject.Find ("GameManager");
SFSObject createBlockMessage = new SFSObject ();
createBlockMessage.PutUtfString ("messageType", "RequestCreate");
createBlockMessage.PutUtfString ("objectType", "Block");
createBlockMessage.PutFloat ("xPos", tetrisDropper.transform.position.x);
createBlockMessage.PutFloat ("yPos", tetrisDropper.transform.position.y);
createBlockMessage.PutFloat ("zPos", tetrisDropper.transform.position.z);
gameManager.SendMessage ("SendData", createBlockMessage);
}