Esempio n. 1
0
    // Start is called before the first frame update
    void Start()
    {
        _prefabManager    = FindObjectOfType <PrefabManager>();
        _projectilePrefab = _prefabManager.GetProjectilePrefab(Params);
        _soundManager     = FindObjectOfType <SoundManager>();
        AudioClip shotSoundClip = ResourceUtil.LoadSound(Params.ShootSound);

        _soundManager.AddAudioSource(gameObject.GetInstanceID(), shotSoundClip);
    }