Exemplo n.º 1
0
    // Start is called before the first frame update
    void Start()
    {
        sr  = GetComponent <SpriteRenderer>();
        col = GetComponent <BoxCollider2D>();

        reappearTimer  = new WaitForSeconds(reappearTime);
        disappearTimer = new WaitForSeconds(disappearTime);
        animTimer      = new WaitForSeconds(animTime);
        delayTimer     = new WaitForSeconds(delayTime);

        onDisappear.AddListener(Disappear);
        onReappear.AddListener(Reappear);

        if (disappearType == DisappearType.afterInterval)
        {
            StartCoroutine(IntervalCoroutine());
        }
    }
Exemplo n.º 2
0
 private void OnEnable()
 {
     _event.AddListener(this);
 }
Exemplo n.º 3
0
 // Start is called before the first frame update
 void Start()
 {
     OnActive.AddListener(OnDestory);
     OnIdle?.Invoke();
 }