예제 #1
0
    public void ImportData(JSONObject json_data)
    {
        m_letters_to_animate            = json_data["m_letters_to_animate"].Array.JSONtoListInt();
        m_letters_to_animate_custom_idx = (int)json_data["m_letters_to_animate_custom_idx"].Number;
        m_letters_to_animate_option     = (LETTERS_TO_ANIMATE)(int)json_data["m_letters_to_animate_option"].Number;


        m_loop_cycles = new List <ActionLoopCycle>();

        if (json_data.ContainsKey("LOOPS_DATA"))
        {
            ActionLoopCycle loop_cycle;

            foreach (JSONValue loop_data in json_data["LOOPS_DATA"].Array)
            {
                loop_cycle = new ActionLoopCycle();
                loop_cycle.ImportData(loop_data.Obj);
                m_loop_cycles.Add(loop_cycle);
            }
        }

        m_letter_actions = new List <LetterAction>();
        LetterAction letter_action;

        foreach (JSONValue action_data in json_data["ACTIONS_DATA"].Array)
        {
            letter_action = new LetterAction();
            letter_action.ImportData(action_data.Obj);
            m_letter_actions.Add(letter_action);
        }
    }
        public void ImportData(Boomlagoon.JSON.JSONObject json_data, string assetNameSuffix = "")
        {
            m_letters_to_animate            = json_data["m_letters_to_animate"].Array.JSONtoListInt();
            m_letters_to_animate_custom_idx = (int)json_data["m_letters_to_animate_custom_idx"].Number;
            m_letters_to_animate_option     = (LETTERS_TO_ANIMATE)(int)json_data["m_letters_to_animate_option"].Number;

            m_letter_actions = new List <LetterAction>();
            LetterAction letter_action;

            foreach (Boomlagoon.JSON.JSONValue action_data in json_data["ACTIONS_DATA"].Array)
            {
                letter_action = new LetterAction();
                letter_action.ImportData(action_data.Obj, assetNameSuffix);
                m_letter_actions.Add(letter_action);
            }

            m_loop_cycles = new List <ActionLoopCycle>();
            if (json_data.ContainsKey("LOOPS_DATA"))
            {
                ActionLoopCycle loop_cycle;

                foreach (Boomlagoon.JSON.JSONValue loop_data in json_data["LOOPS_DATA"].Array)
                {
                    loop_cycle = new ActionLoopCycle();
                    loop_cycle.ImportData(loop_data.Obj);

                    // Check for invalid loops
                    if (loop_cycle.m_start_action_idx < m_letter_actions.Count && loop_cycle.m_end_action_idx < m_letter_actions.Count)
                    {
                        m_loop_cycles.Add(loop_cycle);
                    }
                }
            }
        }
예제 #3
0
    public void ImportData(JSONObject json_data)
    {
        m_letters_to_animate = json_data["m_letters_to_animate"].Array.JSONtoListInt();
        m_letters_to_animate_custom_idx = (int)json_data["m_letters_to_animate_custom_idx"].Number;
        m_letters_to_animate_option = (LETTERS_TO_ANIMATE)(int)json_data["m_letters_to_animate_option"].Number;

        m_loop_cycles = new List<ActionLoopCycle>();

        if (json_data.ContainsKey("LOOPS_DATA"))
        {
            ActionLoopCycle loop_cycle;

            foreach (var loop_data in json_data["LOOPS_DATA"].Array)
            {
                loop_cycle = new ActionLoopCycle();
                loop_cycle.ImportData(loop_data.Obj);
                m_loop_cycles.Add(loop_cycle);
            }
        }

        m_letter_actions = new List<LetterAction>();
        LetterAction letter_action;
        foreach (var action_data in json_data["ACTIONS_DATA"].Array)
        {
            letter_action = new LetterAction();
            letter_action.ImportData(action_data.Obj);
            m_letter_actions.Add(letter_action);
        }
    }
예제 #4
0
		public void ImportData(Boomlagoon.JSON.JSONObject json_data, string assetNameSuffix = "")
		{
			
			m_letters_to_animate = json_data["m_letters_to_animate"].Array.JSONtoListInt();
			m_letters_to_animate_custom_idx = (int) json_data["m_letters_to_animate_custom_idx"].Number;
			m_letters_to_animate_option = (LETTERS_TO_ANIMATE) (int) json_data["m_letters_to_animate_option"].Number;
			
			m_letter_actions = new List<LetterAction>();
			LetterAction letter_action;
			foreach(Boomlagoon.JSON.JSONValue action_data in json_data["ACTIONS_DATA"].Array)
			{
				letter_action = new LetterAction();
				letter_action.ImportData(action_data.Obj, assetNameSuffix);
				m_letter_actions.Add(letter_action);
			}

			m_loop_cycles = new List<ActionLoopCycle>();
			if(json_data.ContainsKey("LOOPS_DATA"))
			{
				ActionLoopCycle loop_cycle;
				
				foreach(Boomlagoon.JSON.JSONValue loop_data in json_data["LOOPS_DATA"].Array)
				{
					loop_cycle = new ActionLoopCycle();
					loop_cycle.ImportData(loop_data.Obj);
					
					// Check for invalid loops
					if(loop_cycle.m_start_action_idx < m_letter_actions.Count && loop_cycle.m_end_action_idx < m_letter_actions.Count)
					{
						m_loop_cycles.Add(loop_cycle);
					}
					
				}
			}
		}