| | |
| | |
|
| | | 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("直接重连"))
|