Пример #1
0
	public void SetTargetInfo( AsBaseEntity target)
	{
//		targetInfo.Enable = false;
//		targetInfo.SetInfo( target);
		targetInfo.Enable = false;
		//m_NpcMenu.RemoveNpcSelectEffect();
		
		if( target == null)
		{
		 	m_NpcMenu.Close();	
			m_UserMenu.Close();
			
			AsPartyManager.Instance.SetTargetByPartyMember(0);
			if( null != targetInfo.mobBuffMgr)
				targetInfo.mobBuffMgr.ClearBuff();
			
			if( null != targetInfo.mobBuffMgr)
				targetInfo.mobBuffMgr.EmptyOtherUserFsm();
		}
		else
		{
			targetInfo.Enable = true;
			targetInfo.SetInfo( target);		
			
			if( null != targetInfo.mobBuffMgr)
				targetInfo.mobBuffMgr.ReciveBuff( target);
			
			if( true == m_UserMenu.isVisible && target.GetInstanceID() != m_UserMenu.TargetUserEntity.GetInstanceID())
				m_UserMenu.Close();
			
			//party_check
			AsPlayerFsm playerFsm = AsEntityManager.Instance.GetPlayerCharFsm();
			if( null != playerFsm)
			{		
				AsUserEntity party_user = playerFsm.Target as AsUserEntity;
				if( null != party_user)
					AsPartyManager.Instance.SetTargetByPartyMember( party_user.UniqueId);
				else
					AsPartyManager.Instance.SetTargetByPartyMember(0);
			}
			else
			{
				AsPartyManager.Instance.SetTargetByPartyMember(0);
			}
			
			#region - target mark -
			targetInfo.ActivateTargetMarkBtn( AsPartyManager.Instance.IsCaptain);
			#endregion
		}
	}