Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private void core()
- {
- if ((IN_GAME_MAIN_CAMERA.gametype != GAMETYPE.SINGLE) && this.needChooseSide)
- {
- if (GameObject.Find("InputManagerController").GetComponent<FengCustomInputs>().isInputDown[InputCode.flare1])
- {
- if (NGUITools.GetActive(this.ui.GetComponent<UIReferArray>().panels[3]))
- {
- Screen.lockCursor = true;
- Screen.showCursor = true;
- NGUITools.SetActive(this.ui.GetComponent<UIReferArray>().panels[0], true);
- NGUITools.SetActive(this.ui.GetComponent<UIReferArray>().panels[1], false);
- NGUITools.SetActive(this.ui.GetComponent<UIReferArray>().panels[2], false);
- NGUITools.SetActive(this.ui.GetComponent<UIReferArray>().panels[3], false);
- GameObject.Find("MainCamera").GetComponent<SpectatorMovement>().disable = false;
- GameObject.Find("MainCamera").GetComponent<MouseLook>().disable = false;
- }
- else
- {
- Screen.lockCursor = false;
- Screen.showCursor = true;
- NGUITools.SetActive(this.ui.GetComponent<UIReferArray>().panels[0], false);
- NGUITools.SetActive(this.ui.GetComponent<UIReferArray>().panels[1], false);
- NGUITools.SetActive(this.ui.GetComponent<UIReferArray>().panels[2], false);
- NGUITools.SetActive(this.ui.GetComponent<UIReferArray>().panels[3], true);
- GameObject.Find("MainCamera").GetComponent<SpectatorMovement>().disable = true;
- GameObject.Find("MainCamera").GetComponent<MouseLook>().disable = true;
- }
- }
- if (GameObject.Find("InputManagerController").GetComponent<FengCustomInputs>().isInputDown[15] && !NGUITools.GetActive(this.ui.GetComponent<UIReferArray>().panels[3]))
- {
- NGUITools.SetActive(this.ui.GetComponent<UIReferArray>().panels[0], false);
- NGUITools.SetActive(this.ui.GetComponent<UIReferArray>().panels[1], true);
- NGUITools.SetActive(this.ui.GetComponent<UIReferArray>().panels[2], false);
- NGUITools.SetActive(this.ui.GetComponent<UIReferArray>().panels[3], false);
- Screen.showCursor = true;
- Screen.lockCursor = false;
- GameObject.Find("MainCamera").GetComponent<SpectatorMovement>().disable = true;
- GameObject.Find("MainCamera").GetComponent<MouseLook>().disable = true;
- GameObject.Find("InputManagerController").GetComponent<FengCustomInputs>().showKeyMap();
- GameObject.Find("InputManagerController").GetComponent<FengCustomInputs>().justUPDATEME();
- GameObject.Find("InputManagerController").GetComponent<FengCustomInputs>().menuOn = true;
- }
- }
- if ((IN_GAME_MAIN_CAMERA.gametype == GAMETYPE.SINGLE) || (IN_GAME_MAIN_CAMERA.gametype == GAMETYPE.MULTIPLAYER))
- {
- string str11;
- if (IN_GAME_MAIN_CAMERA.gametype == GAMETYPE.MULTIPLAYER)
- {
- string content = string.Empty;
- foreach (PhotonPlayer player in PhotonNetwork.playerList)
- {
- if (player.customProperties[PhotonPlayerProperty.dead] != null)
- {
- str11 = content;
- object[] objArray1 = new object[] { str11, "[000000]#", player.ID, " " };
- content = string.Concat(objArray1);
- if (player.isLocal)
- {
- content = content + "[FFCC00] >[-]";
- }
- if (player.isMasterClient)
- {
- content = content + "[Admin] ";
- }
- if ((bool) player.customProperties[PhotonPlayerProperty.dead])
- {
- content = content + "[" + ColorSet.color_red + "] *alive* ";
- if (((int) player.customProperties[PhotonPlayerProperty.isTitan]) == 2)
- {
- content = content + "[" + ColorSet.color_titan_player + "] T ";
- }
- if (((int) player.customProperties[PhotonPlayerProperty.isTitan]) == 1)
- {
- if (((int) player.customProperties[PhotonPlayerProperty.team]) == 2)
- {
- content = content + "[" + ColorSet.color_human_1 + "] H ";
- }
- else
- {
- content = content + "[" + ColorSet.color_human + "] H ";
- }
- }
- }
- else
- {
- if (((int) player.customProperties[PhotonPlayerProperty.isTitan]) == 2)
- {
- content = content + "[" + ColorSet.color_titan_player + "] T ";
- }
- if (((int) player.customProperties[PhotonPlayerProperty.isTitan]) == 1)
- {
- if (((int) player.customProperties[PhotonPlayerProperty.team]) == 2)
- {
- content = content + "[" + ColorSet.color_human_1 + "] H ";
- }
- else
- {
- content = content + "[" + ColorSet.color_human + "] H ";
- }
- }
- }
- str11 = content;
- object[] objArray2 = new object[] { str11, string.Empty, player.customProperties[PhotonPlayerProperty.name], "[ff0000]:", player.customProperties[PhotonPlayerProperty.kills], "/", player.customProperties[PhotonPlayerProperty.deaths], "/", player.customProperties[PhotonPlayerProperty.max_dmg], "/", player.customProperties[PhotonPlayerProperty.total_dmg] };
- content = string.Concat(objArray2);
- if ((bool) player.customProperties[PhotonPlayerProperty.dead])
- {
- content = content + "[-]";
- }
- content = content + "\n";
- }
- }
- this.ShowHUDInfoTopLeft(content);
- if (((GameObject.Find("MainCamera") != null) && (IN_GAME_MAIN_CAMERA.gamemode != GAMEMODE.RACING)) && (GameObject.Find("MainCamera").GetComponent<IN_GAME_MAIN_CAMERA>().gameOver && !this.needChooseSide))
- {
- this.ShowHUDInfoCenter("Press [F7D358]" + GameObject.Find("InputManagerController").GetComponent<FengCustomInputs>().inputString[InputCode.flare1] + "[-] to spectate the next player. \nPress [F7D358]" + GameObject.Find("InputManagerController").GetComponent<FengCustomInputs>().inputString[InputCode.flare2] + "[-] to spectate the previous player.\nPress [F7D358]" + GameObject.Find("InputManagerController").GetComponent<FengCustomInputs>().inputString[InputCode.attack1] + "[-] to enter the spectator mode.\n\n\n\n");
- if (LevelInfo.getInfo(level).respawnMode == RespawnMode.DEATHMATCH)
- {
- this.myRespawnTime += Time.deltaTime;
- int num2 = 10;
- if (((int) PhotonNetwork.player.customProperties[PhotonPlayerProperty.isTitan]) == 2)
- {
- num2 = 15;
- }
- this.ShowHUDInfoCenterADD("Respawn in " + ((num2 - ((int) this.myRespawnTime))).ToString() + "s.");
- if (this.myRespawnTime > num2)
- {
- this.myRespawnTime = 0f;
- GameObject.Find("MainCamera").GetComponent<IN_GAME_MAIN_CAMERA>().gameOver = false;
- if (((int) PhotonNetwork.player.customProperties[PhotonPlayerProperty.isTitan]) == 2)
- {
- this.SpawnNonAITitan(this.myLastHero, "titanRespawn");
- }
- else
- {
- this.SpawnPlayer(this.myLastHero, this.myLastRespawnTag);
- }
- GameObject.Find("MainCamera").GetComponent<IN_GAME_MAIN_CAMERA>().gameOver = false;
- this.ShowHUDInfoCenter(string.Empty);
- }
- }
- }
- }
- else if (IN_GAME_MAIN_CAMERA.gametype == GAMETYPE.SINGLE)
- {
- if (IN_GAME_MAIN_CAMERA.gamemode == GAMEMODE.RACING)
- {
- if (!this.isLosing)
- {
- this.currentSpeed = GameObject.Find("MainCamera").GetComponent<IN_GAME_MAIN_CAMERA>().main_object.rigidbody.velocity.magnitude;
- this.maxSpeed = Mathf.Max(this.maxSpeed, this.currentSpeed);
- this.ShowHUDInfoTopLeft(string.Concat(new object[] { "Current Speed : ", (int) this.currentSpeed, "\nMax Speed:", this.maxSpeed }));
- }
- }
- else
- {
- this.ShowHUDInfoTopLeft(string.Concat(new object[] { "Kills:", this.single_kills, "\nMax Damage:", this.single_maxDamage, "\nTotal Damage:", this.single_totalDamage }));
- }
- }
- if (this.isLosing && (IN_GAME_MAIN_CAMERA.gamemode != GAMEMODE.RACING))
- {
- if (IN_GAME_MAIN_CAMERA.gametype == GAMETYPE.SINGLE)
- {
- if (IN_GAME_MAIN_CAMERA.gamemode == GAMEMODE.SURVIVE_MODE)
- {
- this.ShowHUDInfoCenter(string.Concat(new object[] { "Survive ", this.wave, " Waves!\n Press ", GameObject.Find("InputManagerController").GetComponent<FengCustomInputs>().inputString[InputCode.restart], " to Restart.\n\n\n" }));
- }
- else
- {
- this.ShowHUDInfoCenter("Lolz you failed!\n Press " + GameObject.Find("InputManagerController").GetComponent<FengCustomInputs>().inputString[InputCode.restart] + " to Restart.\n\n\n");
- }
- }
- else
- {
- if (IN_GAME_MAIN_CAMERA.gamemode == GAMEMODE.SURVIVE_MODE)
- {
- this.ShowHUDInfoCenter(string.Concat(new object[] { "Survive ", this.wave, " Waves!\nGame Restart in ", (int) this.gameEndCD, "s\n\n" }));
- }
- else
- {
- this.ShowHUDInfoCenter("Failed!\nAgain?\nGame Restart in " + ((int) this.gameEndCD) + "s\n\n");
- }
- if (this.gameEndCD <= 0f)
- {
- this.gameEndCD = 0f;
- if (PhotonNetwork.isMasterClient)
- {
- this.restartGame(false);
- }
- this.ShowHUDInfoCenter(string.Empty);
- }
- else
- {
- this.gameEndCD -= Time.deltaTime;
- }
- }
- }
- if (this.isWinning)
- {
- if (IN_GAME_MAIN_CAMERA.gametype == GAMETYPE.SINGLE)
- {
- if (IN_GAME_MAIN_CAMERA.gamemode == GAMEMODE.RACING)
- {
- this.ShowHUDInfoCenter((((((int) (this.timeTotalServer * 10f)) * 0.1f) - 5f)).ToString() + "s !\n Press " + GameObject.Find("InputManagerController").GetComponent<FengCustomInputs>().inputString[InputCode.restart] + " to Restart.\n\n\n");
- }
- else if (IN_GAME_MAIN_CAMERA.gamemode == GAMEMODE.SURVIVE_MODE)
- {
- this.ShowHUDInfoCenter("Survive All Waves!\n Press " + GameObject.Find("InputManagerController").GetComponent<FengCustomInputs>().inputString[InputCode.restart] + " to Restart.\n\n\n");
- }
- else
- {
- this.ShowHUDInfoCenter("You noobs finally won!\n Press " + GameObject.Find("InputManagerController").GetComponent<FengCustomInputs>().inputString[InputCode.restart] + " to Restart.\n\n\n");
- }
- }
- else
- {
- if (IN_GAME_MAIN_CAMERA.gamemode == GAMEMODE.RACING)
- {
- this.ShowHUDInfoCenter(string.Concat(new object[] { this.localRacingResult, "\n\nGame Restart in ", (int) this.gameEndCD, "s" }));
- }
- else if (IN_GAME_MAIN_CAMERA.gamemode == GAMEMODE.SURVIVE_MODE)
- {
- this.ShowHUDInfoCenter("Survive All Waves!\nGame Restart in " + ((int) this.gameEndCD) + "s\n\n");
- }
- else if (IN_GAME_MAIN_CAMERA.gamemode == GAMEMODE.PVP_AHSS)
- {
- this.ShowHUDInfoCenter(string.Concat(new object[] { "Team DeathGod Win!\nGame Restart in ", (int) this.gameEndCD, "s\n\n" }));
- }
- else
- {
- this.ShowHUDInfoCenter("Humanity Win!\nGame Restart in " + ((int) this.gameEndCD) + "s\n\n");
- }
- if (this.gameEndCD <= 0f)
- {
- this.gameEndCD = 0f;
- if (PhotonNetwork.isMasterClient)
- {
- this.restartGame(false);
- }
- this.ShowHUDInfoCenter(string.Empty);
- }
- else
- {
- this.gameEndCD -= Time.deltaTime;
- }
- }
- }
- this.timeElapse += Time.deltaTime;
- this.roundTime += Time.deltaTime;
- if (IN_GAME_MAIN_CAMERA.gametype == GAMETYPE.SINGLE)
- {
- if (IN_GAME_MAIN_CAMERA.gamemode == GAMEMODE.RACING)
- {
- if (!this.isWinning)
- {
- this.timeTotalServer += Time.deltaTime;
- }
- }
- else if (!this.isLosing && !this.isWinning)
- {
- this.timeTotalServer += Time.deltaTime;
- }
- }
- else
- {
- this.timeTotalServer += Time.deltaTime;
- }
- if (IN_GAME_MAIN_CAMERA.gamemode == GAMEMODE.RACING)
- {
- if (IN_GAME_MAIN_CAMERA.gametype == GAMETYPE.SINGLE)
- {
- if (!this.isWinning)
- {
- this.ShowHUDInfoTopCenter("Time : " + ((((int) (this.timeTotalServer * 10f)) * 0.1f) - 5f));
- }
- if (this.timeTotalServer < 5f)
- {
- this.ShowHUDInfoCenter("RACE START IN " + ((int) (5f - this.timeTotalServer)));
- }
- else if (!this.startRacing)
- {
- this.ShowHUDInfoCenter(string.Empty);
- this.startRacing = true;
- this.endRacing = false;
- GameObject.Find("door").SetActive(false);
- }
- }
- else
- {
- this.ShowHUDInfoTopCenter("Time : " + ((this.roundTime >= 20f) ? (((((int) (this.roundTime * 10f)) * 0.1f) - 20f)).ToString() : "WAITING"));
- if (this.roundTime < 20f)
- {
- this.ShowHUDInfoCenter("RACE START IN " + ((int) (20f - this.roundTime)) + (!(this.localRacingResult == string.Empty) ? ("\nLast Round\n" + this.localRacingResult) : "\n\n"));
- }
- else if (!this.startRacing)
- {
- this.ShowHUDInfoCenter(string.Empty);
- this.startRacing = true;
- this.endRacing = false;
- GameObject.Find("door").SetActive(false);
- }
- }
- if (GameObject.Find("MainCamera").GetComponent<IN_GAME_MAIN_CAMERA>().gameOver && !this.needChooseSide)
- {
- this.myRespawnTime += Time.deltaTime;
- if (this.myRespawnTime > 1.5f)
- {
- this.myRespawnTime = 0f;
- GameObject.Find("MainCamera").GetComponent<IN_GAME_MAIN_CAMERA>().gameOver = false;
- if (this.checkpoint != null)
- {
- this.SpawnPlayerAt(this.myLastHero, this.checkpoint);
- }
- else
- {
- this.SpawnPlayer(this.myLastHero, this.myLastRespawnTag);
- }
- GameObject.Find("MainCamera").GetComponent<IN_GAME_MAIN_CAMERA>().gameOver = false;
- this.ShowHUDInfoCenter(string.Empty);
- }
- }
- }
- if (this.timeElapse > 1f)
- {
- this.timeElapse--;
- string str2 = string.Empty;
- if (IN_GAME_MAIN_CAMERA.gamemode == GAMEMODE.ENDLESS_TITAN)
- {
- str2 = str2 + "Time : " + ((this.time - ((int) this.timeTotalServer))).ToString();
- }
- else if (IN_GAME_MAIN_CAMERA.gamemode == GAMEMODE.KILL_TITAN)
- {
- str2 = "Titan Left: ";
- str2 = str2 + GameObject.FindGameObjectsWithTag("titan").Length.ToString() + " Time : ";
- if (IN_GAME_MAIN_CAMERA.gametype == GAMETYPE.SINGLE)
- {
- str2 = str2 + ((int) this.timeTotalServer).ToString();
- }
- else
- {
- str2 = str2 + ((this.time - ((int) this.timeTotalServer))).ToString();
- }
- }
- else if (IN_GAME_MAIN_CAMERA.gamemode == GAMEMODE.SURVIVE_MODE)
- {
- str2 = "Titan Left: ";
- str2 = (str2 + GameObject.FindGameObjectsWithTag("titan").Length.ToString()) + " Wave : " + this.wave;
- }
- else if (IN_GAME_MAIN_CAMERA.gamemode == GAMEMODE.BOSS_FIGHT_CT)
- {
- str2 = "Time : ";
- str2 = str2 + ((this.time - ((int) this.timeTotalServer))).ToString() + "\nDefeat the Bertholt.\nStop runny titans from running to the north gate";
- }
- else if (IN_GAME_MAIN_CAMERA.gamemode == GAMEMODE.PVP_CAPTURE)
- {
- string str3 = "| ";
- for (int i = 0; i < PVPcheckPoint.chkPts.Count; i++)
- {
- str3 = str3 + (PVPcheckPoint.chkPts[i] as PVPcheckPoint).getStateString() + " ";
- }
- str3 = str3 + "|";
- str2 = string.Concat(new object[] { this.PVPtitanScoreMax - this.PVPtitanScore, " ", str3, " ", this.PVPhumanScoreMax - this.PVPhumanScore, "\n" }) + "Time : " + ((this.time - ((int) this.timeTotalServer))).ToString();
- }
- this.ShowHUDInfoTopCenter(str2);
- str2 = string.Empty;
- if (IN_GAME_MAIN_CAMERA.gametype == GAMETYPE.SINGLE)
- {
- if (IN_GAME_MAIN_CAMERA.gamemode == GAMEMODE.SURVIVE_MODE)
- {
- str2 = "Time : ";
- str2 = str2 + ((int) this.timeTotalServer).ToString();
- }
- }
- else if (IN_GAME_MAIN_CAMERA.gamemode == GAMEMODE.ENDLESS_TITAN)
- {
- object[] objArray10 = new object[] { "Humanity ", this.humanScore, " : Titan ", this.titanScore, " " };
- str2 = string.Concat(objArray10);
- }
- else if (((IN_GAME_MAIN_CAMERA.gamemode == GAMEMODE.KILL_TITAN) || (IN_GAME_MAIN_CAMERA.gamemode == GAMEMODE.BOSS_FIGHT_CT)) || (IN_GAME_MAIN_CAMERA.gamemode == GAMEMODE.PVP_CAPTURE))
- {
- object[] objArray11 = new object[] { "Humanity ", this.humanScore, " : Titan ", this.titanScore, " " };
- str2 = string.Concat(objArray11);
- }
- else if (IN_GAME_MAIN_CAMERA.gamemode != GAMEMODE.CAGE_FIGHT)
- {
- if (IN_GAME_MAIN_CAMERA.gamemode == GAMEMODE.SURVIVE_MODE)
- {
- str2 = "Time : ";
- str2 = str2 + ((this.time - ((int) this.timeTotalServer))).ToString();
- }
- else if (IN_GAME_MAIN_CAMERA.gamemode == GAMEMODE.PVP_AHSS)
- {
- for (int j = 0; j < this.teamScores.Length; j++)
- {
- str11 = str2;
- object[] objArray12 = new object[] { str11, (j == 0) ? string.Empty : " : ", "Team", j + 1, " ", this.teamScores[j], string.Empty };
- str2 = string.Concat(objArray12);
- }
- str2 = str2 + "\nTime : " + ((this.time - ((int) this.timeTotalServer))).ToString();
- }
- }
- this.ShowHUDInfoTopRight(str2);
- string str4 = (IN_GAME_MAIN_CAMERA.difficulty >= 0) ? ((IN_GAME_MAIN_CAMERA.difficulty != 0) ? ((IN_GAME_MAIN_CAMERA.difficulty != 1) ? "Abnormal" : "Hard") : "Normal") : "Trainning";
- if (IN_GAME_MAIN_CAMERA.gamemode == GAMEMODE.CAGE_FIGHT)
- {
- this.ShowHUDInfoTopRightMAPNAME(string.Concat(new object[] { (int) this.roundTime, "s\n", level, " : ", str4 }));
- }
- else
- {
- this.ShowHUDInfoTopRightMAPNAME("\n" + level + " : " + str4);
- }
- this.ShowHUDInfoTopRightMAPNAME("\nCamera(" + GameObject.Find("InputManagerController").GetComponent<FengCustomInputs>().inputString[InputCode.camera] + "):" + IN_GAME_MAIN_CAMERA.cameraMode.ToString());
- if ((IN_GAME_MAIN_CAMERA.gametype == GAMETYPE.MULTIPLAYER) && this.needChooseSide)
- {
- this.ShowHUDInfoTopCenterADD("\n\nPRESS 1 TO KILL A TITAN");
- }
- }
- if (((IN_GAME_MAIN_CAMERA.gametype == GAMETYPE.MULTIPLAYER) && (this.killInfoGO.Count > 0)) && (this.killInfoGO[0] == null))
- {
- this.killInfoGO.RemoveAt(0);
- }
- if (((IN_GAME_MAIN_CAMERA.gametype != GAMETYPE.SINGLE) && PhotonNetwork.isMasterClient) && (this.timeTotalServer > this.time))
- {
- string str10;
- IN_GAME_MAIN_CAMERA.gametype = GAMETYPE.STOP;
- this.gameStart = false;
- Screen.lockCursor = false;
- Screen.showCursor = true;
- string str5 = string.Empty;
- string str6 = string.Empty;
- string str7 = string.Empty;
- string str8 = string.Empty;
- string str9 = string.Empty;
- foreach (PhotonPlayer player2 in PhotonNetwork.playerList)
- {
- if (player2 != null)
- {
- str5 = str5 + player2.customProperties[PhotonPlayerProperty.name] + "\n";
- str6 = str6 + player2.customProperties[PhotonPlayerProperty.kills] + "\n";
- str7 = str7 + player2.customProperties[PhotonPlayerProperty.deaths] + "\n";
- str8 = str8 + player2.customProperties[PhotonPlayerProperty.max_dmg] + "\n";
- str9 = str9 + player2.customProperties[PhotonPlayerProperty.total_dmg] + "\n";
- }
- }
- if (IN_GAME_MAIN_CAMERA.gamemode == GAMEMODE.PVP_AHSS)
- {
- str10 = string.Empty;
- for (int k = 0; k < this.teamScores.Length; k++)
- {
- str10 = str10 + ((k == 0) ? string.Concat(new object[] { "Team", k + 1, " ", this.teamScores[k], " " }) : " : ");
- }
- }
- else if (IN_GAME_MAIN_CAMERA.gamemode == GAMEMODE.SURVIVE_MODE)
- {
- str10 = "Highest Wave : " + this.highestwave;
- }
- else
- {
- object[] objArray15 = new object[] { "Humanity ", this.humanScore, " : Titan ", this.titanScore };
- str10 = string.Concat(objArray15);
- }
- object[] parameters = new object[] { str5, str6, str7, str8, str9, str10 };
- base.photonView.RPC("showResult", PhotonTargets.AllBuffered, parameters);
- }
- }
- }
- public void gameLose()
- {
- if (!this.isWinning && !this.isLosing)
- {
- this.isLosing = true;
- this.titanScore++;
- this.gameEndCD = this.gameEndTotalCDtime;
- if (IN_GAME_MAIN_CAMERA.gametype == GAMETYPE.MULTIPLAYER)
- {
- object[] parameters = new object[] { this.titanScore };
- base.photonView.RPC("netGameLose", PhotonTargets.Others, parameters);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement