Example #1
0
 private void _JoinMap(Member member, IMap map)
 {
     var handler = _QueryHandler(member);
     var stage = new MemberMapHandler(member, map);
     stage.NextMapEvent += _QueryMap;
     handler.ChangeState(stage);
 }
Example #2
0
        internal bool Join(Member member)
        {
            if (_JoinCondidion.Check(this))
            {
                _QueryMap(member, _Zone.FirstMap.Name);
                return true;
            }

            return false;
        }
Example #3
0
        void Utility.IStage.Enter()
        {
            _Binder.Bind<IBelongings>(_Belongings);
            _Member = new Member(_Player);
            _Member.BeginTraversable+= _OnBeginTraver;
            _Member.EndTraversable+= _OnEndTraver;
            _Scene.ShutdownEvent += ExitWorldEvent;

            _RegisterQuit(_Player);

            if (_Scene.Join(_Member) == false)
            {
                LogoutEvent();
            }

            _Updater.Add(_Belongings);

            _InitialSession();
        }
Example #4
0
 public MemberHandler(Member member)
 {
     this._Member = member;
     _Machine = new Utility.StageMachine();
 }
Example #5
0
 public MemberQueryHandler(Member member, IZone zone, string map)
 {
     _Member = member;
     _Zone = zone;
     _Map = map;
 }
Example #6
0
 public MemberMapHandler(Member member, IMap map)
 {
     this._Member = member;
     this._Map = map;
 }
Example #7
0
 private void _QueryMap(Member member, string map)
 {
     var handler = _QueryHandler(member);
     var stage = new MemberQueryHandler(member, _Zone, map);
     stage.ResultEvent += _JoinMap;
     handler.ChangeState(stage);
 }
Example #8
0
        private MemberHandler _QueryHandler(Member member)
        {
            var handler = (from h in _Handlers.Objects where h.Id == member.Id select h).FirstOrDefault();
            if (handler != null)
                return handler;

            handler = new MemberHandler(member);
            _Handlers.Add(handler);
            return handler;
        }
Example #9
0
 internal void Left(Member player)
 {
     var handler = _QueryHandler(player);
     _Handlers.Remove(handler);
 }
Example #10
0
 void IScene.Exit(Member player)
 {
     _Team.Left(player);
 }
Example #11
0
 bool IScene.Join(Member player)
 {
     return _Team.Join(player);
 }