public void Shot(BulletMovement.ShootDirectionType shootDir, BulletMovement.WalkDirection walkDir) { shooting = true; BulletMovement bullet = Instantiate(bulletPrefab, bulletSpawnPos, Quaternion.identity); bullet.SetDirectionType(shootDir); bullet.SetWalkDirectionType(walkDir); }
public void Shot(BulletMovement.ShootDirectionType shootDir, BulletMovement.WalkDirection walkDir) { AudioSource.PlayClipAtPoint(_shootSound.clip, new Vector3(5, 1, 2)); shooting = true; BulletMovement bullet = Instantiate(bulletPrefab, _bulletSpawnPos, Quaternion.identity); bullet.SetDirectionType(shootDir); bullet.SetWalkDirectionType(walkDir); }
public void Shot(BulletMovement.ShootDirectionType dir) { BulletMovement bullet = Instantiate(bulletPrefab, new Vector2(player.transform.position.x, player.transform.position.y), Quaternion.identity); bullet.SetDirectionType(dir); }