Exemple #1
0
    public static void Init()
    {
        GameObject go = new GameObject("OtherPlayer");

        instance = go.AddComponent <OtherPlayerManager>();

        NetworkManager.Register(ENUM_CMD.CS_PLAYER_MOVE_NOTIFY, OnPlayerMoveNotify);
    }
Exemple #2
0
    void Start()
    {
        ChunkChecker.Init();
        ChunkRefresher.Init();
        ChunkManager.Init();
        ChunkPool.Init();
        OtherPlayerManager.Init();
        ItemSelectPanel.Show();
        ChatPanel.ShowChatPanel();

        List <Vector2Int> preloadChunks = Utilities.GetSurroudingChunks(PlayerController.GetCurrentChunk());

        ChunkManager.ChunksEnterLeaveViewReq(preloadChunks);
    }
Exemple #3
0
 private void Awake()
 {
     if (playertype == Config.PLAYER_TYPE_CAT)
     {
         playerGO = GameObject.FindGameObjectWithTag("cat");
     }
     else if (playertype == Config.PLAYER_TYPE_FISH)
     {
         playerGO = GameObject.FindGameObjectWithTag("fish");
     }
     catGO              = GameObject.FindGameObjectWithTag("cat");
     fishGO             = GameObject.FindGameObjectWithTag("fish");
     otherPlayerManager = GameObject.FindWithTag("OtherPlayerManagerGO").GetComponent <OtherPlayerManager>();
     tcpClient          = GameObject.FindGameObjectWithTag("tcpclient").GetComponent <TcpClient>();
     audioChatGO        = GameObject.FindGameObjectWithTag("audiochat");
 }
Exemple #4
0
 public ClientsDataHandler(Client client)
 {
     this.client            = client;
     otherPlayerCharManager = new OtherPlayerManager(client);
 }