Пример #1
0
    private void _ToMode(GameModeSelector <IUser> selector)
    {
        UserProvider <IUser> provider;

        if (Mode == MODE.REMOTING)
        {
            selector.AddFactoty("r", new RemotingUserFactory());
            provider = selector.CreateUserProvider("r");
        }
        else
        {
            this.Resource.Load();
            var feature = new Regulus.Project.ItIsNotAGame1.Game.DummyFrature();
            var center  = new Center(feature, feature);

            _Updater.Add(center);
            selector.AddFactoty("s", new StandaloneUserFactory(center));
            provider = selector.CreateUserProvider("s");
        }

        var user = provider.Spawn("user");

        provider.Select("user");

        User = user;
        User.Remoting.OnlineProvider.Supply   += _SupplyOnline;
        User.Remoting.OnlineProvider.Unsupply += _UnsupplyOnline;
        User.JumpMapProvider.Supply           += _JumpMap;
    }
Пример #2
0
        internal void OnSelect(GameModeSelector<IUser> selector)
        {
            selector.AddFactoty("Standalone", new StandaloneUserFactory(core));
            selector.AddFactoty("remoting", new RemotingUserFactory());

            // var provider = selector.CreateUserProvider("Standalone");
            var provider = selector.CreateUserProvider("remoting");

            provider.Spawn("1");
            provider.Select("1");
        }
Пример #3
0
 internal void Begin(GameModeSelector<IUser> selector)
 {
     if(ClientHandler._IsStandalone)
     {
         selector.AddFactoty("standalone", new StandaloneUserFactory(_DummyStandalone));
         _OnProvider(selector.CreateUserProvider("standalone"));
     }
     else
     {
         selector.AddFactoty("remoting", new RemotingUserFactory());
         _OnProvider(selector.CreateUserProvider("remoting"));
     }
 }
Пример #4
0
        public void Select(GameModeSelector <IUser> selector)
        {
            selector.AddFactoty("remoting", new RemotingUserFactory());
            var provider = selector.CreateUserProvider("remoting");

            var user = provider.Spawn("1");

            provider.Select("1");
        }
Пример #5
0
	    public void Select(GameModeSelector<IUser> selector)
		{
			selector.AddFactoty("remoting", new RemotingUserFactory());
			var provider = selector.CreateUserProvider("remoting");

			var user = provider.Spawn("1");
	        
            provider.Select("1");
		}
Пример #6
0
        internal void OnSelect(GameModeSelector<IUser> selector)
        {
            // selector.AddFactoty("Standalone", new VGame.Project.FishHunter.Formula.StandaloneUserFactory(core));
            selector.AddFactoty("remoting", new RemotingUserFactory());

            // var provider = selector.CreateUserProvider("Standalone");
            // var provider = selector.CreateUserProvider("remoting");

            // provider.Spawn("1");
            // provider.Select("1");
        }
Пример #7
0
        private void RemotingClient_ModeSelectorEvent(GameModeSelector<IUser> selector)
        {
            selector.AddFactoty("remoting", new RemotingUserFactory());

            var provider = selector.CreateUserProvider("remoting");

            var user = provider.Spawn("1");
            provider.Select("1");
            if(UserEvent != null)
            {
                UserEvent(user);
            }
        }
Пример #8
0
 private void Client_ModeSelectorEvent(GameModeSelector<IUser> selector)
 {
     selector.AddFactoty("fac", this._UserFactory);
     this._UserProvider = selector.CreateUserProvider("fac");
 }
Пример #9
0
    private void _ToMode(GameModeSelector<IUser> selector)
    {
        UserProvider<IUser> provider;
        if (Mode == MODE.REMOTING)
        {
            selector.AddFactoty("r", new RemotingUserFactory());
            provider = selector.CreateUserProvider("r");
        }
        else
        {
            this.Resource.Load();
            var feature = new Regulus.Project.ItIsNotAGame1.Game.DummyFrature();
            var center = new Center(feature, feature);

            _Updater.Add(center);
            selector.AddFactoty("s", new StandaloneUserFactory(center));
            provider = selector.CreateUserProvider("s");
        }

        var user = provider.Spawn("user");
        provider.Select("user");

        User = user;
        User.Remoting.OnlineProvider.Supply += _SupplyOnline;
        User.Remoting.OnlineProvider.Unsupply += _UnsupplyOnline;
        User.JumpMapProvider.Supply += _JumpMap;
    }
Пример #10
0
 private void Client_ModeSelectorEvent(GameModeSelector <IUser> selector)
 {
     selector.AddFactoty("fac", this._UserFactory);
     this._UserProvider = selector.CreateUserProvider("fac");
 }