コード例 #1
0
    void Start()
    {
        clientNetworkManager = ClientNetworkManager.Instance;
        clientGameManager    = ClientGameManager.Instance;
        clientEntityManager  = ClientEntityManager.Instance;
        uiManager            = UIManager.Instance;

        rtsCamera = FindObjectOfType <RTSCamera>();
    }
コード例 #2
0
    private void Start()
    {
        clientGameManager = ClientGameManager.Instance;

        if (!ClientNetworkManager.Instance.IsConnectedToServer)
        {
            OpenConnectionMenu();
        }
    }
コード例 #3
0
 void Awake()
 {
     if (Instance == null)
     {
         Instance = this;
     }
     else
     {
         Destroy(gameObject);
     }
 }
コード例 #4
0
 private void Awake()
 {
     if (instance == null)
     {
         instance = this;
     }
     else
     {
         Debug.LogError("ERROR: ClientGameManager already initialized. Remove redundant ClientGameManagers");
     }
 }
コード例 #5
0
ファイル: GameManager.cs プロジェクト: TxN/VoxelLand
 void TryStartClient()
 {
     if (!IsClient)
     {
         return;
     }
     _clientManager = new ClientGameManager();
     _clientManager.Create();
     _clientManager.Init();
     _clientManager.PostInit();
     _clientManager.Load();
     _clientManager.PostLoad();
 }
コード例 #6
0
 void TryStartClient()
 {
     if (!IsClient)
     {
         return;
     }
     _clientManager = new ClientGameManager();
     _clientManager.Create();
     _clientManager.Init();
     _clientManager.PostInit();
     _clientManager.Load();
     _clientManager.PostLoad();
     StartCoroutine(ClientRareUpdate());
 }
コード例 #7
0
        // ctor
        public GameViewModel(IFrameNavigationService navigationService)
        {
            _navigationService = navigationService;
            _gameManager       = new ClientGameManager();
            _gameManager.GetBoardState();

            InitializeBoard();
            InitializeBoardCheckers();
            CreateTitle();

            RollDiceCommand      = new RelayCommand(RollDice);
            ChooseCheckerCommand = new RelayCommandWithParams <string>(MoveChecker);
            _gameManager.RegisterGetDiceEvent(GetRivalDiceResult);
            _gameManager.RegisterBoardUpdatedEvent(UpdateGameBoard);
        }
コード例 #8
0
ファイル: Sockets.cs プロジェクト: Shkire/BlindBotBattleField
        /*
         * public AsynchronousSocketListener()
         * {
         * }
         */

        public static void StartListening(ClientGameManager i_client)
        {
            p_client = i_client;
            // Data buffer for incoming data.
            byte[] bytes = new Byte[1024];

            // Establish the local endpoint for the socket.
            // The DNS name of the computer
            // running the listener is "host.contoso.com".
            IPHostEntry ipHostInfo = //Dns.GetHostEntry(Dns.GetHostName());
                                     Dns.Resolve(Dns.GetHostName());
            IPAddress  ipAddress     = ipHostInfo.AddressList[0];
            IPEndPoint localEndPoint = new IPEndPoint(ipAddress, port);

            // Create a TCP/IP socket.

            Socket listener = new Socket(AddressFamily.InterNetwork,
                                         SocketType.Stream, ProtocolType.Tcp);

            // Bind the socket to the local endpoint and listen for incoming connections.

            try
            {
                listener.Bind(localEndPoint);
                listener.Listen(100);
                while (true)
                {
                    // Set the event to nonsignaled state.
                    allDone.Reset();

                    // Start an asynchronous socket to listen for connections.
                    listener.BeginAccept(
                        new AsyncCallback(AcceptData),
                        listener);

                    // Wait until a connection is made before continuing.
                    allDone.WaitOne();
                }
            }
            catch (Exception e)
            {
                //Console.WriteLine(e.ToString());
                listener.Close();
            }
        }
コード例 #9
0
 private void Start()
 {
     clientGameManager = ClientGameManager.Instance;
 }
コード例 #10
0
 public ClientChunkManager(ClientGameManager owner) : base(owner)
 {
 }
コード例 #11
0
 public ClientDynamicEntityController(ClientGameManager owner) : base(owner)
 {
 }
コード例 #12
0
 public ClientPlayerEntityManager(ClientGameManager owner) : base(owner)
 {
 }
コード例 #13
0
 public ClientWorldStateController(ClientGameManager owner) : base(owner)
 {
 }
コード例 #14
0
 public ClientUIManager(ClientGameManager owner) : base(owner)
 {
 }
コード例 #15
0
 private void Start()
 {
     serverGameManager = ServerGameManager.Instance;
     clientGameManager = ClientGameManager.Instance;
 }
コード例 #16
0
 public ClientController(ClientGameManager owner) : base(owner)
 {
 }
コード例 #17
0
 public ClientInputManager(ClientGameManager owner) : base(owner)
 {
 }