本文整理汇总了C#中ChatEvent.getMessage方法的典型用法代码示例。如果您正苦于以下问题:C# ChatEvent.getMessage方法的具体用法?C# ChatEvent.getMessage怎么用?C# ChatEvent.getMessage使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ChatEvent
的用法示例。
在下文中一共展示了ChatEvent.getMessage方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: onChatReceived
public void onChatReceived(ChatEvent eventObj)
{
Log(eventObj.getSender() + " sended " + eventObj.getMessage());
SimpleJSON.JSONNode msg = SimpleJSON.JSON.Parse(eventObj.getMessage());
if(eventObj.getSender() != appwarp.username)
{
appwarp.movePlayer(msg["x"].AsFloat,msg["y"].AsFloat,msg["z"].AsFloat);
}
}
示例2: onChatReceived
public void onChatReceived(ChatEvent eventObj)
{
Log(eventObj.getSender() + " sended " + eventObj.getMessage());
com.shephertz.app42.gaming.multiplayer.client.SimpleJSON.JSONNode msg = com.shephertz.app42.gaming.multiplayer.client.SimpleJSON.JSON.Parse(eventObj.getMessage());
//msg[0]
if(eventObj.getSender() != appwarp.username)
{
appwarp.movePlayer(msg["x"].AsFloat,msg["y"].AsFloat,msg["z"].AsFloat);
//Log(msg["x"].ToString()+" "+msg["y"].ToString()+" "+msg["z"].ToString());
}
}
示例3: onChatReceived
public void onChatReceived(ChatEvent eventObj)
{
com.shephertz.app42.gaming.multiplayer.client.SimpleJSON.JSONNode msg = com.shephertz.app42.gaming.multiplayer.client.SimpleJSON.JSON.Parse(eventObj.getMessage());
checkUser(eventObj.getSender());
string sender = eventObj.getSender();
string parameters = msg ["parameters"].ToString();
string message = msg ["message"].ToString();
if( parameters.Length > 0 )
{
parameters = parameters.Substring(0, parameters.Length - 1);
parameters = parameters.Substring(1, parameters.Length - 1);
appwarp.manageNotification(sender, parameters);
}
else if( message.Length > 0 )
{
message = message.Substring(0, message.Length - 1);
message = message.Substring(1, message.Length - 1);
appwarp.showMessage(message, sender);
}
}
示例4: onChatReceived
public void onChatReceived(ChatEvent eventObj)
{
Log(eventObj.getSender() + " sended " + eventObj.getMessage());
// // SimpleJSON.JSONNode msg = SimpleJSON.JSON.Parse("aa");//eventObj.getMessage());
// // SimpleJSON.JSONNode msg = SimpleJSON.JSONNode.Parse(eventObj.getMessage());
// SimpleJSON.JObject msg = SimpleJSON.JSON.Parse(eventObj.getMessage());
// //msg[0]
// if(eventObj.getSender() != AppWarp.localusername)
// {
//// AppWarp.movePlayer(msg["x"].AsFloat,msg["y"].AsFloat,msg["z"].AsFloat);
// //Log(msg["x"].ToString()+" "+msg["y"].ToString()+" "+msg["z"].ToString());
// }
}
示例5: onChatReceived
public void onChatReceived(ChatEvent eventObj)
{
String sender = eventObj.getSender ();
String message = eventObj.getMessage ();
history [nextIndex].sender = sender;
history [nextIndex].message = message;
nextIndex++;
if (nextIndex >= Constants.MAX_MSG_HISTORY) {
nextIndex = 0;
}
String lines="";
for (int i=0; i<Constants.MAX_MSG_HISTORY; i++) {
if((history[i].message != null) && (history[i].message.Length > 0)){
String line = history[i].sender+":"+history[i].message+"\n";
lines += line;
}
}
RunOnUiThread(() => updateHistory(lines));
}
示例6: onChatReceived
public void onChatReceived(ChatEvent eventObj)
{
String sender = eventObj.getSender ();
String message = eventObj.getMessage ();
history [nextIndex].sender = sender;
history [nextIndex].message = message;
nextIndex++;
if (nextIndex >= Constants.MAX_MSG_HISTORY) {
nextIndex = 0;
}
String lines="";
for (int i=0; i<Constants.MAX_MSG_HISTORY; i++) {
if((history[i].message != null) && (history[i].message.Length > 0)){
String line = " "+history[i].sender+":"+history[i].message+"\n";
lines += line;
}
}
InvokeOnMainThread (delegate {
historyLabel.Text = lines;
});
}
示例7: onChatReceived
public void onChatReceived(ChatEvent eventObj){
Log(eventObj.getSender() + ":" + eventObj.getMessage());
}
示例8: onChatReceived
public void onChatReceived(ChatEvent eventObj)
{
Log(eventObj.getSender() + " said " + eventObj.getMessage());
m_apppwarp.onMsg(eventObj.getSender(), eventObj.getMessage());
}
示例9: onChatReceived
public void onChatReceived(ChatEvent eventObj)
{
_page.showResult("chat from " + eventObj.getSender() + " msg " + eventObj.getMessage() + " id "+eventObj.getLocationId() + eventObj.isLocationLobby());
WarpClient.GetInstance().GetLiveLobbyInfo();
}
示例10: onChatReceived
public void onChatReceived(ChatEvent eventObj)
{
Debug.Log ("onChatReceived Sender : " + eventObj.getSender() + ", Message : " + eventObj.getMessage());
notifications+="onChatReceived Sender : " + eventObj.getSender() + ", Message : " + eventObj.getMessage()+"\n";
}