protected virtual IEnumerator CharacterInit()
        {
            yield return(new WaitForEndOfFrame());

            if (tpCamera == null)
            {
                tpCamera = FindObjectOfType <vThirdPersonCamera>();
                if (tpCamera && tpCamera.target != transform)
                {
                    tpCamera.SetMainTarget(this.transform);
                }
            }
            if (hud == null && vHUDController.instance != null)
            {
                hud = vHUDController.instance;
                hud.Init(cc);
            }
        }
Exemple #2
0
        protected virtual void CharacterInit()
        {
            if (cc != null)
            {
                cc.Init();
            }

            tpCamera = FindObjectOfType <vThirdPersonCamera>();
            if (tpCamera)
            {
                tpCamera.SetMainTarget(this.transform);
            }

            cursorPoint = transform.position;

            hud = vHUDController.instance;
            if (hud != null)
            {
                hud.Init(cc);
            }
        }