Exemple #1
0
    void Awake()
    {
        GameObject gameObject = new GameObject("SFX");
        gameObject.transform.parent = transform;
        gameObject.transform.localPosition = Vector3.zero;

        explosionEmitter = gameObject.AddComponent<FMOD_CustonEmitter>();
        explosionEmitter.Init(explosion);

        hitEmitter = gameObject.AddComponent<FMOD_CustonEmitter>();
        hitEmitter.Init(hit);

        _enemy = GetComponent<StingerExploder>();
    }
    void Start()
    {
        self = this;

        Vector3 emitterPosition = transform.TransformPoint(Vector3.zero);
        emitterPosition.z = 0;

        GameObject gameObject = new GameObject("SFX");
        gameObject.transform.position = emitterPosition;
        gameObject.transform.parent = transform;

        soundTrackEmitter = gameObject.AddComponent<FMOD_CustonEmitter>();
        soundTrackEmitter.Init(soundTrack);
        soundTrackEmitter.Start();
    }
Exemple #3
0
    void Awake()
    {
        GameObject gameObject = new GameObject("SFX");
        gameObject.transform.parent = transform;
        gameObject.transform.localPosition = Vector3.zero;

        laserEmitter = gameObject.AddComponent<FMOD_CustonEmitter>();
        laserEmitter.Init(laser);

        vooEmitter = gameObject.AddComponent<FMOD_CustonEmitter>();
        vooEmitter.Init(voo);

        explosionEmitter = gameObject.AddComponent<FMOD_CustonEmitter>();
        explosionEmitter.Init(explosion);

        _enemy = GetComponent<StingerShooter>();
    }
Exemple #4
0
    void Awake()
    {
        GameObject gameObject = new GameObject("SFX");
        gameObject.transform.parent = transform;
        gameObject.transform.localPosition = Vector3.zero;

        shootEmitter = gameObject.AddComponent<FMOD_CustonEmitter>();
        shootEmitter.Init(shoot);

        footstepEmitter = gameObject.AddComponent<FMOD_CustonEmitter>();
        footstepEmitter.Init(footstep);

        hurtEmitter = gameObject.AddComponent<FMOD_CustonEmitter>();
        hurtEmitter.Init(hurt);

        _player = GetComponent<Player>();
    }