Example #1
0
	private void OnPressedButtonToCanAccept(GameObject obj ){
		
		UIButton button = (UIButton) obj.transform.GetComponent<UIButton>();
		if(button == null) return;
		
		if (!Globals.Instance.MTeachManager.checkAcceptCondition())
		return ;

		//_mPanelManager.MoveBack();
		//MoveCameraToTaskPos((TaskConfig.TaskObject)button.Data, true);
		TaskBefore((int)button.Data);
		
		for(int i=1; i<_mButtonList.Length; i++)
		{
			if(_mButtonList[i].gameObject.active)
			{
				TaskTrackButton taskTrack = _mButtonList[i].gameObject.transform.GetComponent( typeof(TaskTrackButton) ) as TaskTrackButton;
				if(taskTrack != null)
				{
					taskTrack.GoToUp();
				}
			}
		}
		Globals.Instance.MSoundManager.PlaySoundEffect("Sounds/UISounds/Button");

	}
Example #2
0
	private void OnPressedButtonToUnfinish(GameObject go)
	{
		UIButton button = (UIButton) go.transform.GetComponent<UIButton>();
		if(button == null) return;
					
		UnfinishTaskDoSameThing((int)button.Data);
		
		for(int i = 1; i < _mButtonList.Length; i++)
		{
			if(_mButtonList[i].gameObject.active)
			{
				TaskTrackButton taskTrack = _mButtonList[i].gameObject.transform.GetComponent( typeof(TaskTrackButton) ) as TaskTrackButton;
				if(taskTrack != null)
				{
					taskTrack.GoToUp();
				}
			}
		}
		Globals.Instance.MSoundManager.PlaySoundEffect("Sounds/UISounds/Button");
	
	
	}