private void DrawPathTypeUI() { pathType = (SKILL_BULLET_PATH_TYPE)EditorGUILayout.EnumPopup("子弹弹道", pathType); bulletNum = EditorGUILayout.IntField("子弹数量", bulletNum); if (SKILL_BULLET_PATH_TYPE.直接命中 != pathType) { bulletId = EditorGUILayout.IntField("子弹Id", bulletId); speed = EditorGUILayout.FloatField("射速", speed); } else { bulletId = 0; } range = EditorGUILayout.FloatField("射程", range); if (SKILL_BULLET_PATH_TYPE.跟踪 == pathType) { trackAdd = EditorGUILayout.FloatField("附加射程", trackAdd); } else if (SKILL_BULLET_PATH_TYPE.抛物线 == pathType || SKILL_BULLET_PATH_TYPE.弹球 == pathType || SKILL_BULLET_PATH_TYPE.轰炸 == pathType) { pHeight = EditorGUILayout.FloatField("垂直高度", pHeight); } }
protected override void DeserializeTYpe(BinaryReader br) { bulletType = (SKILL_BULLET_TYPE)br.ReadInt32(); hitType = (SKILL_HIT_TYPE)br.ReadInt32(); posType = (SKILL_BULLET_POS_TYPE)br.ReadInt32(); targetType = (SKILL_BULLET_TARGET_TYPE)br.ReadInt32(); pathType = (SKILL_BULLET_PATH_TYPE)br.ReadInt32(); bulletId = br.ReadInt32(); bulletNum = br.ReadInt32(); range = br.ReadSingle(); speed = br.ReadSingle(); }