コード例 #1
0
    public void OnOptionsClick()
    {
        OptionsMenu.SetActive(true);
        MainMenu.SetActive(false);
        CS_SoundTest.PlaySoundOnObject(gameObject, sButtonClickSound);

    }
コード例 #2
0
    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;
    }
コード例 #3
0
    public void OnPlayClick()
    {
        MainMenu.SetActive(false);
        LobbyManager.SetActive(true);
        CS_SoundTest.PlaySoundOnObject(gameObject, sButtonClickSound);

    }
コード例 #4
0
        //===================

        public override void OnStartHost()
        {
            base.OnStartHost();
            ChangeTo(lobbyPanel);
            backDelegate = StopHostClbk;
            SetServerInfo("Hosting", networkAddress);
            CS_SoundTest.PlaySoundOnObject(gameObject, sButtonClickSound);
        }
コード例 #5
0
    public void OnBackSerButton()
    {
        MainMenu.SetActive(true);
        //MainMenu.GetComponent<CS_MainMenu>().LobbyManager = GameObject.FindWithTag("Lobby");
        LobbyManager.SetActive(false);
        CS_SoundTest.PlaySoundOnObject(gameObject, sButtonClickSound);

    }
コード例 #6
0
        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();
        }
コード例 #7
0
    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);

    }
コード例 #8
0
 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
     }
 }
コード例 #9
0
 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;
     }
 }
コード例 #10
0
        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);
                }
            }
        }
コード例 #11
0
 public void GoBackButton()
 {
     backDelegate();
     topPanel.isInGame = false;
     CS_SoundTest.PlaySoundOnObject(gameObject, sButtonClickSound);
 }
コード例 #12
0
 public void OnMasterVolumeChange()
 {
     CS_SoundTest.SetMasterVolume(MasterSlider.value);
     CS_SoundTest.PlaySoundOnObject(gameObject, sTestSFXSound);
 }
コード例 #13
0
 public void OnSFXVolumeChange()
 {
     CS_SoundTest.SetSFXVolume(SFXSlider.value);
     CS_SoundTest.PlaySoundOnObject(gameObject, sTestSFXSound);
 }