private void MoveCam(CamData data) { _camTimer[data.sesionId] = 0; Vector3 pos = new Vector3(data.pos.x, data.pos.y, data.pos.z) / 100; StartCoroutine(CamLerp(pos + _theMiddle, data.rot, _camCollection[data.sesionId])); }
private IEnumerator NewConnection(CamData data) { _mainCamCanvasText.text = "User " + data.name + " connected"; yield return(new WaitForSeconds(5f)); _mainCamCanvasText.text = " "; }
private void NewCamera(CamData data) { StartCoroutine(NewConnection(data)); Transform tra = Instantiate(_cameraPrefab).GetComponent <Transform>(); tra.GetComponentInChildren <NickNamePointer>().SetNickname(data.name); _camCollection.Add(data.sesionId, tra); _camTimer.Add(data.sesionId, 0); }
public void CameraUpdate(CamData data) { if (data.sesionId == _sessionID) { return; } if (!_camCollection.ContainsKey(data.sesionId)) { NewCamera(data); } MoveCam(data); }