当前位置: 首页>>代码示例>>C#>>正文


C# ChatEvent.getSender方法代码示例

本文整理汇总了C#中ChatEvent.getSender方法的典型用法代码示例。如果您正苦于以下问题:C# ChatEvent.getSender方法的具体用法?C# ChatEvent.getSender怎么用?C# ChatEvent.getSender使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ChatEvent的用法示例。


在下文中一共展示了ChatEvent.getSender方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: 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);
            }
        }
开发者ID:ZWTGW,项目名称:unity,代码行数:25,代码来源:Listener.cs

示例2: 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);
            }
        }
开发者ID:HimanshuSShephertz,项目名称:AppWarpUnity,代码行数:10,代码来源:Listener.cs

示例3: 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());
     }
 }
开发者ID:shephertz,项目名称:AppWarpUnitySamples,代码行数:11,代码来源:Listener.cs

示例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());
     //			}
 }
开发者ID:4ONSports,项目名称:Prototype_2,代码行数:13,代码来源:NotificationListener.cs

示例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));
        }
开发者ID:shephertz,项目名称:AppWarpMono,代码行数:20,代码来源:ChatActivity.cs

示例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;
            });
        }
开发者ID:shephertz,项目名称:AppWarpMono,代码行数:22,代码来源:ChatController.cs

示例7: onChatReceived

		public void onChatReceived(ChatEvent eventObj){
			Log(eventObj.getSender() + ":" + eventObj.getMessage());
		}
开发者ID:sheepbeo,项目名称:ChatTest,代码行数:3,代码来源:ChatClient.cs

示例8: onChatReceived

 public void onChatReceived(ChatEvent eventObj)
 {
     Log(eventObj.getSender() + " said " + eventObj.getMessage());
     m_apppwarp.onMsg(eventObj.getSender(), eventObj.getMessage());
 }
开发者ID:RajeevRShephertz,项目名称:UnityConnectionResiliencySample,代码行数:5,代码来源:Listener.cs

示例9: onChatReceived

 public void onChatReceived(ChatEvent eventObj)
 {
     _page.showResult("chat from " + eventObj.getSender() + " msg " + eventObj.getMessage() + " id "+eventObj.getLocationId() + eventObj.isLocationLobby());
     WarpClient.GetInstance().GetLiveLobbyInfo();
 }
开发者ID:shephertz,项目名称:App42_AppWarp_Windows_Sample,代码行数:5,代码来源:NotificationListener.cs

示例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";
 }
开发者ID:shephertz,项目名称:AppWarpUnity,代码行数:5,代码来源:AppWarpManager.cs


注:本文中的ChatEvent.getSender方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。