Пример #1
0
    public void Setup()
    {
        if (m_informations.Type == PlayerInformations.PlayerType.SCIENTIST)
        {
            m_player        = GameManager.Instance.Human;
            gameObject.name = "HumanController";
        }
        else if (m_informations.Type == PlayerInformations.PlayerType.ROBOT)
        {
            m_player        = GameManager.Instance.Robot;
            gameObject.name = "RobotController";
        }

        m_interactor    = m_player.GetComponent <Interactor>();
        m_carry         = m_player.GetComponent <CarryController>();
        m_cameraControl = m_player.GetComponent <CameraControl>();

        if (!isLocalPlayer)
        {
            m_player.GetComponentInChildren <Camera>().enabled        = false;
            m_player.GetComponentInChildren <AudioListener>().enabled = false;
        }
        else
        {
            m_player.GetComponentInChildren <Camera>().enabled        = true;
            m_player.GetComponentInChildren <AudioListener>().enabled = true;
        }
    }