Beispiel #1
0
 /// <summary>
 /// Initializes this instance
 /// </summary>
 /// <param name="onTap">On tap.</param>
 public void Initialize(OnFlickDelegate onFLick, OnBiteDelegate onBite)
 {
     m_onFlick = onFLick;
     m_onBite  = onBite;
     StartMovement();
     m_stateSound = Locator.GetSoundSystem().PlaySound(SoundInfo.SFXID.FISH_SWIM);
 }
Beispiel #2
0
    /// <summary>
    /// Bites the character.
    /// </summary>
    private void BiteCharacter()
    {
        m_state = State.BITE;

        m_stateSound = Locator.GetSoundSystem().PlaySound(SoundInfo.SFXID.FISH_BITE);

        if (m_closedSprite != null)
        {
            m_spriteRenderer.sprite = m_closedSprite;
        }

        if (m_onBite != null)
        {
            m_onBite();
            m_onBite = null;
        }
    }