void onGameEnd(System.Object obj, System.EventArgs args) { pauseMenu.SetActive(false); coinIngameCointainer.SetActive(false); distanceInGameContainer.SetActive(false); NitrousUiParent.SetActive(false); pauseButton.SetActive(false); }
void upState(Vector3 a) { fbLikeBtn_Render.material.mainTexture = fbLikeBtn_Textures[0]; camChangeBtnRenders.material.mainTexture = camChangeBtnTextures[0]; pauseButtonRenderer.material.mainTexture = pauseButtonTex[0]; //brakeRenderer.material.mainTexture = brakeButtonTex [0]; isBrakesOn = false; Ray ray = UICamera.ScreenPointToRay(a); if (Physics.Raycast(ray, out hit, 500)) { string objName = hit.collider.name; switch (objName) { case "PlayAgain": DestroyGameObj_PlayGain(); GamePlayController.isGameEnded = false; gameOverMenu.SetActive(false); loadingInGame.SetActive(true); GameObject.FindGameObjectWithTag("Player").SetActive(false); Invoke("LevelLoading", 2.0f); break; case "mainmenu": Application.LoadLevel("mainMenu"); break; case "FblikeButton": string fbUrl = "https://www.facebook.com/AceGamesHyderabad"; Application.OpenURL(fbUrl); break; case "resume": Time.timeScale = 1; pauseButton.SetActive(true); pauseMenu.SetActive(false); coinIngameCointainer.SetActive(true); distanceInGameContainer.SetActive(true); NitrousUiParent.SetActive(true); break; case "pauseIngame": Time.timeScale = 0; pauseMenu.SetActive(true); coinIngameCointainer.SetActive(false); distanceInGameContainer.SetActive(false); NitrousUiParent.SetActive(false); pauseButton.SetActive(false); break; case "NitrousButton": NitrousIndicator.Static.isNitrousOn = false; playerCarControl.isDoubleSpeed = 1.0f; break; case "ChangeCamIngame": carCamera.Static.ChangeCamera(); break; } } foreach (Renderer r in buttonRenders) { r.material.mainTexture = buttonTex[0]; } }
void upState(Vector3 a) { Ray ray = UICamera.ScreenPointToRay(a); if (Physics.Raycast(ray, out hit, 500)) { string objName = hit.collider.name; switch (objName) { case "PlayAgain": GamePlayController.isGameEnded = false; Application.LoadLevel(Application.loadedLevelName); break; case "mainmenu": Time.timeScale = 1; Application.LoadLevel("NewMainMenu"); break; case "fShare": Debug.Log("fb share post"); break; case "resume": Time.timeScale = 1; pauseButton.SetActive(true); pauseMenu.SetActive(false); coinIngameCointainer.SetActive(true); distanceInGameContainer.SetActive(true); NitrousUiParent.SetActive(true); break; case "pauseIngame": SoundController.Static.boostAudioControl.volume = 0; Time.timeScale = 0; pauseMenu.SetActive(true); coinIngameCointainer.SetActive(false); distanceInGameContainer.SetActive(false); NitrousUiParent.SetActive(false); pauseButton.SetActive(false); GreedyGameAgent.Instance.startEventRefresh(); break; case "changeCameraIngame": if (carCamera.cameraMode == 3) { carCamera.cameraMode = 1; carCamera.cameraChanged = false; } else if (carCamera.cameraMode == 2) { carCamera.cameraMode = 3; carCamera.cameraChanged = false; } else if (carCamera.cameraMode == 1) { carCamera.cameraMode = 2; carCamera.cameraChanged = false; } break; //case "NitrousButton": // AccelerationIndicator.Static.isAccelerationPressed = false; // nitrousButtonRenderer.material.mainTexture = nitrousButton[0]; // break; //case "BrakeButton": // //if (CarController.actualSpeed > 2.01f) // //{ // // UIControl.isBrakesOn = true; // //} // //else // //{ // // UIControl.isBrakesOn = false; // //} // UIControl.isBrakesOn = false; // brakeRenderer.material.mainTexture = brakeButtonTex[0]; // break; } } }
void upState(Vector3 a) { pauseButtonRenderer.material.mainTexture = pauseButtonTex[0]; nitrousButtonRenderer.material.mainTexture = nitrousButton[0]; brakeRenderer.material.mainTexture = brakeButtonTex [0]; CameraChangeAngleRenderer.material.mainTexture = CameraChangeAngleText[0]; buttonRenders[2].material.mainTexture = buttonTex[0]; isBrakesOn = false; Ray ray = UICamera.ScreenPointToRay(a); if (Physics.Raycast(ray, out hit, 500)) { string objName = hit.collider.name; switch (objName) { case "PlayAgain": GamePlayController.isGameEnded = false; GameEndMenu.SetActive(false); Loading.SetActive(true); //Application.LoadLevel(Application.loadedLevelName); Invoke("LoadingBg", 0.5f); break; case "mainmenu": Application.LoadLevel("mainMenu"); break; case "fShare": Debug.Log("fb share post"); string url = "https://www.facebook.com/AceGamesHyderabad"; Application.OpenURL(url); break; case "resume": Time.timeScale = 1; pauseButton.SetActive(true); pauseMenu.SetActive(false); coinIngameCointainer.SetActive(true); distanceInGameContainer.SetActive(true); NitrousUiParent.SetActive(true); break; case "pauseIngame": Time.timeScale = 0; pauseMenu.SetActive(true); coinIngameCointainer.SetActive(false); distanceInGameContainer.SetActive(false); NitrousUiParent.SetActive(false); pauseButton.SetActive(false); break; case "NitrousButton": NitrousIndicator.Static.isNitrousOn = false; playerBIKEControl.isDoubleSpeed = 1.0f; break; case "CameraChangeAngleBtn": BIKECamera.Static.ChangeCamera(); break; } } foreach (Renderer r in buttonRenders) { r.material.mainTexture = buttonTex[0]; } }