public tfxJSONValue ExportData() { tfxJSONObject json_data = new tfxJSONObject(); json_data["m_letters_to_animate"] = m_letters_to_animate.ExportData(); json_data["m_letters_to_animate_custom_idx"] = m_letters_to_animate_custom_idx; json_data["m_letters_to_animate_option"] = (int)m_letters_to_animate_option; if (m_loop_cycles.Count > 0) { tfxJSONArray loops_data = new tfxJSONArray(); foreach (ActionLoopCycle action_loop in m_loop_cycles) { loops_data.Add(action_loop.ExportData()); } json_data["LOOPS_DATA"] = loops_data; } tfxJSONArray actions_data = new tfxJSONArray(); foreach (LetterAction action in m_letter_actions) { actions_data.Add(action.ExportData()); } json_data["ACTIONS_DATA"] = actions_data; return(new tfxJSONValue(json_data)); }
public tfxJSONValue ExportDataAsPresetSection(bool saveSampleTextData = true) { tfxJSONObject json_data = new tfxJSONObject(); if (m_loop_cycles.Count > 0) { tfxJSONArray loops_data = new tfxJSONArray(); foreach (ActionLoopCycle action_loop in m_loop_cycles) { loops_data.Add(action_loop.ExportData()); } json_data["LOOPS_DATA"] = loops_data; } tfxJSONArray actions_data = new tfxJSONArray(); foreach (LetterAction action in m_letter_actions) { actions_data.Add(action.ExportData()); } json_data["ACTIONS_DATA"] = actions_data; if (saveSampleTextData) { json_data["SAMPLE_NUM_LETTERS_ANIMATED"] = m_letters_to_animate.Count; } return(new tfxJSONValue(json_data)); }
public static tfxJSONValue ExportData(this AnimationCurve curve) { tfxJSONArray key_frame_data = new tfxJSONArray(); foreach (UnityEngine.Keyframe key_frame in curve.keys) { key_frame_data.Add(key_frame.ExportData()); } return(key_frame_data); }
public static tfxJSONArray ExportData(this List <int> list) { tfxJSONArray json_array = new tfxJSONArray(); foreach (int num in list) { json_array.Add(num); } return(json_array); }
public tfxJSONValue ExportData() { tfxJSONObject json_data = new tfxJSONObject(); tfxJSONArray anchors_data = new tfxJSONArray(); tfxJSONObject anchor_point_data; foreach (BezierCurvePoint anchor_point in m_anchor_points) { anchor_point_data = new tfxJSONObject(); anchor_point_data["m_anchor_point"] = anchor_point.m_anchor_point.ExportData(); anchor_point_data["m_handle_point"] = anchor_point.m_handle_point.ExportData(); anchors_data.Add(anchor_point_data); } json_data["ANCHORS_DATA"] = anchors_data; return(new tfxJSONValue(json_data)); }
public tfxJSONValue ExportData() { tfxJSONObject json_data = new tfxJSONObject(); json_data["m_action_type"] = (int)m_action_type; json_data["m_ease_type"] = (int)m_ease_type; json_data["m_use_gradient_start"] = m_use_gradient_start; json_data["m_use_gradient_end"] = m_use_gradient_end; json_data["m_force_same_start_time"] = m_force_same_start_time; json_data["m_letter_anchor_start"] = m_letter_anchor_start; json_data["m_letter_anchor_end"] = m_letter_anchor_end; json_data["m_letter_anchor_2_way"] = m_letter_anchor_2_way; json_data["m_offset_from_last"] = m_offset_from_last; json_data["m_position_axis_ease_data"] = m_position_axis_ease_data.ExportData(); json_data["m_rotation_axis_ease_data"] = m_rotation_axis_ease_data.ExportData(); json_data["m_scale_axis_ease_data"] = m_scale_axis_ease_data.ExportData(); if (m_use_gradient_start) { json_data["m_start_vertex_colour"] = m_start_vertex_colour.ExportData(); } else { json_data["m_start_colour"] = m_start_colour.ExportData(); } json_data["m_start_euler_rotation"] = m_start_euler_rotation.ExportData(); json_data["m_start_pos"] = m_start_pos.ExportData(); json_data["m_start_scale"] = m_start_scale.ExportData(); if (m_use_gradient_end) { json_data["m_end_vertex_colour"] = m_end_vertex_colour.ExportData(); } else { json_data["m_end_colour"] = m_end_colour.ExportData(); } json_data["m_end_euler_rotation"] = m_end_euler_rotation.ExportData(); json_data["m_end_pos"] = m_end_pos.ExportData(); json_data["m_end_scale"] = m_end_scale.ExportData(); json_data["m_delay_progression"] = m_delay_progression.ExportData(); json_data["m_duration_progression"] = m_duration_progression.ExportData(); tfxJSONArray audio_effects_data = new tfxJSONArray(); foreach (AudioEffectSetup effect_setup in m_audio_effects) { if (effect_setup.m_audio_clip == null) { continue; } audio_effects_data.Add(effect_setup.ExportData()); } json_data["AUDIO_EFFECTS_DATA"] = audio_effects_data; tfxJSONArray particle_effects_data = new tfxJSONArray(); foreach (ParticleEffectSetup effect_setup in m_particle_effects) { if (effect_setup.m_legacy_particle_effect == null && effect_setup.m_shuriken_particle_effect == null) { continue; } particle_effects_data.Add(effect_setup.ExportData()); } json_data["PARTICLE_EFFECTS_DATA"] = particle_effects_data; return(new tfxJSONValue(json_data)); }