Merge branch 'Cross_Server' of http://192.168.0.87:10010/r/snxxz_scripts into Cross_Server
| | |
| | | |
| | | if (end.x > start.x) |
| | | { |
| | | _centerX = (end.x - start.x) * .5f + _width * .5f; |
| | | _centerX = (end.x * .5f - start.x * .5f) * .5f + start.x * .5f; |
| | | } |
| | | else |
| | | { |
| | | _centerX = (end.x - start.x) * .5f - _width * .5f; |
| | | _centerX = (end.x * .5f - start.x * .5f) * .5f + end.x * .5f; |
| | | } |
| | | |
| | | if (end.z > start.z) |
| | | { |
| | | _centerZ = (end.z - start.z) * .5f + _length * .5f; |
| | | _centerZ = (end.z * .5f - start.z * .5f) * .5f + start.z * .5f; |
| | | } |
| | | else |
| | | { |
| | | _centerZ = (start.z - end.z) * .5f - _length * .5f; |
| | | _centerZ = (start.z * .5f - end.z * .5f) * .5f + end.z * .5f; |
| | | } |
| | | |
| | | |
| | |
| | | {
|
| | | timer -= 1f;
|
| | | m_ProgressSlider.value = DownLoadAndDiscompressTask.Instance.progress;
|
| | | var downLoadedSize = ((float)RemoteFile.TotalDownloadedSize / DownLoadAndDiscompressTask.BYTE_PER_MILLIONBYTE).ToString("f1");
|
| | | var totalSize = ((float)DownLoadAndDiscompressTask.Instance.totalSize / DownLoadAndDiscompressTask.BYTE_PER_MILLIONBYTE).ToString("f1");
|
| | | m_Progress.text = Language.GetFromLocal(13, StringUtility.Contact(downLoadedSize, "M", "/", totalSize, "M"));
|
| | | var totalSizeString = ((float)DownLoadAndDiscompressTask.Instance.totalSize / DownLoadAndDiscompressTask.BYTE_PER_MILLIONBYTE).ToString("f1");
|
| | | var downLoadedSize = Mathf.Clamp(RemoteFile.TotalDownloadedSize, 0, DownLoadAndDiscompressTask.Instance.totalSize - 1);
|
| | | var downLoadedSizeString = ((float)downLoadedSize / DownLoadAndDiscompressTask.BYTE_PER_MILLIONBYTE).ToString("f1");
|
| | |
|
| | | m_Progress.text = Language.GetFromLocal(13, StringUtility.Contact(downLoadedSizeString, "M", "/", totalSizeString, "M"));
|
| | | }
|
| | |
|
| | | if (Time.frameCount % 2 == 0)
|
| | | {
|
| | | if (RemoteFile.TotalDownloadedSize >= DownLoadAndDiscompressTask.Instance.totalSize)
|
| | | {
|
| | | m_DownLoadSpeed.text = StringUtility.Contact(UnityEngine.Random.Range(5, 10), "KB/S");
|
| | | }
|
| | | else
|
| | | {
|
| | | m_DownLoadSpeed.text = RemoteFile.DownloadSpeed;
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | private void DisplayHintContent()
|
| | | {
|
| | |
| | | {
|
| | | timer -= 1f;
|
| | | m_ProgressSlider.value = InGameDownLoad.Instance.progress;
|
| | | var downLoadedSize = ((float)InGameDownLoad.Instance.showDownLoadedSize / InGameDownLoad.BYTE_PER_MILLIONBYTE).ToString("f1");
|
| | | var totalSize = ((float)InGameDownLoad.Instance.showTotalSize / InGameDownLoad.BYTE_PER_MILLIONBYTE).ToString("f1");
|
| | | m_Progress.text = Language.GetFromLocal(13, StringUtility.Contact(downLoadedSize, "M", "/", totalSize, "M"));
|
| | | var totalSizeString = ((float)InGameDownLoad.Instance.showTotalSize / InGameDownLoad.BYTE_PER_MILLIONBYTE).ToString("f1");
|
| | | var downLoadedSize = Mathf.Clamp(InGameDownLoad.Instance.showDownLoadedSize, 0, InGameDownLoad.Instance.showTotalSize - 1);
|
| | | var downLoadedSizeString = ((float)downLoadedSize / InGameDownLoad.BYTE_PER_MILLIONBYTE).ToString("f1");
|
| | | m_Progress.text = Language.GetFromLocal(13, StringUtility.Contact(downLoadedSizeString, "M", "/", totalSizeString, "M"));
|
| | | }
|
| | |
|
| | | if (Time.frameCount % 2 == 0)
|
| | | {
|
| | | if (InGameDownLoad.Instance.showDownLoadedSize >= InGameDownLoad.Instance.showTotalSize)
|
| | | {
|
| | | m_DownLoadSpeed.text = StringUtility.Contact(UnityEngine.Random.Range(5, 10), "KB/S");
|
| | | }
|
| | | else
|
| | | {
|
| | | m_DownLoadSpeed.text = RemoteFile.DownloadSpeed;
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | private void DisplayHintContent()
|
| | | {
|
| | |
| | |
|
| | | m_ProgressSlider.value = VersionUtility.Instance.progress;
|
| | |
|
| | | var downLoadedSize = ((float)RemoteFile.TotalDownloadedSize / DownLoadAndDiscompressTask.BYTE_PER_MILLIONBYTE).ToString("f1");
|
| | | var totalSize = ((float)VersionUtility.Instance.GetApkSize() * 1024 / DownLoadAndDiscompressTask.BYTE_PER_MILLIONBYTE).ToString("f1");
|
| | | m_Progress.text = Language.GetFromLocal(13, StringUtility.Contact(downLoadedSize, "M", "/", totalSize, "M"));
|
| | | var totalSizeString = ((float)VersionUtility.Instance.GetApkSize() * 1024 / DownLoadAndDiscompressTask.BYTE_PER_MILLIONBYTE).ToString("f1");
|
| | | var downLoadedSize = Mathf.Clamp(RemoteFile.TotalDownloadedSize, 0, VersionUtility.Instance.GetApkSize());
|
| | | var downLoadedSizeString = ((float)downLoadedSize / DownLoadAndDiscompressTask.BYTE_PER_MILLIONBYTE).ToString("f1");
|
| | |
|
| | |
|
| | | m_Progress.text = StringUtility.Contact((VersionUtility.Instance.progress * 100).ToString("f0"), "%");
|
| | | m_Progress.text = Language.GetFromLocal(13, StringUtility.Contact(downLoadedSizeString, "M", "/", totalSizeString, "M"));
|
| | | }
|
| | |
|
| | | if (Time.frameCount % 2 == 0)
|
| | | {
|
| | | if (RemoteFile.TotalDownloadedSize >= VersionUtility.Instance.GetApkSize())
|
| | | {
|
| | | m_DownLoadSpeed.text = StringUtility.Contact(UnityEngine.Random.Range(5, 10), "KB/S");
|
| | | }
|
| | | else
|
| | | {
|
| | | m_DownLoadSpeed.text = RemoteFile.DownloadSpeed;
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | private void DisplayHintContent()
|
| | | {
|
| | |
| | | protected override void OnPreOpen()
|
| | | {
|
| | | model.getDungeonResultEvent += GetDungeonResultEvent;
|
| | | Display();
|
| | | }
|
| | |
|
| | | protected override void OnAfterOpen()
|
| | |
| | |
|
| | | public static bool s_HurtValueLog = false;
|
| | |
|
| | | public static UnityEngine.AI.NavMeshObstacle obstacle;
|
| | | public static SFXController sfx;
|
| | |
|
| | | public static void ClearLogs()
|
| | | {
|
| | | s_LogDict.Clear();
|
| | |
| | | private Vector3 _navChkPos;
|
| | | private int _param1;
|
| | | private int _param2;
|
| | | private Vector2 _start;
|
| | | private Vector2 _end;
|
| | |
|
| | | public override void OnInspectorGUI()
|
| | | {
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | _param1 = EditorGUILayout.IntField("param1", _param1);
|
| | | _param2 = EditorGUILayout.IntField("param2", _param2);
|
| | |
|
| | | if (GUILayout.Button("酷酷酷"))
|
| | | _start = EditorGUILayout.Vector2Field("开始点", _start);
|
| | | _end = EditorGUILayout.Vector2Field("结束点", _end);
|
| | | _param1 = EditorGUILayout.IntField("角度", _param1);
|
| | |
|
| | | if (GUILayout.Button("创建障碍点"))
|
| | | {
|
| | | PlayerDatas.Instance.hero.SwitchGodWeapon(_param1, _param2);
|
| | | if (RuntimeLogUtility.obstacle)
|
| | | {
|
| | | DestroyImmediate(RuntimeLogUtility.obstacle.gameObject);
|
| | | }
|
| | | if (RuntimeLogUtility.sfx)
|
| | | {
|
| | | SFXPlayUtility.Instance.Release(RuntimeLogUtility.sfx);
|
| | | }
|
| | |
|
| | | RuntimeLogUtility.obstacle = SoMap.CreateImpasse.General(new Vector3(_start.x, 0, _start.y),
|
| | | new Vector3(_end.x, 0, _end.y), _param1);
|
| | | var _pos = RuntimeLogUtility.obstacle.transform.position;
|
| | | var _y = 0f;
|
| | | if (CollisionUtility.TryGetGroundHeight(_pos, out _y))
|
| | | {
|
| | | _pos.y = _y;
|
| | | }
|
| | | float _scale = 1;
|
| | | _scale = RuntimeLogUtility.obstacle.transform.localScale.x * 0.25f;
|
| | | RuntimeLogUtility.sfx = SFXPlayUtility.Instance.PlayWithEulerAngle(1040, _pos, RuntimeLogUtility.obstacle.transform.eulerAngles);
|
| | | RuntimeLogUtility.sfx.duration = 0;
|
| | | RuntimeLogUtility.sfx.transform.localScale = new Vector3(_scale, 1, 1);
|
| | | }
|
| | |
|
| | | if (GUILayout.Button("清除障碍点"))
|
| | | {
|
| | | if (RuntimeLogUtility.obstacle)
|
| | | {
|
| | | DestroyImmediate(RuntimeLogUtility.obstacle.gameObject);
|
| | | }
|
| | | if (RuntimeLogUtility.sfx)
|
| | | {
|
| | | SFXPlayUtility.Instance.Release(RuntimeLogUtility.sfx);
|
| | | }
|
| | | }
|
| | |
|
| | | if (GUILayout.Button("直接重连"))
|