Пример #1
0
    private void Update()
    {
        if (m_photonView.IsMine)
        {
            if (Input.GetKeyDown(KeyCode.Space) && StrengthBarController.m_strength >= 0.4f)
            {
                m_playerMovement.Jump();
                StrengthBarController.LowStrength(0.5f);
            }

            if (Input.GetKeyDown(KeyCode.F) && StrengthBarController.m_strength >= 0.4f)
            {
                //GameObject tempTarget = m_targetSyst.Target;
                //m_bubble.ActivateBubble(tempTarget.GetComponent<PhotonView>().ViewID);
                m_bubble.ActivateBubble(m_photonView.ViewID);
                StrengthBarController.LowStrength(0.5f);
            }

            if (Input.GetKeyDown(KeyCode.Q))
            {
                //m_targetSyst.PrevPlayer();
            }
            if (Input.GetKeyDown(KeyCode.E))
            {
                //m_targetSyst.NextPlayer();
            }
            if (Input.GetKey(KeyCode.LeftShift))
            {
                m_playerMovement.Speed = 15f;
                StrengthBarController.LowStrength(0.005f);
            }
            else
            {
                m_playerMovement.Speed = 10f;
            }
        }
    }
Пример #2
0
 private void Start()
 {
     m_strength = 1;
     m_strengthBarController = this;
     m_strengthBar           = GameObject.FindGameObjectWithTag("StrengthBar");
 }