少年修仙传客户端基础资源
dabaoji
2023-11-13 0a23e1b83f8fda8ab9f9e32fe71c26c431faf63a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
using UnityEditor;
using UnityEngine;
using System;
using System.IO;
 
public class SoFlyObjectEditor : SoConfigBaseEditor
{
 
    [MenuItem("程序/角色相关/技能配置/SoFlyObject")]
    static void CreateSoFlyObject()
    {
        SoFlyObject _config = CreateInstance<SoFlyObject>();
        string _createName = string.Format(ScriptableObjectLoader.SoFlyObject_Suffix,
                                           DateTime.UtcNow.ToFileTimeUtc());
        string _path = ResourcesPath.ResourcesOutPath + "refdata/ScriptableObject/SoFlyObject/";
        if (Directory.Exists(_path) == false)
        {
            Directory.CreateDirectory(_path);
        }
        _path = StringUtility.Contact(ResourcesPath.ResourcesOutAssetPath,
                                      "refdata/ScriptableObject/SoFlyObject/",
                                      _createName,
                                      ".asset");
        AssetDatabase.CreateAsset(_config, _path);
        AssetDatabase.Refresh();
        ProjectWindowUtil.ShowCreatedAsset(_config);
    }
 
    protected override void OnDrawInspectorGUI()
    {
        base.OnDrawInspectorGUI();
 
        SoFlyObject _target = target as SoFlyObject;
        GUILayout.Space(5);
        EditorGUILayout.LabelField(string.Format("飞行物类型: {0}", _target.type), EditorStyles.largeLabel, GUILayout.Height(24));
        _target.shootNode = EditorGUILayout.TextField("发射骨骼(留空为当前坐标点)", _target.shootNode);
        _target.ammoEffectId = EditorGUILayout.IntField("飞行物特效ID", _target.ammoEffectId);
        _target.blastEffectId = EditorGUILayout.IntField("爆炸特效ID", _target.blastEffectId);
        _target.radius = EditorGUILayout.FloatField("碰撞半径", _target.radius);
 
        _target.disppearWhenHitFinished = EditorGUILayout.Toggle("完成hit后是否消失", _target.disppearWhenHitFinished);
        _target.hurtInterval = EditorGUILayout.IntField("伤害间隔(毫秒)", _target.hurtInterval);
        _target.maxHitCount = EditorGUILayout.IntField("最大伤害次数", _target.maxHitCount);
 
    }
}