public static void Init() { GameObject go = new GameObject("OtherPlayer"); instance = go.AddComponent <OtherPlayerManager>(); NetworkManager.Register(ENUM_CMD.CS_PLAYER_MOVE_NOTIFY, OnPlayerMoveNotify); }
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); }
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"); }
public ClientsDataHandler(Client client) { this.client = client; otherPlayerCharManager = new OtherPlayerManager(client); }