コード例 #1
0
 protected override void HitSFX()
 {
     // TODO: don't instantiate this, use audio mixer
     audioOneShotSource = Script_Game.Game.CreateAudioOneShotSource(transform.position);
     audioOneShotSource.Setup(crunchSFX);
     audioOneShotSource.PlayOneShot();
 }
コード例 #2
0
 private void Swallowed()
 {
     animator.SetTrigger(SwallowedTrigger);
     audioOneShotSource = Script_Game.Game.CreateAudioOneShotSource(transform.position);
     audioOneShotSource.Setup(deathCrySFX);
     audioOneShotSource.PlayOneShot();
 }
コード例 #3
0
    public override void FadeOut(Action cb)
    {
        audioOneShotSource = game.CreateAudioOneShotSource(transform.position);
        audioOneShotSource.Setup(fadeOutSFX);
        audioOneShotSource.PlayOneShot();

        fadeOutCo = StartCoroutine(
            rendererChild.GetComponent <Script_SpriteFadeOut>().FadeOutCo(cb)
            );
    }