public void OnOptionsClick() { OptionsMenu.SetActive(true); MainMenu.SetActive(false); CS_SoundTest.PlaySoundOnObject(gameObject, sButtonClickSound); }
public void RpcPowerupFailed() { if (m_bStartPowerupSequence && bComplete) { eRandomPowerup = (POWERTYPES)UnityEngine.Random.Range(0, 4); GivePlayerPowerup(eRandomPowerup); fPowerCount = fPowerTime; bHasPowerup = true; Debug.Log("WON IT BOI"); CS_SoundTest.PlaySoundOnObject(gameObject, "SFX/Powerups/PowerWin"); } else if (m_bStartPowerupSequence && !bComplete) { Debug.Log("LOST IT BOI"); CS_SoundTest.PlaySoundOnObject(gameObject, "SFX/Powerups/PowerLose"); } for (int i = 0; i < iRandLength - 1; ++i) { PlayerArrows[i].enabled = false; } bComplete = false; bIsTrig = false; m_bStartPowerupSequence = false; }
public void OnPlayClick() { MainMenu.SetActive(false); LobbyManager.SetActive(true); CS_SoundTest.PlaySoundOnObject(gameObject, sButtonClickSound); }
//=================== public override void OnStartHost() { base.OnStartHost(); ChangeTo(lobbyPanel); backDelegate = StopHostClbk; SetServerInfo("Hosting", networkAddress); CS_SoundTest.PlaySoundOnObject(gameObject, sButtonClickSound); }
public void OnBackSerButton() { MainMenu.SetActive(true); //MainMenu.GetComponent<CS_MainMenu>().LobbyManager = GameObject.FindWithTag("Lobby"); LobbyManager.SetActive(false); CS_SoundTest.PlaySoundOnObject(gameObject, sButtonClickSound); }
private void RpcDie(string a_instigatorID) { Debug.Log("RPCDIE"); CS_GameManager.GetPlayer(a_instigatorID).iKills++; CS_GameManager.CheckForEnd(); CS_SoundTest.PlaySoundOnObject(gameObject, "SFX/Player/PlayerDeath"); transform.position = SpawnManager.GetComponent <CS_Spawnpoints>().GetValidSpawnPoint(); }
public void OnBackClick() { CS_SessionManager.player.UserName = PlayerNameInput.text; CS_SessionManager.player.MasterVolume = CS_SoundTest.fMasterVolume; CS_SessionManager.player.MusicVolume = CS_SoundTest.fMusicVolume; CS_SessionManager.player.SFXVolume = CS_SoundTest.fSFXVolume; OptionsMenu.SetActive(false); MainMenu.SetActive(true); CS_SoundTest.PlaySoundOnObject(gameObject, sButtonClickSound); }
public void RpcStartTrain() { //Debug.Log("Function called from server"); m_bTrainActive = true; m_TrainPrefab.transform.position = m_StartPosition.transform.position; CS_SoundTest.PlaySoundOnObject(m_TrainPrefab, "Map/Train"); Renderer[] Models = m_TrainPrefab.GetComponentsInChildren <Renderer>(); for (int i = 0; i < Models.Length; i++) { Models[i].enabled = true; // Unhides the train } }
public void RpcStartPowerupSequence() { if (!m_bStartPowerupSequence) { PlayerArrows = GetComponent <CS_FirstPersonController>().m_arrowImages; bIsTrig = true; m_bStartPowerupSequence = true; m_bFinished = false; bOnce = true; bComplete = false; CS_SoundTest.PlaySoundOnObject(gameObject, "SFX/Powerups/PowerDance"); //gameObject.GetComponent<MeshRenderer>().enabled = false; } }
private void Shoot() { Debug.Log("Client Shoot"); CS_SoundTest.PlaySoundOnObject(gameObject, "SFX/Player/PlayerShoot"); RaycastHit outHit; if (Physics.Raycast(transform.position, m_Camera.transform.forward, out outHit, m_iMaxShootingDistance)) { if (outHit.transform.gameObject.tag == "Player") { CmdPlayerShot(gameObject.name, outHit.transform.gameObject.name, m_iDamage); } } }
public void GoBackButton() { backDelegate(); topPanel.isInGame = false; CS_SoundTest.PlaySoundOnObject(gameObject, sButtonClickSound); }
public void OnMasterVolumeChange() { CS_SoundTest.SetMasterVolume(MasterSlider.value); CS_SoundTest.PlaySoundOnObject(gameObject, sTestSFXSound); }
public void OnSFXVolumeChange() { CS_SoundTest.SetSFXVolume(SFXSlider.value); CS_SoundTest.PlaySoundOnObject(gameObject, sTestSFXSound); }