Ejemplo n.º 1
0
	// Update is called once per frame
	void Update()
	{
		switch( m_eState)
		{
		case eCENTER_NOTIFY.FADEIN:
			{
				m_curColor.a += ( Time.deltaTime * m_fAlphaIncreaseSpeed);
				SetAlpha( m_curColor.a);
				if( ( Time.time - m_fStartFadeInTime) > m_FadeInTime)
				{
					m_fStartDurationTime = Time.time;
					m_eState = eCENTER_NOTIFY.DURATION;
				}
			}
			break;
		case eCENTER_NOTIFY.DURATION:
			{
				if( ( Time.time - m_fStartDurationTime) > m_DurationTime)
				{
					m_fStartFadeOutTime = Time.time;
					m_eState = eCENTER_NOTIFY.FADEOUT;
					m_curColor.a = 1.0f;
				}
			}
			break;
		case eCENTER_NOTIFY.FADEOUT:
			{
				if( ( Time.time - m_fStartFadeOutTime) > m_FadeOutTime)
					return;

				m_curColor.a -= ( Time.deltaTime * m_fAlphaDecreaseSpeed);
				SetAlpha( m_curColor.a);
			}
			break;
		}
	}
Ejemplo n.º 2
0
	private void  AddMessageItemPanel( string text, eCENTER_NOTIFY eCENTER_NOTIFY_Type)
	{
		m_fDestoryTime = ( AsTableManager.Instance.GetTbl_GlobalWeight_Record( 50).Value / 1000.0f) +
		( AsTableManager.Instance.GetTbl_GlobalWeight_Record( 16).Value / 1000.0f) +
		( AsTableManager.Instance.GetTbl_GlobalWeight_Record( 51).Value / 1000.0f);

		m_NextWaitTime = AsTableManager.Instance.GetTbl_GlobalWeight_Record( 52).Value / 1000.0f;

		GameObject obj = ResourceLoad.LoadGameObject( "UI/AsGUI/GUI_CenterNotify");
		GameObject centerNotifyObject = GameObject.Instantiate( obj)  as GameObject;
		AsCenterNotifyItem m_CenterNotifyItem = centerNotifyObject.GetComponentInChildren<AsCenterNotifyItem>();
		m_CenterNotifyItem.SetText( text, centerNotifyObject);
		m_listNotifyItem.Add( m_CenterNotifyItem);
	}
Ejemplo n.º 3
0
	public void Show()
	{
		m_FadeInTime = AsTableManager.Instance.GetTbl_GlobalWeight_Record( 50).Value / 1000.0f;
		m_DurationTime = AsTableManager.Instance.GetTbl_GlobalWeight_Record( 16).Value / 1000.0f;
		m_FadeOutTime = AsTableManager.Instance.GetTbl_GlobalWeight_Record( 51).Value / 1000.0f;
//		m_NextWaitTime = AsTableManager.Instance.GetTbl_GlobalWeight_Record( 52).Value / 1000.0f;

		m_fAlphaIncreaseSpeed = ( 1.0f / m_FadeInTime);
		m_fAlphaDecreaseSpeed = ( 1.0f / m_FadeOutTime);

		m_Base_Y = gameObject.transform.localPosition.y;

		m_bShowCommand = true;
		gameObject.SetActiveRecursively( m_bShowCommand);

		m_curColor.a = 0.0f;
		m_eState = eCENTER_NOTIFY.FADEIN;
		m_fStartFadeInTime = Time.time;
		SetAlpha( m_curColor.a);
	}