Added card VO
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
using System;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Audio;
|
||||
|
||||
namespace AppleHills.Data.CardSystem
|
||||
{
|
||||
@@ -22,6 +23,8 @@ namespace AppleHills.Data.CardSystem
|
||||
public CardZone Zone => _definition?.Zone ?? CardZone.AppleHills;
|
||||
public int CollectionIndex => _definition?.CollectionIndex ?? 0;
|
||||
public Sprite CardImage => _definition?.CardImage;
|
||||
public AudioResource ReactionAudio => _definition?.reactionVoiceClip;
|
||||
public AudioResource NameAudio => _definition?.nameVoiceClip;
|
||||
|
||||
// Default constructor
|
||||
public CardData()
|
||||
|
||||
@@ -37,6 +37,7 @@ namespace AppleHills.Data.CardSystem
|
||||
|
||||
[Header("Audio")]
|
||||
public AudioResource reactionVoiceClip;
|
||||
public AudioResource nameVoiceClip;
|
||||
|
||||
/// <summary>
|
||||
/// Creates a new CardData instance from this definition
|
||||
|
||||
@@ -59,6 +59,9 @@ namespace UI.CardSystem.StateMachine.States
|
||||
}
|
||||
// Play pick up card audio
|
||||
AudioManager.Instance.LoadAndPlayUIAudio("card_albumdrop_deep", false);
|
||||
|
||||
// Play card name audio
|
||||
AudioManager.Instance.PlayCardVO(_context.CardData.NameAudio);
|
||||
Logging.Debug($"[CardAlbumEnlargedState] Card enlarged from album: {_context.CardData?.Name}");
|
||||
}
|
||||
|
||||
|
||||
@@ -51,6 +51,9 @@ namespace UI.CardSystem.StateMachine.States
|
||||
{
|
||||
newCardBadge.SetActive(true);
|
||||
}
|
||||
|
||||
// Reaction to new card
|
||||
AudioManager.Instance.PlayCardVO(_context.CardData.ReactionAudio);
|
||||
}
|
||||
|
||||
public void OnCardClicked(CardContext context)
|
||||
|
||||
Reference in New Issue
Block a user