public Boomlagoon.JSON.JSONValue ExportDataAsPresetSection(bool saveSampleTextData = true)
        {
            Boomlagoon.JSON.JSONObject json_data = new Boomlagoon.JSON.JSONObject();

            if (m_loop_cycles.Count > 0)
            {
                Boomlagoon.JSON.JSONArray loops_data = new Boomlagoon.JSON.JSONArray();

                foreach (ActionLoopCycle action_loop in m_loop_cycles)
                {
                    loops_data.Add(action_loop.ExportData());
                }

                json_data["LOOPS_DATA"] = loops_data;
            }

            Boomlagoon.JSON.JSONArray actions_data = new Boomlagoon.JSON.JSONArray();
            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 Boomlagoon.JSON.JSONValue(json_data));
        }
        public Boomlagoon.JSON.JSONValue ExportData()
        {
            Boomlagoon.JSON.JSONObject json_data = new Boomlagoon.JSON.JSONObject();

            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)
            {
                Boomlagoon.JSON.JSONArray loops_data = new Boomlagoon.JSON.JSONArray();

                foreach (ActionLoopCycle action_loop in m_loop_cycles)
                {
                    loops_data.Add(action_loop.ExportData());
                }

                json_data["LOOPS_DATA"] = loops_data;
            }

            Boomlagoon.JSON.JSONArray actions_data = new Boomlagoon.JSON.JSONArray();
            foreach (LetterAction action in m_letter_actions)
            {
                actions_data.Add(action.ExportData());
            }
            json_data["ACTIONS_DATA"] = actions_data;

            return(new Boomlagoon.JSON.JSONValue(json_data));
        }
Пример #3
0
        public static Boomlagoon.JSON.JSONValue ExportData(this AnimationCurve curve)
        {
            Boomlagoon.JSON.JSONArray key_frame_data = new Boomlagoon.JSON.JSONArray();

            foreach (UnityEngine.Keyframe key_frame in curve.keys)
            {
                key_frame_data.Add(key_frame.ExportData());
            }

            return(key_frame_data);
        }
Пример #4
0
        public static Boomlagoon.JSON.JSONArray ExportData(this List <int> list)
        {
            Boomlagoon.JSON.JSONArray json_array = new Boomlagoon.JSON.JSONArray();

            if (list != null)
            {
                foreach (int num in list)
                {
                    json_array.Add(num);
                }
            }

            return(json_array);
        }
Пример #5
0
        public Boomlagoon.JSON.JSONValue ExportData()
        {
            Boomlagoon.JSON.JSONObject json_data = new Boomlagoon.JSON.JSONObject();

            Boomlagoon.JSON.JSONArray  anchors_data = new Boomlagoon.JSON.JSONArray();
            Boomlagoon.JSON.JSONObject anchor_point_data;

            foreach (BezierCurvePoint anchor_point in m_anchor_points)
            {
                anchor_point_data = new Boomlagoon.JSON.JSONObject();
                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 Boomlagoon.JSON.JSONValue(json_data));
        }
Пример #6
0
		public Boomlagoon.JSON.JSONValue ExportData()
		{
			Boomlagoon.JSON.JSONObject json_data = new Boomlagoon.JSON.JSONObject();
			
			json_data["m_action_type"] = (int) m_action_type;
			json_data["m_ease_type"] = (int) m_ease_type;
			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();
			
			json_data ["m_colour_transition_active"] = m_colour_transition_active;
			json_data["m_start_colour"] = m_start_colour.ExportData();
			json_data ["m_position_transition_active"] = m_position_transition_active;
			json_data["m_start_pos"] = m_start_pos.ExportData();
			json_data ["m_local_rotation_transition_active"] = m_local_rotation_transition_active;
			json_data["m_start_euler_rotation"] = m_start_euler_rotation.ExportData();
			json_data ["m_local_scale_transition_active"] = m_local_scale_transition_active;
			json_data["m_start_scale"] = m_start_scale.ExportData();
			json_data ["m_global_rotation_transition_active"] = m_global_rotation_transition_active;
			json_data["m_global_start_euler_rotation"] = m_global_start_euler_rotation.ExportData();
			json_data ["m_global_scale_transition_active"] = m_global_scale_transition_active;
			json_data["m_global_start_scale"] = m_global_start_scale.ExportData();
			
			json_data["m_end_colour"] = m_end_colour.ExportData();
			json_data["m_end_pos"] = m_end_pos.ExportData();
			json_data["m_end_euler_rotation"] = m_end_euler_rotation.ExportData();
			json_data["m_end_scale"] = m_end_scale.ExportData();
			json_data["m_global_end_euler_rotation"] = m_global_end_euler_rotation.ExportData();
			json_data["m_global_end_scale"] = m_global_end_scale.ExportData();
			
			json_data["m_delay_progression"] = m_delay_progression.ExportData();
			json_data["m_duration_progression"] = m_duration_progression.ExportData();
			
			
			Boomlagoon.JSON.JSONArray audio_effects_data = new Boomlagoon.JSON.JSONArray();
			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;
			
			Boomlagoon.JSON.JSONArray particle_effects_data = new Boomlagoon.JSON.JSONArray();
			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 Boomlagoon.JSON.JSONValue(json_data);
		}
		public string ExportData(bool hard_copy = false)
		{
			Boomlagoon.JSON.JSONObject json_data = new Boomlagoon.JSON.JSONObject();

			json_data["TEXTFX_EXPORTER_VERSION"] = JSON_EXPORTER_VERSION;
			json_data["m_animate_per"] = (int) m_animate_per;
			
			if (hard_copy)
			{
				json_data["m_begin_delay"] = m_begin_delay;
				json_data["m_begin_on_start"] = m_begin_on_start;
				json_data["m_on_finish_action"] = (int) m_on_finish_action;
				json_data["m_time_type"] = (int) m_time_type;
			}
			
			Boomlagoon.JSON.JSONArray letter_animations_data = new Boomlagoon.JSON.JSONArray();
			if(m_master_animations != null)
			{
				foreach(LetterAnimation anim in m_master_animations)
				{
					letter_animations_data.Add(anim.ExportData());
				}
			}
			json_data["LETTER_ANIMATIONS_DATA"] = letter_animations_data;


			// Handle exporting quick setup configuration fields
			Boomlagoon.JSON.JSONArray effect_settings_options = new Boomlagoon.JSON.JSONArray();
			if(m_preset_effect_settings != null)
			{
				foreach(PresetEffectSetting effect_setting in m_preset_effect_settings)
				{
					effect_settings_options.Add(effect_setting.ExportData());
				}
			}
			json_data["PRESET_EFFECT_SETTINGS"] = effect_settings_options;

			
			return json_data.ToString();
		}
	//	public void ExportData(Boomlagoon.JSON.JSONObject json_data, bool hard_copy = false)
	//	{
	//		json_data["TEXTFX_EXPORTER_VERSION"] = JSON_EXPORTER_VERSION;
	//		json_data["m_animate_per"] = (int) m_animate_per;
	//
	//		if (hard_copy)
	//		{
	//			json_data["m_begin_delay"] = m_begin_delay;
	//			json_data["m_begin_on_start"] = m_begin_on_start;
	//			json_data["m_on_finish_action"] = (int) m_on_finish_action;
	//			json_data["m_time_type"] = (int) m_time_type;
	//		}
	//
	//		Boomlagoon.JSON.JSONArray letter_animations_data = new Boomlagoon.JSON.JSONArray();
	//		if(m_master_animations != null)
	//			foreach(LetterAnimation anim in m_master_animations)
	//		{
	//			letter_animations_data.Add(anim.ExportData());
	//		}
	//		json_data["LETTER_ANIMATIONS_DATA"] = letter_animations_data;
	//	}



#if UNITY_EDITOR
		public string ExportDataAsPresetSection(bool saveSampleTextInfo = true)
		{
			if(m_master_animations == null || m_master_animations.Count == 0)
			{
				Debug.LogError("There's no animation to export");
				return "";
			}

			Boomlagoon.JSON.JSONObject json_data = new Boomlagoon.JSON.JSONObject();
			
			json_data["TEXTFX_EXPORTER_VERSION"] = JSON_EXPORTER_VERSION;
			json_data["LETTER_ANIMATIONS_DATA"] = m_master_animations[0].ExportDataAsPresetSection(saveSampleTextInfo);
			
			
			// Handle exporting quick setup configuration fields
			Boomlagoon.JSON.JSONArray effect_settings_options = new Boomlagoon.JSON.JSONArray();
			if(m_preset_effect_settings != null)
			{
				foreach(PresetEffectSetting effect_setting in m_preset_effect_settings)
				{
					effect_settings_options.Add(effect_setting.ExportData());
				}
			}
			json_data["PRESET_EFFECT_SETTINGS"] = effect_settings_options;
			
			return json_data.ToString();
		}
		public Boomlagoon.JSON.JSONValue ExportData()
		{
			Boomlagoon.JSON.JSONObject json_data = new Boomlagoon.JSON.JSONObject();
			
			Boomlagoon.JSON.JSONArray anchors_data = new Boomlagoon.JSON.JSONArray();
			Boomlagoon.JSON.JSONObject anchor_point_data;
			
			foreach(BezierCurvePoint anchor_point in m_anchor_points)
			{
				anchor_point_data = new Boomlagoon.JSON.JSONObject();
				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 Boomlagoon.JSON.JSONValue(json_data);
		}
Пример #10
0
		public Boomlagoon.JSON.JSONValue ExportData()
		{
			Boomlagoon.JSON.JSONObject json_data = new Boomlagoon.JSON.JSONObject();
			
			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)
			{
				Boomlagoon.JSON.JSONArray loops_data = new Boomlagoon.JSON.JSONArray();
				
				foreach(ActionLoopCycle action_loop in m_loop_cycles)
				{
					loops_data.Add(action_loop.ExportData());
				}
				
				json_data["LOOPS_DATA"] = loops_data;
			}
			
			Boomlagoon.JSON.JSONArray actions_data = new Boomlagoon.JSON.JSONArray();
			foreach(LetterAction action in m_letter_actions)
			{
				actions_data.Add(action.ExportData());
			}
			json_data["ACTIONS_DATA"] = actions_data;
			
			return new Boomlagoon.JSON.JSONValue(json_data);
		}
Пример #11
0
		public Boomlagoon.JSON.JSONValue ExportDataAsPresetSection(bool saveSampleTextData = true)
		{
			Boomlagoon.JSON.JSONObject json_data = new Boomlagoon.JSON.JSONObject();
			
			if(m_loop_cycles.Count > 0)
			{
				Boomlagoon.JSON.JSONArray loops_data = new Boomlagoon.JSON.JSONArray();
				
				foreach(ActionLoopCycle action_loop in m_loop_cycles)
				{
					loops_data.Add(action_loop.ExportData());
				}
				
				json_data["LOOPS_DATA"] = loops_data;
			}
			
			Boomlagoon.JSON.JSONArray actions_data = new Boomlagoon.JSON.JSONArray();
			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 Boomlagoon.JSON.JSONValue(json_data);
		}