Esempio n. 1
0
    private void CreateFireBall()
    {
        GameObject _fireBall  = Instantiate(fireBall, transform.position, Quaternion.identity);
        FireBall   _ball      = _fireBall.GetComponent <FireBall>();
        Vector3    _randomVec = new Vector3(Random.Range(-1f, 1f), Random.Range(-1f, 1f), Random.Range(-1f, 1f)).normalized;

        _ball.SetVelocity(_randomVec, 0.5f);
        _ball.SetRemoveTime(4);
    }
Esempio n. 2
0
 public void UseSkill3()
 {
     playerShooter.gun.gunAudioPlayer.PlayOneShot(playerShooter.gun.shotClip);
     for (int i = 0; i < skill3BallNum; i++)
     {
         GameObject _ball     = Instantiate(fireBall, playerShooter.gun.muzzleFlash.transform.position + transform.forward * 2, Quaternion.identity);
         FireBall   _fireBall = _ball.GetComponent <FireBall>();
         _fireBall.SetVelocity(Camera.main.transform.forward, 0.3f);
         _fireBall.Set(skill3Damage);
         _fireBall.SetRemoveTime(2);
     }
 }