public static SendOutgoingCommands ( ) : void | ||
Результат | void |
private void OnApplicationFocus(bool focus) { playerState = focus; if (!isOnlineMode) { return; } if (focus) { Debug.Log("Application resume"); if (opponentState) { Time.timeScale = 1f; } WhotUiManager.instance.connecting.SetActive(true); StartCoroutine(checkPoolStatus()); if (PhotonNetwork.room != null) { WhotUiManager.instance.connecting.SetActive(false); PhotonNetwork.RaiseEvent(152, 1, true, null); PhotonNetwork.SendOutgoingCommands(); } } else { // playerState = false; Debug.Log("Application pause"); WhotUiManager.instance.connecting.SetActive(true); Time.timeScale = 0f; PhotonNetwork.RaiseEvent(151, 1, true, null); PhotonNetwork.SendOutgoingCommands(); } }
// Update is called once per frame void Update() { RaycastHit hit; if (GetComponent <PhotonView>().isMine) { if (PhotonNetwork.player.GetScore() >= collectGoal) { Debug.Log("Goal Hit"); ScoreContainer.scores = PhotonNetwork.playerList; GetComponent <PhotonView>().RPC("TransitionScreen", PhotonTargets.AllViaServer, null); PhotonNetwork.SendOutgoingCommands(); } if (Physics.Raycast(transform.position, Camera.main.transform.forward, out hit, raycastDist)) { if (hit.transform.tag == "Collect") { hit.transform.gameObject.GetComponent <diamondControl>().destroySelf(); PhotonNetwork.player.SetScore(PhotonNetwork.player.GetScore() + 1); // cmw edited & tested GetComponent <PlayerMovement>().speedExhaust = GetComponent <PlayerMovement>().speedExhaustScale; Debug.LogError("CMW: " + GetComponent <PlayerMovement>().speedExhaust + " " + GetComponent <PlayerMovement>().speedExhaustScale); } } } }
protected void OnApplicationPause(bool pauseStatus) { if (pauseStatus) { if (PhotonNetwork.connectionState == ConnectionState.Connected && PhotonNetwork.inRoom && PhotonNetwork.isMasterClient) { ChangeMasterClientifAvailble(); PhotonNetwork.SendOutgoingCommands(); } } }
private void OnApplicationQuit() { if (LudoMultiplayer.Instance.gameStarted) { if (PhotonNetwork.room != null) { LudoMultiplayer.Instance.checkForceQuit(); PhotonNetwork.RaiseEvent(153, UserDetailsManager.userId, true, null); PhotonNetwork.SendOutgoingCommands(); } } }
public void GameEnded(string Team)//모두에게 진팀 보내주기 { byte evcode = 151; object[] datas = new object[] { (string)Team }; RaiseEventOptions op = new RaiseEventOptions { Receivers = ReceiverGroup.All }; PhotonNetwork.RaiseEvent(evcode, datas, true, op); PhotonNetwork.SendOutgoingCommands(); }
void OnApplicationPause(bool pauseStatus) { if (pauseStatus) { PhotonNetwork.SendOutgoingCommands(); Debug.Log("Application pause"); } else { PhotonNetwork.SendOutgoingCommands(); Debug.Log("Application resume"); } }
/// <param name="KillerImg">가해자 오브젝트의 이미지(string)</param> /// <param name="KilledImg">피해자 오브젝트 이미지(string)</param> /// <param name="Team">가해자의 팀(string) 타워면 "ex"</param> public void sendKillmsg(string KillerImg, string KilledImg, string Team) { evcode = 160; object[] datas = new object[] { KillerImg, KilledImg, Team }; if (isDatasame(curdata, datas)) { return; } curdata = datas; PhotonNetwork.RaiseEvent(evcode, datas, true, op); PhotonNetwork.SendOutgoingCommands(); Invoke("Reset_data", 10f); }
public static void RaiseEvent(byte i_EventCode, Hashtable i_Params, bool i_SendReliable, RaiseEventOptions i_Options, bool i_Immediate = false) { if (!offlineMode) { PhotonNetwork.RaiseEvent(i_EventCode, i_Params, i_SendReliable, i_Options); if (i_Immediate) { PhotonNetwork.SendOutgoingCommands(); } return; } RaiseLocalEvent(i_EventCode, i_Params, i_Options); }
void OnApplicationPause(bool pauseStatus) { if (pauseStatus) { PhotonNetwork.RaiseEvent(151, 1, true, null); PhotonNetwork.SendOutgoingCommands(); Debug.Log("Application pause"); } else { PhotonNetwork.RaiseEvent(152, 1, true, null); PhotonNetwork.SendOutgoingCommands(); Debug.Log("Application resume"); } }
IEnumerator sendFeedback() { yield return(new WaitForSecondsRealtime(1f)); if (PhotonNetwork.room != null) { PhotonNetwork.RaiseEvent(152, 1, true, null); PhotonNetwork.SendOutgoingCommands(); WhotUiManager.instance.connecting.SetActive(false); } else { StartCoroutine(sendFeedback()); } }
/// <param name="num">0Null, 1Welcome, 2MinionWait, 3MinionSpawn, 4SuperMinion, 5Kill, 6Killed, 7Excution, 8T_Destroy, /// 9 T_Destroyed, 10Inhibitor_Destroy, 11Inhibitor_Destroyed, 12Inhibitor_Respawn </param> /// <param name="isAnnouce">전체 방송인지 팀 전송인지.</param> public void Annoucement(int num, bool isAnnouce, string team = null) { if (isAnnouce) { evcode = 150; } else { if (team.Equals("red") || team.Equals("Red")) { evcode = 131; } else if (team.Equals("blue") || team.Equals("Blue")) { evcode = 141; } } PhotonNetwork.RaiseEvent(evcode, num, true, op); PhotonNetwork.SendOutgoingCommands(); }
private void SceneLoaded_Send() { if (this == null) { return; } if (photonview.isMine) { byte evcode = 33; string Team = PhotonNetwork.player.GetTeam().ToString(); int viewid = photonview.viewID; object datas = new object[] { viewid, Team }; RaiseEventOptions op = new RaiseEventOptions { Receivers = ReceiverGroup.MasterClient, CachingOption = EventCaching.AddToRoomCache }; PhotonNetwork.RaiseEvent(evcode, datas, true, op); PhotonNetwork.SendOutgoingCommands(); } }
public void SendFlush() { PhotonNetwork.SendOutgoingCommands(); }
public void PrintViaServerInstant() { PhotonView.Get(networkObject).RPC("ShowLog", PhotonTargets.AllViaServer, PhotonView.Get(networkObject).viewID, "Coming from server Instant"); PhotonNetwork.SendOutgoingCommands(); }
public void checkForceQuit() { photonView.RPC("CheckForceQuit", PhotonTargets.OthersBuffered, true); PhotonNetwork.RaiseEvent(153, UserDetailsManager.userId, true, null); PhotonNetwork.SendOutgoingCommands(); }
public void KillSnake(Snake targetSnake) { if (targetSnake == this) { ReasonDeath = name + " got confused and hit his own trail !!"; if (!PlayerPrefs.HasKey("TutorialComplete") && !isBot) { GUIManager.instance.ShowTutorialLog(1, "Do not hit your own trail !!", 3); } else { GUIManager.instance.ShowLog(name + " got confused and hit his own trail !!", 3); } } else { if (playerID == 1) { AccountDetails.instance.Save(totalKills: 1); } targetSnake.ReasonDeath = name + " ended " + targetSnake.name + "'s trail game !!"; if (snakeMeshContainer.AnimController) { snakeMeshContainer.AnimController.Kill(); } if (!PlayerPrefs.HasKey("TutorialComplete") && !isLog) { isLog = true; if (!isBot) { GUIManager.instance.ShowTutorialLog("Nicely done !!", 2); } else { GUIManager.instance.ShowTutorialLog("Try completing shorter trails to play safe!!", 2); } Invoke("EnableLog", 2); } else { if (!targetSnake.isShielded) { GUIManager.instance.ShowLog(name + " ended " + targetSnake.name + "'s trail game !!", 3); } } } if (!isBot) { isOncePlayer = true; } if (targetSnake.isShielded) { } else { targetSnake.haveToDie = true; if (PhotonNetwork.inRoom && !isNetworkKill && isLocal) { PhotonView.Get(targetSnake._networkSnake.gameObject).RPC("KillPlayer", PhotonTargets.AllViaServer); PhotonNetwork.SendOutgoingCommands(); targetSnake._networkSnake.shouldTransmit = false; isNetworkKill = true; Invoke("EnableNetworkKill", 2); } } }
void NetworkGameOver() { print("gameover called"); PhotonView.Get(Server.instance.gameObject).RPC("GameOver", PhotonTargets.AllViaServer, PhotonView.Get(_networkSnake.gameObject).viewID, ReasonDeath); PhotonNetwork.SendOutgoingCommands(); }
public void SendTouch() { photonView.RPC("DoTouch", PhotonTargets.All); PhotonNetwork.SendOutgoingCommands(); }