Ejemplo n.º 1
0
        void DoHook()
        {
            anim.SetTrigger("hook");
            state = E_HeroHookState.Hooking;

            Ray     ray         = Camera.main.ScreenPointToRay(screenCenterPoint);
            Vector3 hookDestPos = ray.origin + ray.direction * maxShotLength;

            hookDestPos = ShotCtrl.GetFirstHitAsMapOrEnemy(this, ray, maxShotLength).point;

            hookOriginPos.transform.LookAt(hookDestPos);
            photonView.RPC("ActivateHook", RpcTarget.All, hookOriginPos.transform.rotation);
        }
Ejemplo n.º 2
0
        void HHUlt()
        {
            anim.SetTrigger("ult");
            FPSCamPerHero.FPSCamAct(E_ControlParam.Ultimate);

            Ray        ray         = Camera.main.ScreenPointToRay(screenCenterPoint);
            Vector3    ultStartPos = ray.origin + ray.direction * ultStartPosFactor;
            Quaternion ultStartRot = Quaternion.LookRotation(ray.direction);

            photonView.RPC("HHHUltActivate", RpcTarget.All, ultStartPos, ultStartRot);
            state        = E_HeroHookState.Hooking; //정지 용도
            nowUltAmount = 0f;
            StartCoroutine(ultActionDone());
        }
Ejemplo n.º 3
0
        void DoHook()
        {
            anim.SetTrigger("hook");
            state = E_HeroHookState.Hooking;
            //자가 정지 시키기.
            Ray        ray         = Camera.main.ScreenPointToRay(screenCenterPoint);
            Vector3    hookDestPos = ray.origin + ray.direction * maxShotLength;
            RaycastHit hit;

            if (Physics.Raycast(ray, out hit, maxShotLength, TeamInfo.GetInstance().MapAndEnemyMaskedLayer))
            {
                hookDestPos = hit.point;
            }

            hookOriginPos.transform.LookAt(hookDestPos);
            photonView.RPC("ActivateHook", RpcTarget.All, hookOriginPos.transform.rotation);
        }
Ejemplo n.º 4
0
        IEnumerator ultActionDone()
        {
            yield return(new WaitForSeconds(3f));

            state = E_HeroHookState.Idle;
        }
Ejemplo n.º 5
0
 [PunRPC]    //후크 쪽에서 알아서 제자리로 돌아오면 이 알피씨를 쏨.
 public void HookIsDone()
 {
     anim.SetTrigger("hookIsDone");
     hookProjectile.DeActivate();
     state = E_HeroHookState.Idle;
 }