Example #1
0
	public void Recv_AttendBonus(body_SC_BONUS_ATTENDANCE _bonus)
	{
		Debug.Log("BonusManager::Recv_AttenBonus: _bonus = " + _bonus);
		
		m_Attend = _bonus;
		
		if(CheckMapValidity() == true)
			OpenAttendBonus();
	}
Example #2
0
	public void Init(body_SC_BONUS_ATTENDANCE _attend)
	{
		Debug.Log("AttendBonusWindow::Init: day = " + _attend.nDays);
		
		if( _attend.nDays <= 0)
		{
			Debug.LogError("AttendBonusWindow::Init: day = " + _attend.nDays);
			return;
		}
		
		if( m_attendBonusSlot.Length <= 0 )
		{
			Debug.LogError("m_attendBonusSlot.Length is 0");
			return;
		}

		_Initialize(_attend.nDays);
		
		int nWeekDay 	= ((_attend.nDays-1) % m_attendBonusSlot.Length) + 1;
		
		int nStrIndex = m_nDayStringIndex[ nWeekDay - 1];
		string strMsg = AsTableManager.Instance.GetTbl_String( nStrIndex);
		m_TextContents.Text = string.Format( strMsg, nWeekDay);
		
		for( int i = 0; i < nWeekDay ; i++)
		{
			if( i >= m_attendBonusSlot.Length )
				continue;
			
			Color _textColor = Color.white;
			
			bool isFinish = true;
			
			bool isSelect = false;
			
			if( i == nWeekDay-1 )
			{
				isSelect = true;
				isFinish = false;
			}
			
			m_attendBonusSlot[i].SetAttendItemProperty( _textColor , isFinish , isSelect );
		}
	}
Example #3
0
	void OpenAttendBonus()
	{
		if(m_Attend != null)
		{
			GameObject obj = Instantiate( Resources.Load( "UI/AsGUI/UI_DailyAttend")) as GameObject;
			AttendBonusWindow window = obj.GetComponent<AttendBonusWindow>();
			window.Init( m_Attend);
			QuestTutorialMgr.Instance.attendBonus = true;
			
			m_Attend = null;
		}
	}
Example #4
0
	void AttendBonus( byte[] _packet)
	{
		body_SC_BONUS_ATTENDANCE attend = new body_SC_BONUS_ATTENDANCE();
		attend.PacketBytesToClass( _packet);

		BonusManager.Instance.Recv_AttendBonus(attend);
	}