示例#1
0
    // Start is called before the first frame update
    void Start()
    {
        EventReceiver receiver = new EventReceiver();

        EventMonitor logger = new EventLogger(receiver);

        receiver.Attach(logger);

        receiver.LogMessage("SilverPoop", " 69.742.546:25565", "Scania");


        Mediator mediator = new Mediator();



        Presenter presenter = new Presenter(mediator);

        presenter.Name     = "pharaoh";
        mediator.Presenter = presenter;

        Attendee Moshe = new Attendee(mediator);

        Moshe.Name = "Moshe";
        Attendee Aaron = new Attendee(mediator);

        Aaron.Name         = "Aaron";
        mediator.Attendees = new List <Attendee> {
            Moshe, Aaron
        };


        StartCoroutine(Timer(Moshe, presenter));
    }