// Update is called once per frame void Update() { photonView.RPC("ForceUpdate", PhotonTargets.All, nextMission, mission2, justFailed); if (justFailed) { justFailed = false; //StartCoroutine(_FailMission()); NetworkChangeScene.AllPlayerChangeScene("BaseNew"); GameObject.Find("Player1Character").GetComponent <ControlScript>().health = 60; GameObject.Find("Player2Character").GetComponent <ControlScript>().health = 60; } if (PhotonNetwork.isMasterClient) { switch (nextMission) { case Constants.Mission.Stage2_1F: bool waveDone = npcManager.AllDead(); if (waveDone /* && mission2.nextWave == 2*/) { FinishMission(); break; } //if (waveDone) //{ //mission2.nextWave++; //GameObject[] enemySpawnPoints = GameObject.FindGameObjectsWithTag("EnemySpawnPoint"); //npcManager.Spawn("Orc_Gnur", enemySpawnPoints[2]); //npcManager.Spawn("Orc_Gnur", enemySpawnPoints[3]); //npcManager.Spawn("Orc_Gnur", enemySpawnPoints[4]); //} break; } } }