100coding
4/4/2017 - 6:13 AM

E7A10117-1122-4917-AE99-B73418FB7A66

E7A10117-1122-4917-AE99-B73418FB7A66

using UniRx;
using UnityEngine;

public class Sample : MonoBehaviour
{
    private readonly Subject<string> subject = new Subject<string>();

    private void Start()
    {
        this.subject.Subscribe(x => Debug.Log(string.Format("플레이어가 {0}에 충돌했습니다", x)));

        this.subject.OnNext("Enemy");
        this.subject.OnNext("Wall");
        this.subject.OnNext("Wall");
        this.subject.OnNext("Enemy");
        this.subject.OnNext("Enemy");
    }
}