private void _ToOnline(StageMachine machine, IPeer peer) { var onlineStage = new OnlineStage(peer, _Core, _Serializer); onlineStage.DoneFromServerEvent += () => { _ToTermination(); if (_BreakEvent != null) { _BreakEvent(); } }; machine.Push(onlineStage); }
private void _ToOnline() { var stage = new OnlineStage(_Agent, _OnlineProvider,_Game); stage.DisconnectEvent += () => { _ToConnect(); }; _Machine.Push(stage); }