Beispiel #1
0
 public Network(LoginRegulator loginReg, CityConnectionRegulator cityReg, LotConnectionRegulator lotReg, IShardsDomain shards)
 {
     this.Shards         = shards;
     this.CityRegulator  = cityReg;
     this.LoginRegulator = loginReg;
     this.LotRegulator   = lotReg;
 }
Beispiel #2
0
        public JoinLotProgressController(UIJoinLotProgress view, LotConnectionRegulator regulator)
        {
            this.View = view;

            regulator.OnError      += Regulator_OnError;
            regulator.OnTransition += Regulator_OnTransition;

            ConnectionReg = regulator;
        }
Beispiel #3
0
        public DisconnectController(TransitionScreen view, CityConnectionRegulator cityRegulator, LotConnectionRegulator lotRegulator, Network.Network network)
        {
            View = view;
            View.ShowProgress = false;

            network.LotClient.Disconnect();
            network.CityClient.Disconnect();
            CityConnectionRegulator = cityRegulator;
            CityConnectionRegulator.OnTransition += CityConnectionRegulator_OnTransition;
            LotConnectionRegulator = lotRegulator;
        }
Beispiel #4
0
        public DisconnectController(TransitionScreen view, CityConnectionRegulator cityRegulator, LotConnectionRegulator lotRegulator, LoginRegulator logRegulator, Network.Network network)
        {
            View = view;
            View.ShowProgress = false;

            CityConnectionRegulator = cityRegulator;
            CityConnectionRegulator.OnTransition += CityConnectionRegulator_OnTransition;
            LotConnectionRegulator       = lotRegulator;
            LoginRegulator               = logRegulator;
            LoginRegulator.OnError      += LoginRegulator_OnError;
            LoginRegulator.OnTransition += LoginRegulator_OnTransition;
        }
        public CoreGameScreenController(CoreGameScreen view, Network.Network network, IClientDataService dataService, IKernel kernel, LotConnectionRegulator joinLotRegulator)
        {
            this.Screen           = view;
            this.Network          = network;
            this.DataService      = dataService;
            this.Chat             = new MessagingController(this, view.MessageTray, network, dataService);
            this.JoinLotRegulator = joinLotRegulator;
            this.RoommateProtocol = new RoommateRequestController(this, network, dataService);

            joinLotRegulator.OnTransition += JoinLotRegulator_OnTransition;

            var shard = Network.MyShard;

            Terrain = kernel.Get <TerrainController>(new ConstructorArgument("parent", this));
            view.Initialize(shard.Name, int.Parse(shard.Map), Terrain);
        }