private void OnDisable()
        {
            m_OnRecievedCriticalHitEvent.RemoveAllListeners();
            m_OnRecievedDamageEvent.RemoveAllListeners();

            m_HealthManager.onIsAliveChanged -= OnIsAliveChanged;
        }
Ejemplo n.º 2
0
 public void ClearEvents()
 {
     OnBar.RemoveAllListeners();
     OnBeat.RemoveAllListeners();
     OnEnd.RemoveAllListeners();
     OnLoop.RemoveAllListeners();
     OnPlay.RemoveAllListeners();
 }
Ejemplo n.º 3
0
 private void OnDestroy()
 {
     // Unsubscribe all non-persistent listeners.
     OnHealthChanged.RemoveAllListeners();
     OnDamage.RemoveAllListeners();
     OnHeal.RemoveAllListeners();
     OnHealthDepleted.RemoveAllListeners();
 }
Ejemplo n.º 4
0
 public virtual void FermerPopup(int choix = -1)
 {
     // SI choix == -1, alors il n'y avait pas de choix
     OnPopupFermer.Invoke(choix);
     // Permet d'enlever les potentiel listener de 'OnPopupFermer'
     OnPopupFermer.RemoveAllListeners();
     gameObject.SetActive(false);
 }
Ejemplo n.º 5
0
    public void CleanUp()
    {
        gameOver = false;

        if (TurnOrder != null)
        {
            TurnOrder.Clear();
        }

        OnGameEnd.RemoveAllListeners();
        OnRoundEnd.RemoveAllListeners();
        OnRoundStart.RemoveAllListeners();
        OnSelectModeChange.RemoveAllListeners();
        OnTurnEnd.RemoveAllListeners();
        OnTurnStart.RemoveAllListeners();
    }
Ejemplo n.º 6
0
        void _Show(string title, string info, MsgType type, UnityAction <int> _Callback)
        {
            gameObject.transform.localPosition = Vector3.zero;
            gameObject.SetActive(true);
            SceneSlotGame.uiState = 1;

            Title.text = title;
            Info.text  = info;
            Type       = type;
            ButtonCallback.RemoveAllListeners();
            if (_Callback != null)
            {
                ButtonCallback.AddListener(_Callback);
            }

            if (Type == MsgType.None)
            {
                buttonOk.gameObject.SetActive(false);
                buttonCancel.gameObject.SetActive(false);
            }
            else if (Type == MsgType.Ok)
            {
                buttonOk.gameObject.SetActive(true);
                buttonCancel.gameObject.SetActive(false);

                buttonOk.transform.localPosition = new Vector3(0, -120, 0);
            }
            else if (Type == MsgType.OkCancel)
            {
                buttonOk.gameObject.SetActive(true);
                buttonCancel.gameObject.SetActive(true);

                buttonOk.transform.localPosition     = new Vector3(-100, -120, 0);
                buttonCancel.transform.localPosition = new Vector3(100, -120, 0);
            }
            else
            {
            }

            StartCoroutine(BEUtil.instance.ImageScale(Dialog, Dialog.color, 1.0f, 1.1f, 1.0f, 0.1f, 0.0f));
        }
Ejemplo n.º 7
0
    private void Awake()
    {
        if (FindObjectsOfType <GameSession>().Length > 1)
        {
            gameObject.SetActive(false);
            Destroy(gameObject);
        }
        else
        {
            DontDestroyOnLoad(gameObject);
        }

        foreach (Damagable d in FindObjectsOfType <Damagable>())
        {
            d.RegisterOnKilled((damagable) => ChangeScore(damagable.getPointValue()));
        }

        BlockLevel level = FindObjectOfType <BlockLevel>();

        level.updateScore(score);
        onScoreUpdated.RemoveAllListeners();
        onScoreUpdated.AddListener((score) => level.updateScore(score));
    }
Ejemplo n.º 8
0
    public IntEvent Method;     //don't touch this

    private void OnDisable()
    {
        Method.RemoveAllListeners();
    }
Ejemplo n.º 9
0
 public void Kill()
 {
     OnKill?.Invoke(_killPoints);
     _onHit.RemoveAllListeners();
 }