示例#1
0
        public void Shoot()
        {
            throwAudioPlayer.PlayRandomClip();

            Vector3 toTarget = m_GrenadeTarget - transform.position;

            //the grenade is launched a couple of meters in "front" of the player, because it bounce and roll, to make it a bit ahrder for the player
            //to avoid it
            Vector3 target = transform.position + (toTarget - toTarget * 0.3f);

            grenadeLauncher.Attack(target);
        }
示例#2
0
        public void Shoot()                                          //远程攻击
        {
            throwAudioPlayer.PlayRandomClip();                       //投掷音效开启

            Vector3 toTarget = m_GrenadeTarget - transform.position; //记录与玩家的相差距离

            //手雷在玩家的“前方”几米处发射,因为它会反弹和滚动,玩家将无法得知它的具体落点 the grenade is launched a couple of meters in "front" of the player, because it bounce and roll, to make it a bit ahrder for the player
            //to avoid it
            Vector3 target = transform.position + (toTarget - toTarget * 0.3f); //投掷目标点

            grenadeLauncher.Attack(target);                                     //远程攻击目标点
        }
 public void Shoot()
 {
     rangeWeapon.Attack(m_RememberedTargetPosition);
 }