本文整理汇总了C#中RoomEvent类的典型用法代码示例。如果您正苦于以下问题:C# RoomEvent类的具体用法?C# RoomEvent怎么用?C# RoomEvent使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
RoomEvent类属于命名空间,在下文中一共展示了RoomEvent类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: onUnSubscribeRoomDone
public void onUnSubscribeRoomDone(RoomEvent eventObj)
{
if (eventObj.getResult() == WarpResponseResultCode.SUCCESS)
{
// _page.showresult("Yay! UnSubscribe room :)");
}
}
示例2: onSubscribeRoomDone
public void onSubscribeRoomDone(RoomEvent eventObj)
{
if (eventObj.getResult() == WarpResponseResultCode.SUCCESS)
{
//WarpClient.GetInstance().SendChat("hello");
}
}
示例3: onSubscribeRoomDone
public void onSubscribeRoomDone(RoomEvent eventObj)
{
if (eventObj.getResult () == WarpResponseResultCode.SUCCESS) {
StartActivity(typeof(ChatActivity));
this.Finish();
}
}
示例4: onLeaveRoomDone
public void onLeaveRoomDone(RoomEvent eventObj)
{
if (eventObj.getResult() == WarpResponseResultCode.SUCCESS)
{
_page.showResult("Yay! Leave room :)");
}
}
示例5: JoinRoom
async public Task<JoinRoomResponse> JoinRoom(JoinRoomS2S request)
{
if (_roomMembers.Count >= MaxRoomSize)
return new JoinRoomResponse { RetCode = JoinRoomRetCode.RoomIsFull };
else
{
if (_roomMembers.Any(x => x.UserName == request.UserName))
return new JoinRoomResponse { RetCode = JoinRoomRetCode.NameIsTaken };
try
{
var joinNotification = new RoomEvent { Text = "User joined", UserName = request.UserName };
_callbackChannel.OnRoomEvent(joinNotification);
_roomMembers.Add(new RoomMember { UserName = request.UserName });
return new JoinRoomResponse { RetCode = JoinRoomRetCode.Ok };
}
catch (Exception)
{
return new JoinRoomResponse() { RetCode = JoinRoomRetCode.Retry };
}
}
}
示例6: onCreateRoomDone
public void onCreateRoomDone(RoomEvent eventObj)
{
Log ("onCreateRoomDone : " + eventObj.getResult());
if (eventObj.getResult () == 0) {
WarpClient.GetInstance().JoinRoom(eventObj.getData().getId());
}
}
示例7: onSubscribeRoomDone
public void onSubscribeRoomDone(RoomEvent eventObj)
{
if (eventObj.getResult() == WarpResponseResultCode.SUCCESS)
{
WarpClient.GetInstance().GetLiveRoomInfo(GlobalContext.GameRoomId);
}
}
示例8: onJoinRoomDone
public void onJoinRoomDone(RoomEvent eventObj)
{
Console.WriteLine("onJoinRoomDone as "+eventObj.getResult());
if (eventObj.getResult() == WarpResponseResultCode.SUCCESS)
{
Console.WriteLine("Subscribing Room "+Constants.CHAT_ROOM_ID);
WarpClient.GetInstance().SubscribeRoom(Constants.CHAT_ROOM_ID);
}
}
示例9: OnCreateRoomDone
public void OnCreateRoomDone(RoomEvent eventObj)
{
Debug.Log("OnCreateRoomDone " + eventObj.getResult() + " room Owner " + eventObj.getData().getRoomOwner() + " " + eventObj.getData().getRoomOwner());
if (eventObj.getResult() == WarpResponseResultCode.SUCCESS)
{
roomId = eventObj.getData().getId();
SC_AppWarpKit.JoinToRoom(eventObj.getData().getId());
}
}
示例10: onSubscribeRoomDone
public void onSubscribeRoomDone(RoomEvent eventObj)
{
System.Diagnostics.Debug.WriteLine("subscribe room");
if (eventObj.getResult() == WarpResponseResultCode.SUCCESS)
{
Global.warpClient.GetLiveRoomInfo(Global.DynRoomId);
}
}
示例11: OnCreateRoomDone
public void OnCreateRoomDone(RoomEvent eventObj)
{
Debug.Log("OnCreateRoomDone " + eventObj.getResult() + " room Owner " + eventObj.getData().getRoomOwner() + " " + eventObj.getData().getRoomOwner());
if(eventObj.getResult() == WarpResponseResultCode.SUCCESS)
{
roomId = eventObj.getData ().getId ();
guiText.text += "Room created! " + eventObj.getData ().getId () + System.Environment.NewLine;
SC_AppWarpKit.JoinToRoom(eventObj.getData().getId());
}
}
示例12: onJoinRoomDone
public void onJoinRoomDone(RoomEvent eventObj)
{
if(eventObj.getResult() == WarpResponseResultCode.SUCCESS)
{
WarpClient.GetInstance().SubscribeRoom(AppWarp.roomid);
}
else {
Debug.Log("There are alredy 2 user wait for some time");
}
Log ("onJoinRoomDone : " + eventObj.getResult());
}
示例13: onJoinRoomDone
public void onJoinRoomDone(RoomEvent eventObj)
{
if (eventObj.getResult() == WarpResponseResultCode.SUCCESS)
{
_page.showResult("joined room!");
//WarpClient.GetInstance().SubscribeRoom(eventObj.getData().getId());
}
else
{
_page.showResult("failed to join room!");
}
}
示例14: onJoinRoomDone
public void onJoinRoomDone(RoomEvent eventObj)
{
if (eventObj.getResult() == WarpResponseResultCode.SUCCESS)
{
Global.roomJoined = true;
System.Diagnostics.Debug.WriteLine("joined room");
Global.DynRoomId = eventObj.getData().getId();
Global.warpClient.SubscribeRoom(Global.DynRoomId);
if(!Global.PlayerIsFirst)
Global.opponentUsername = eventObj.getData().getRoomOwner();
Deployment.Current.Dispatcher.BeginInvoke(() =>
{
_page.ready.Text = Global.localUsername + " \nvs\n" + Global.opponentUsername;
});
}
else if (eventObj.getResult() == WarpResponseResultCode.RESOURCE_NOT_FOUND)
{
System.Diagnostics.Debug.WriteLine("room not found .. hence creating");
Global.PlayerIsFirst = true;
Global.dictionary = new Dictionary<string,object>();
Global.dictionary.Add("category", Global.itemName[(int)settings["trigger"]]);
Global.dictionary.Add("availUsers", 0);
Global.dictionary.Add("score0", 0);
Global.dictionary.Add("score1", 0);
Global.dictionary.Add("status", "notyetstarted");
Global.dictionary.Add("ready0", false);
Global.dictionary.Add("ready1", false);
// first for buffering - later per question
Global.dictionary.Add("endgame0", false);
Global.dictionary.Add("endgame1", false);
int[] temp = randomize(Global.maxClips[(int)settings["trigger"]]);
for (int i = 0; i < 5; i++ )
{
Global.dictionary.Add("q" + (i+1), temp[i]);
}
Global.warpClient.CreateRoom(Global.localUsername, Global.localUsername, 2, Global.dictionary);
System.Diagnostics.Debug.WriteLine("request to create room");
}
// Global.warpClient.LeaveRoom(eventObj.getData().getId());
}
示例15: onSubscribeRoomDone
public void onSubscribeRoomDone(RoomEvent eventObj)
{
Console.WriteLine("onSubscribeRoomDone as "+eventObj.getResult());
if (eventObj.getResult() == WarpResponseResultCode.SUCCESS)
{
InvokeOnMainThread (delegate {
nameTextField.ResignFirstResponder();
ChatController cc = new ChatController();
this.NavigationController.PushViewController(cc, true);
});
}
}