예제 #1
0
 private void onRoomJoinedOrCreated(GPGRoom room, GPGRoomUpdateStatus status)
 {
     if (status == GPGRoomUpdateStatus.STATUS_OK && room.hasData)
     {
         GPGMultiplayer.showWaitingRoom(int.MaxValue);
     }
     else
     {
         Debug.Log("An error occurred while joining or creating a room. Status: " + status);
     }
 }
 void onJoinedRoomEvent(GPGRoom room, GPGRoomUpdateStatus statusCode)
 {
     Debug.Log("onJoinedRoomEvent. room: " + room + ", statusCode: " + statusCode);
 }
 void onRoomConnectingEvent(GPGRoom room)
 {
     Debug.Log("onRoomConnectingEvent: " + room);
 }
 void onRoomAutoMatchingEvent(GPGRoom room)
 {
     Debug.Log("onRoomAutoMatchingEvent: " + room);
 }
 void onRoomCreatedEvent(GPGRoom room, GPGRoomUpdateStatus statusCode)
 {
     Debug.Log("onRoomCreatedEvent. room: " + room + ", statusCode: " + statusCode);
 }
 void onRoomCreatedEvent( GPGRoom room, GPGRoomUpdateStatus statusCode )
 {
     Debug.Log( "onRoomCreatedEvent. room: " + room + ", statusCode: " + statusCode );
 }
 void onRoomConnectingEvent( GPGRoom room )
 {
     Debug.Log( "onRoomConnectingEvent: " + room );
 }
 void onRoomAutoMatchingEvent( GPGRoom room )
 {
     Debug.Log( "onRoomAutoMatchingEvent: " + room );
 }
 void onJoinedRoomEvent( GPGRoom room, GPGRoomUpdateStatus statusCode )
 {
     Debug.Log( "onJoinedRoomEvent. room: " + room + ", statusCode: " + statusCode );
 }
예제 #10
0
 private void onRoomJoinedOrCreated( GPGRoom room, GPGRoomUpdateStatus status )
 {
     if( status == GPGRoomUpdateStatus.STATUS_OK && room.hasData )
         GPGMultiplayer.showWaitingRoom( int.MaxValue );
     else
         Debug.Log( "An error occurred while joining or creating a room. Status: " + status );
 }
예제 #11
0
    private void onRoomConnectedEvent(GPGRoom room, GPGRoomUpdateStatus status )
    {
        CommonS._isGameInProgress = true;
        var bytes = System.Text.Encoding.UTF8.GetBytes (PlayGameServices.getLocalPlayerInfo ().name);
        Debug.Log ("Player name ::::"+PlayGameServices.getLocalPlayerInfo ().name);
        Debug.Log ("Player ID ::::" + CommonS.st_RoomCreatorID);
        Debug.Log ("Player ID ::::" + GPGMultiplayer.getCurrentPlayerParticipantId ());
        sPlayerPoint = PlayGameServices.getLocalPlayerInfo ().name + " " + PlayerPrefs.GetInt("Points",200);
        CommonS.st_listPlayerPoints.Add(sPlayerPoint);
        SenddMessage("Points"+sPlayerPoint);

        //		if (PlayerPrefs.GetString ("PlayerSelect") == "Girl") {
        //			CommonS.st_SelectList.Add(GPGMultiplayer.getCurrentPlayerParticipantId () + "Grl");
        //			SenddMessage("Player"+GPGMultiplayer.getCurrentPlayerParticipantId () + "Grl");
        //		}
        //		else{
        //			CommonS.st_SelectList.Add(GPGMultiplayer.getCurrentPlayerParticipantId () + "Boy");
        //			SenddMessage("Player"+GPGMultiplayer.getCurrentPlayerParticipantId () + "Boy");
        //		}

        CommonS.st_SelectList.Add(GPGMultiplayer.getCurrentPlayerParticipantId () + PlayerPrefs.GetString("PlayerSelect","Boy"));
        SenddMessage("Player"+ GPGMultiplayer.getCurrentPlayerParticipantId ()+PlayerPrefs.GetString("PlayerSelect","Boy"));

        GPGMultiplayer.sendUnreliableRealtimeMessageToAll( bytes );
        if (GPGMultiplayer.getCurrentPlayerParticipantId () == CommonS.st_RoomCreatorID) {
            if (CommonS.st_enmCrntTheme == CommonS.GameTheme.Electricity){
                Debug.Log("Msg Send");
                SenddMessage("Electricity");
            }
            else if (CommonS.st_enmCrntTheme == CommonS.GameTheme.Ice){
                Debug.Log("Msg Send");
                SenddMessage("Ice");
            }
            else if(CommonS.st_enmCrntTheme == CommonS.GameTheme.Fire){
                Debug.Log("Msg Send");
                SenddMessage("Fire");
            }
            StartCoroutine ("waits", 2f);
        }
        else{
            StartCoroutine ("waits", .5f);
        }
        Application.LoadLevel("MultyPlayer");
    }