Ejemplo n.º 1
0
    private void Awake()
    {
        if (instance == null)
        {
            instance = this;
        }

        _controller   = CController.instance;
        _othersUiList = GameObject.Find("UiScript").GetComponent <COtherPlayerUiManager>();
        _camera       = GameObject.Find("FreeLookCameraRig").GetComponent <CMouseFollower>();
    }
Ejemplo n.º 2
0
    private void Start()
    {
        // Singleton 선언해놓은 클래스들 받는 변수
        _playerUi = CUIManager.instance;
        gameEvent = CGameEvent.instance;
        _camera   = CMouseFollower.instance;

        if (player != null)
        {
            _playerControl = player.GetComponent <CCntl>();
            SetControlCharacter(player);
            previousPlayerPos = player.transform.position;
            StartCoroutine("MoveTracer");
        }

        // Callback 전달
        CWindowFacade.instance.SetControlLockCallback = SetControlLock;
    }
Ejemplo n.º 3
0
    protected void Awake()
    {
        if (instance == null)
        {
            instance = this;
        }

        // find the camera in the object hierarchy
        m_Cam   = GetComponentInChildren <Camera>().transform;
        m_Pivot = m_Cam.parent;

        // Lock or unlock the cursor.
        Cursor.lockState = m_LockCursor ? CursorLockMode.Locked : CursorLockMode.None;
        Cursor.visible   = !m_LockCursor;
        m_PivotEulers    = m_Pivot.rotation.eulerAngles;

        m_PivotTargetRot     = m_Pivot.transform.localRotation;
        m_TransformTargetRot = transform.localRotation;
    }