Beispiel #1
0
    void Collected()
    {
        isCollected = true;

        if (coll)
        {
            coll.enabled = false;
        }
        if (activator)
        {
            activator.Release(); activator.enabled = false;
        }

        if (!string.IsNullOrEmpty(soundCollect))
        {
            M8.SoundPlaylist.instance.Play(soundCollect, false);
        }

        signalCollect.Invoke(amount);

        //update display
        if (animator && !string.IsNullOrEmpty(takeCollect))
        {
            StartCoroutine(DoCollectedAnimate());
        }
        else
        {
            gameObject.SetActive(false);
        }
    }
Beispiel #2
0
    public void Next()
    {
        if (mIsCorrect)
        {
            if (signalInvokeBonusScore)
            {
                signalInvokeBonusScore.Invoke(GameData.instance.bonusRoundScore);
            }
        }

        Close();
    }
Beispiel #3
0
 public void Invoke()
 {
     signal.Invoke(invokeValue);
 }