Ejemplo n.º 1
0
    public void Fire()
    {
        GameObject spawnedBullet = Instantiate(bullet, transform.position, Quaternion.identity);

        bulletView = spawnedBullet.GetComponent <BulletView>();
        bulletView.SetBulletAngle(angleSlider.GetComponent <Slider>().value);
        bulletView.FireBullet(powerSlider.GetComponent <Slider>().value);
    }
Ejemplo n.º 2
0
 public void FireBullet(Vector3 _firePosition, Quaternion _fireRotation, Vector3 _fireDirection)
 {
     currentBulletView.FireBullet(bulletInstance, _firePosition, _fireRotation, _fireDirection, GetBulletSpeed());
 }