Beispiel #1
0
	void ConditionProcess(Tbl_Emoticon_Record _record, eAutoCondition _condition)
	{
		if(AsGameMain.GetOptionState(OptionBtnType.OptionBtnType_AutoChat) == false)
			return;
		
		if(_record == null)
			return;
		
		if(CheckEnableConditon(_condition) == true)
			ConditionCoolProcess(_record, _condition);
		else
			return;
		
		switch(_record.GetConditionActivation(_condition))
		{
		case eActivationType.NONE:
			Debug.LogWarning("AsEmoticonManager::ConditionProcess: cannot be process in this condition = " + eActivationType.NONE);
			break;
		case eActivationType.Auto:
			Request_Emoticon(_record.Index - 1);
			break;
		case eActivationType.Choice:
			m_ReservedRecord = _record;
			
			// button init
			m_Button = Instantiate(ResourceLoad.LoadGameObject("UI/Optimization/Prefab/GUI_Balloon_ChatMacro")) as GameObject;
			AsChatMacroContainer container = m_Button.GetComponent<AsChatMacroContainer>();
			container.ButtonActivate(_record.Index - 1);//, OnIconClicked);
			
//			string path = "Btn_";
//			if(m_ReservedRecord.Section == eEmoticonType.Normal)
//				path += "Normal_" + (m_ReservedRecord.Index + AsEmoticonPanel.s_BtnCount - 1);
//			else
//				path += "Hunting_" + (m_ReservedRecord.Index - 1);
			
//			Transform buttons = m_Button.transform.Find("Buttons");
//			Transform child = buttons.transform.Find(path);
//			child.parent = m_Button.transform;
//			Destroy(buttons.gameObject);
//			Destroy(m_Button, 3f);
			
			AsSkillCoolTimeAlramDelegatorManager.Instance.DestroyAlarm();
			
//			UIButton btn = child.GetComponent<UIButton>();
//			btn.SetInputDelegate(OnIconClicked);
			
			break;
		}
	}