예제 #1
0
        public override void DoAction(PEActionParam para)
        {
            if (null == mRopeGun)
            {
                return;
            }
            if (!viewCmpt.hasView)
            {
                return;
            }
            m_LastHookPos = mRopeGun.hook.position;
            motionMgr.SetMaskState(PEActionMask.RopeGunShoot, true);
            mState             = HookGunState.Shooting;
            m_ShootDir         = (ikCmpt.aimTargetPos - mRopeGun.gunMuzzle.position).normalized;
            m_CurrentMoveIndex = 0;
            PeCamera.SetFloat("Sensitivity Multiplier", 0);
            AudioManager.instance.Create(mRopeGun.gunMuzzle.position, mRopeGun.fireSound);
//			Collider[] hitInfos = Physics.OverlapSphere(mRopeGun.gunMuzzle.position, 0.2f, mRopeGun.effectLayer.value, QueryTriggerInteraction.Ignore);
//			for(int i = 0; i < hitInfos.Length; ++i)
//			{
//				if(!hitInfos[i].transform.IsChildOf(entity.transform))
//				{
//					mState = HookGunState.Null;
//					return;
//				}
//			}
        }
예제 #2
0
 void OnEndAction()
 {
     motionMgr.SetMaskState(PEActionMask.RopeGunShoot, false);
     if (null != m_Audio)
     {
         GameObject.Destroy(m_Audio.gameObject);
     }
     PeCamera.SetFloat("Sensitivity Multiplier", 1f);
     if (Vector3.SqrMagnitude(trans.position - m_LastHookPos) > 40000f)
     {
         trans.position = m_LastHookPos + 2f * Vector3.up;
     }
     motionMgr.StartCoroutine(FixPhyError());
     ResetPhy();
     ResetLine();
 }