Esempio n. 1
0
	private void _CreateNamePanel( AsBaseEntity baseEntity)
	{
		string strName = baseEntity.GetProperty<string>( eComponentProperty.NAME);
		switch( baseEntity.EntityType)
		{
		case eEntityType.USER:
			AsUserEntity entity = baseEntity as AsUserEntity;
			if( entity.namePanel != null)
				Destroy( entity.namePanel);
			
			if( m_ModelType == eModelType.Normal)
				AsHUDController.Instance.panelManager.CreateNamePanel_User( baseEntity, strName, ((AsUserEntity)baseEntity).UniqueId);
			break;
		case eEntityType.NPC:
			{
				if (strName != string.Empty)
					AsHUDController.Instance.panelManager.CreateNamePanel_Npc(baseEntity, strName, ((AsNpcEntity)baseEntity).TableIdx);
				
				if (baseEntity.namePanel != null)
					AsHUDController.Instance.panelManager.CreateQuestPanel_Npc(baseEntity, baseEntity.namePanel.NameText.BaseHeight);
				
				AsHUDController.Instance.panelManager.CreateUseItemToTargetPanel(baseEntity);
			}
			break;
		}
		
		baseEntity.TargetMarkProc();
	}