Exemple #1
0
        protected override void OnStart()
        {
            repository = new SqliteDatasource();

            connectionModel = new ServerConnectionHandler();
            connectionModel.Start();
        }
    // Use this for initialization
    void Start()
    {
        state = ServerState.OFF;

        gr = GetComponent <GameRunner>();
        gr.Reset(true);
        gr.GenerateTerrainSeed();

        ch = new ServerConnectionHandler(this.HandleIncomingData);

        cl = new ServerConnectionListener(port, 100, ch.AddConnection);
    }
        public AuthenticateHandler(
            IObjectSerializer objectSerializer,
            IGamePlatformAccessor gamePlatformAccessor,
            IConnectionHandler connectionHandler,
            IEventBus eventBus,
            IMapManager mapManager,
            ILogger logger) : base(objectSerializer, gamePlatformAccessor, connectionHandler, logger)
        {
            m_EventBus = eventBus;
            m_ServerConnectionHandler = connectionHandler as ServerConnectionHandler;
            m_MapManager             = mapManager;
            m_Logger                 = logger;
            m_PendingAuthentications = new Dictionary <ulong, INetworkPeer>();

            if (gamePlatformAccessor.GamePlatform == GamePlatform.Server)
            {
#if STEAM_AUTH
                eventBus.Subscribe <NetworkEvent>(this, OnNetworkEvent);
                SteamServerComponent.Instance.Server.Auth.OnAuthChange += OnSteamAuthChange;
#endif
            }
        }
Exemple #4
0
 public LoginViewModel(ServerConnectionHandler server, object sender)
 {
     Server      = server;
     this.sender = sender;
 }
Exemple #5
0
 public LoginView()
 {
     InitializeComponent();
     Loaded += (sender, args) => Server = ((LoginViewModel)DataContext).Server;
 }