<commit_before>﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class NGUIMessageQueueControllerBase : MonoBehaviour 
{

	public virtual string CurrentText
	{
		get{ return string.Empty;}
		set{ }
	}

	public virtual Vector3 CurrentTextPosition
	{
		get{ return Vector3.zero;}
		set{ }
	}

	public virtual Color CurrentTextColor
	{
		get{ return Color.black;}
		set{ }
	}


	public virtual void ShowUI( bool _Show )
	{

	}

	public void QueueText( string _Text )
	{
		m_MessageQueue.AddLast( _Text ) ;
	}



	void Awake() 
	{
		SetupStructure() ;
	}


	// Use this for initialization
	void Start () {
		
	}
	
	// Update is called once per frame
	void Update () 
	{
		MessageUpdate();
		
	}

	protected virtual void MessageUpdate()
	{
		if( m_InAnimation )
		{
			CheckAnimationEnd() ;
		}
		else if( m_MessageQueue.Count > 0 )
		{
			RestartAnimation(m_MessageQueue.First.Value) ;
			m_MessageQueue.RemoveFirst() ;
		}
	}


	protected virtual void RestartAnimation( string _Text )
	{
		/** Reset animation position */
		UpdateText( _Text ) ;
		m_InAnimation = true ;
	}


	protected virtual void UpdateText( string _Text )
	{
		// assign text.
	}


	protected virtual void CheckAnimationEnd() 
	{
		// check animation has finished.
		/*
		if( m_MessageTweenPosition.isActiveAndEnabled == false &&
			m_MessageTweenAlpha.isActiveAndEnabled == false )
		{
			m_InAnimation = false ;

			if (0 == m_MessageQueue.Count)
			{
				ShowUI(false);
			}
		}
		*/

	}

	protected virtual void SetupStructure() 
	{
		
	}

	bool m_InAnimation = false ;
	LinkedList<string> m_MessageQueue = new LinkedList<string>() ;

}<commit_msg>procted<commit_after>﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class NGUIMessageQueueControllerBase : MonoBehaviour 
{

	public virtual string CurrentText
	{
		get{ return string.Empty;}
		set{ }
	}

	public virtual Vector3 CurrentTextPosition
	{
		get{ return Vector3.zero;}
		set{ }
	}

	public virtual Color CurrentTextColor
	{
		get{ return Color.black;}
		set{ }
	}


	public virtual void ShowUI( bool _Show )
	{

	}

	public void QueueText( string _Text )
	{
		m_MessageQueue.AddLast( _Text ) ;
	}



	void Awake() 
	{
		SetupStructure() ;
	}


	// Use this for initialization
	void Start () {
		
	}
	
	// Update is called once per frame
	void Update () 
	{
		MessageUpdate();
		
	}

	protected virtual void MessageUpdate()
	{
		if( m_InAnimation )
		{
			CheckAnimationEnd() ;
		}
		else if( m_MessageQueue.Count > 0 )
		{
			RestartAnimation(m_MessageQueue.First.Value) ;
			m_MessageQueue.RemoveFirst() ;
		}
	}


	protected virtual void RestartAnimation( string _Text )
	{
		/** Reset animation position */
		UpdateText( _Text ) ;
		m_InAnimation = true ;
	}


	protected virtual void UpdateText( string _Text )
	{
		// assign text.
	}


	protected virtual void CheckAnimationEnd() 
	{
		// check animation has finished.
		/*
		if( m_MessageTweenPosition.isActiveAndEnabled == false &&
			m_MessageTweenAlpha.isActiveAndEnabled == false )
		{
			m_InAnimation = false ;

			if (0 == m_MessageQueue.Count)
			{
				ShowUI(false);
			}
		}
		*/

	}

	protected virtual void SetupStructure() 
	{
		
	}

	protected bool m_InAnimation = false ;
	protected LinkedList<string> m_MessageQueue = new LinkedList<string>() ;

}
{'fraction_non_alphanumeric': 0.1003003003003003, 'fraction_numerical': 0.0024024024024024023, 'mean_word_length': 3.200504413619168, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2228491', 'n_tokens_mistral': 1248, 'n_tokens_neox': 1088, 'n_words': 260}