当前位置: 首页>>代码示例>>C++>>正文


C++ UpdateVisibility函数代码示例

本文整理汇总了C++中UpdateVisibility函数的典型用法代码示例。如果您正苦于以下问题:C++ UpdateVisibility函数的具体用法?C++ UpdateVisibility怎么用?C++ UpdateVisibility使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了UpdateVisibility函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: SystemMessage

//.gm active
bool ChatHandler::HandleGMActiveCommand(const char* args, WorldSession* m_session)
{
    auto player = m_session->GetPlayer();
    bool toggle_no_notice = std::string(args) == "no_notice" ? true : false;
    if (player->isGMFlagSet())
    {
        if (!toggle_no_notice)
        {
            SystemMessage(m_session, "GM Flag removed.");
            BlueSystemMessage(m_session, "<GM> Will no longer show in chat messages or above your name until you use this command again.");
        }
        player->removePlayerFlags(PLAYER_FLAG_GM);
        player->SetFaction(player->GetInitialFactionId());
        player->UpdatePvPArea();
        player->UpdateVisibility();
    }
    else
    {
        if (player->hasPlayerFlags(PLAYER_FLAG_DEVELOPER))
            HandleGMDevTagCommand("no_notice", m_session);

        SystemMessage(m_session, "GM Flag set.");
        BlueSystemMessage(m_session, "<GM> will now appear above your name and in chat messages until you use this command again.");
        player->addPlayerFlags(PLAYER_FLAG_GM);
        player->SetFaction(35);
        player->RemovePvPFlag();
        player->UpdateVisibility();
    }
    return true;
}
开发者ID:armm77,项目名称:AscEmu,代码行数:31,代码来源:GameMasterCommands.cpp

示例2: C_LowViolenceHostageDeathModel

//-----------------------------------------------------------------------------
C_BaseAnimating * C_CHostage::BecomeRagdollOnClient()
{
	if ( g_RagdollLVManager.IsLowViolence() )
	{
		// We can't just play the low-violence anim ourselves, since we're about to be deleted by the server.
		// So, let's create another entity that can play the anim and stick around.
		C_LowViolenceHostageDeathModel *pLowViolenceModel = new C_LowViolenceHostageDeathModel();
		m_createdLowViolenceRagdoll = pLowViolenceModel->SetupLowViolenceModel( this );
		if ( m_createdLowViolenceRagdoll )
		{
			UpdateVisibility();
			g_HostageRagdolls.AddToTail( pLowViolenceModel );
			return pLowViolenceModel;
		}
		else
		{
			// if we don't have a low-violence death anim, don't create a ragdoll.
			return NULL;
		}
	}

	C_BaseAnimating *pRagdoll = BaseClass::BecomeRagdollOnClient();
	if ( pRagdoll && pRagdoll != this )
	{
		g_HostageRagdolls.AddToTail( pRagdoll );
	}
	return pRagdoll;
}
开发者ID:Axitonium,项目名称:SourceEngine2007,代码行数:29,代码来源:c_cs_hostage.cpp

示例3: UpdateVisibility

    void DiInstanceBatch::CullingUpdate( DiRenderBatchGroup* group, DiCamera* )
    {
        mDirtyAnimation = false;

        UpdateVisibility();

        mPrimitiveCount = mMeshReference->GetSubMesh(mCreator->mSubMeshIdx)->GetPrimitiveCount();
        mPrimitiveCount *= GetModelNums();

        if( mVisible )
        {
            if (HasSkeleton())
            {
                InstancedModelVec::const_iterator itor = mInstancedModels.begin();
                InstancedModelVec::const_iterator end  = mInstancedModels.end();

                while( itor != end )    
                {
                    mDirtyAnimation |= (*itor)->UpdateAnimation();
                    ++itor;
                }
            }

            group->AddRenderUnit( this );
        }

        mVisible = true;
    }
开发者ID:redkaras,项目名称:Demi3D,代码行数:28,代码来源:InstanceBatch.cpp

示例4: LookupSequence

//-----------------------------------------------------------------------------
// Purpose: 
//-----------------------------------------------------------------------------
void C_NPC_Puppet::ClientThink( void )
{
	if ( m_hAnimationTarget == NULL )
		return;

	C_BaseAnimating *pTarget = m_hAnimationTarget->GetBaseAnimating();
	if ( pTarget == NULL )
		return;

	int nTargetSequence = pTarget->GetSequence();
	const char *pSequenceName = pTarget->GetSequenceName( nTargetSequence );

	int nSequence = LookupSequence( pSequenceName );
	if ( nSequence >= 0 )
	{
		if ( nSequence != GetSequence() )
		{
			SetSequence( nSequence );
			UpdateVisibility();
		}

		SetCycle( pTarget->GetCycle() );
		SetPlaybackRate( pTarget->GetPlaybackRate() );	
	}
}
开发者ID:0xFEEDC0DE64,项目名称:UltraGame,代码行数:28,代码来源:c_npc_puppet.cpp

示例5: UpdateVisibility

void SuggestionsSidebarBlock::ClearMessage()
{
    m_msgPresent = false;
    m_msgText->SetAndWrapLabel("");
    UpdateVisibility();
    m_parent->Layout();
}
开发者ID:mapme,项目名称:poedit,代码行数:7,代码来源:sidebar.cpp

示例6: SetSolid

//-----------------------------------------------------------------------------
// Purpose: 
//-----------------------------------------------------------------------------
bool C_FuncPhysicsRespawnZone::Initialize( void )
{
	if ( InitializeAsClientEntity( STRING(GetModelName()), RENDER_GROUP_OPAQUE_ENTITY ) == false )
		return false;

	SetSolid( SOLID_BSP );	
	AddSolidFlags( FSOLID_NOT_SOLID );
	AddSolidFlags( FSOLID_TRIGGER );	
	SetMoveType( MOVETYPE_NONE );

	const model_t *mod = GetModel();
	if ( mod )
	{
		Vector mins, maxs;
		modelinfo->GetModelBounds( mod, mins, maxs );
		SetCollisionBounds( mins, maxs );
	}

	Spawn();

	AddEffects( EF_NODRAW );

	UpdatePartitionListEntry();

	CollisionProp()->UpdatePartition();

	UpdateVisibility();

	SetNextClientThink( gpGlobals->curtime + (cl_phys_props_respawnrate.GetFloat() * RandomFloat(1.0,1.1)) );

	return true;
}
开发者ID:Au-heppa,项目名称:source-sdk-2013,代码行数:35,代码来源:physpropclientside.cpp

示例7: UpdateVisibility

bool CGUIFixedListContainer::OnMessage(CGUIMessage& message)
{
  if (message.GetControlId() == GetID() )
  {
    if (message.GetMessage() == GUI_MSG_ITEM_SELECT)
    {
      if (m_loading)
      {
        m_savedSelected = message.GetParam1();
      }
      else
      {
        UpdateVisibility();
        SelectItem(message.GetParam1());
      }
      return true;
    }
    else if (message.GetMessage() == GUI_MSG_PAGE_UP)
    {
      CAction action;
      action.id = ACTION_PAGE_UP;
      return OnAction(action);
    }
    else if (message.GetMessage() == GUI_MSG_PAGE_DOWN)
    {
      CAction action;
      action.id = ACTION_PAGE_DOWN;
      return OnAction(action);
    }
  }
  return CGUIBaseContainer::OnMessage(message);
}
开发者ID:DakaiTV,项目名称:DakaiBoxee,代码行数:32,代码来源:GUIFixedListContainer.cpp

示例8: UpdateVisibility

    void DiInstanceBatch::Update(DiCamera* camera)
    {
        mCurrentCamera = camera;
        mDirtyAnimation = false;

        UpdateVisibility();

        mPrimitiveCount = mMeshReference->GetSubMesh(mCreator->mSubMeshIdx)->GetPrimitiveCount();
        mPrimitiveCount *= GetModelNums();

        if (mVisible)
        {
            if (HasSkeleton())
            {
                auto itor = mInstancedModels.begin();
                auto end = mInstancedModels.end();

                while (itor != end)
                {
                    mDirtyAnimation |= (*itor)->UpdateAnimation();
                    ++itor;
                }
            }

            mAddToBatch = true;
        }

        mVisible = true;
    }
开发者ID:wangyanxing,项目名称:Demi3D,代码行数:29,代码来源:InstanceBatch.cpp

示例9: UpdateSuggestionsMenu

void SuggestionsSidebarBlock::ClearSuggestions()
{
    m_pendingQueries = 0;
    m_suggestions.clear();
    UpdateSuggestionsMenu();
    UpdateVisibility();
}
开发者ID:mapme,项目名称:poedit,代码行数:7,代码来源:sidebar.cpp

示例10: Show

  void Show(const PixelRect &rc) override {
    assert(!visible);
    visible = true;

    UpdatePositions(rc);
    UpdateVisibility();
  }
开发者ID:Andy-1954,项目名称:XCSoar,代码行数:7,代码来源:TaskEditPanel.cpp

示例11: UpdateVisibility

bool psEntityLabels::HandleEvent(iEvent& /*ev*/)
{
    static unsigned int count = 0;
    if (++count%10 != 0)  // Update once every 10th frame
        return false;

    if (celClient->GetMainPlayer() == NULL)
        return false;  // Not loaded yet

    if (visItems == LABEL_ALWAYS || visCreatures == LABEL_ALWAYS)
    {
        UpdateVisibility();
    }

    if (visItems == LABEL_ONMOUSE || visCreatures == LABEL_ONMOUSE)
    {
        UpdateMouseover();
    }

    if (visItems == LABEL_ONTARGET || visCreatures == LABEL_ONTARGET)
    {
        UpdateTarget();
    }   

    return false;
}
开发者ID:Mixone-FinallyHere,项目名称:planeshift,代码行数:26,代码来源:entitylabels.cpp

示例12: SetNextClientThink

void C_NEOPlayer::OnDataChanged( DataUpdateType_t updateType )
{
	BaseClass::OnDataChanged( updateType );

	if ( updateType == DATA_UPDATE_CREATED )
		SetNextClientThink( -1293.f );

	UpdateVisibility();
}
开发者ID:Ochii,项目名称:nt-revamp,代码行数:9,代码来源:c_neoplayer.cpp

示例13: Update

  void Update(bool _edit, bool _mutate, bool _down, bool _up) {
    show_edit = _edit;
    show_mutate = _mutate;
    show_down = _down;
    show_up = _up;

    if (visible)
      UpdateVisibility();
  }
开发者ID:Tjeerdm,项目名称:XCSoarDktjm,代码行数:9,代码来源:TaskEditPanel.cpp

示例14: GetTextHtml

void MySwitchableTextEditor::SetEditorMode(bool edit)
{
    if(edit == m_editor_mode)
        return;
    QString text = GetTextHtml();
    m_editor_mode = edit;
    UpdateVisibility();
    SetTextHtml(text);
}
开发者ID:Ficer,项目名称:rockbox,代码行数:9,代码来源:utils.cpp

示例15: UpdateCL

void CCustomDetector::UpdateCL() 
{
	inherited::UpdateCL();

	UpdateVisibility		();

	if( !IsWorking() )		return;
	UpfateWork				();
}
开发者ID:Charsi82,项目名称:xray-1.5.10-2015-,代码行数:9,代码来源:CustomDetector.cpp


注:本文中的UpdateVisibility函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。