private void OnButtonStartClick() { IN_GAME_MAIN_CAMERA.Difficulty = difficulitySelection; IN_GAME_MAIN_CAMERA.GameType = GameType.Single; IN_GAME_MAIN_CAMERA.singleCharacter = new string[] { "Mikasa", "Levi", "Armin", "Marco", "Jean", "Eren", "TITAN_EREN", "Petra", "Sasha", "Set 1", "Set 2", "Set 3" }[characterSelection.ToValue()].ToUpper(); IN_GAME_MAIN_CAMERA.CameraMode = (CameraType)Settings.CameraMode.ToValue(); IN_GAME_MAIN_CAMERA.DayLight = (DayLight)dayLightSelection.ToValue(); Screen.lockCursor = IN_GAME_MAIN_CAMERA.CameraMode >= CameraType.TPS; Screen.showCursor = false; CheckBoxCostume.costumeSet = costumeSelection.ToValue() + 1; string map = mapList[mapSelection.ToValue()]; FengGameManagerMKII.Level = LevelInfo.GetInfo(map); Application.LoadLevel(FengGameManagerMKII.Level.MapName); }
private void SpawnHero() { CheckBoxCostume.costumeSet = costumeSelection.ToValue() + 1; FengGameManagerMKII.FGM.NeedChooseSide = false; if (IN_GAME_MAIN_CAMERA.GameMode == GameMode.PVP_CAPTURE) { FengGameManagerMKII.FGM.checkpoint = CacheGameObject.Find("PVPchkPtH"); } if (!PhotonNetwork.IsMasterClient && FengGameManagerMKII.FGM.Logic.RoundTime > 60f) { if (!FengGameManagerMKII.FGM.IsPlayerAllDead()) { FengGameManagerMKII.FGM.NOTSpawnPlayer(character); } else { FengGameManagerMKII.FGM.NOTSpawnPlayer(character); FengGameManagerMKII.FGM.BasePV.RPC("restartGameByClient", PhotonTargets.MasterClient, new object[0]); } } else if (IN_GAME_MAIN_CAMERA.GameMode == GameMode.BOSS_FIGHT_CT || IN_GAME_MAIN_CAMERA.GameMode == GameMode.TROST || IN_GAME_MAIN_CAMERA.GameMode == GameMode.PVP_CAPTURE) { if (FengGameManagerMKII.FGM.IsPlayerAllDead()) { FengGameManagerMKII.FGM.NOTSpawnPlayer(character); FengGameManagerMKII.FGM.BasePV.RPC("restartGameByClient", PhotonTargets.MasterClient, new object[0]); } else { FengGameManagerMKII.FGM.SpawnPlayer(character); } } else { FengGameManagerMKII.FGM.SpawnPlayer(character); } IN_GAME_MAIN_CAMERA.usingTitan = false; IN_GAME_MAIN_CAMERA.MainCamera.setHUDposition(); Hashtable customProperties = new Hashtable { { PhotonPlayerProperty.character, character } }; PhotonNetwork.player.SetCustomProperties(customProperties); }
private void SpawnHero() { CheckBoxCostume.costumeSet = costumeSelection.ToValue() + 1; FengGameManagerMKII.FGM.needChooseSide = false; if (IN_GAME_MAIN_CAMERA.GameMode == GameMode.PVP_CAPTURE) { FengGameManagerMKII.FGM.checkpoint = CacheGameObject.Find("PVPchkPtH"); } if (!PhotonNetwork.IsMasterClient && FengGameManagerMKII.FGM.logic.RoundTime > 60f) { if (!FengGameManagerMKII.IsPlayerAllDead()) { FengGameManagerMKII.FGM.NotSpawnPlayer(character); } else { FengGameManagerMKII.FGM.NotSpawnPlayer(character); FengGameManagerMKII.FGM.BasePV.RPC("restartGameByClient", PhotonTargets.MasterClient, new object[0]); } } else if (IN_GAME_MAIN_CAMERA.GameMode == GameMode.BossFightCT || IN_GAME_MAIN_CAMERA.GameMode == GameMode.Trost || IN_GAME_MAIN_CAMERA.GameMode == GameMode.PVP_CAPTURE) { if (FengGameManagerMKII.IsPlayerAllDead()) { FengGameManagerMKII.FGM.NotSpawnPlayer(character); FengGameManagerMKII.FGM.BasePV.RPC("restartGameByClient", PhotonTargets.MasterClient, new object[0]); } else { FengGameManagerMKII.FGM.SpawnPlayer(character); } } else { FengGameManagerMKII.FGM.SpawnPlayer(character); } IN_GAME_MAIN_CAMERA.usingTitan = false; IN_GAME_MAIN_CAMERA.MainCamera.setHUDposition(); PhotonNetwork.player.Character = character; }