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


C++ plKey::GetName方法代码示例

本文整理汇总了C++中plKey::GetName方法的典型用法代码示例。如果您正苦于以下问题:C++ plKey::GetName方法的具体用法?C++ plKey::GetName怎么用?C++ plKey::GetName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在plKey的用法示例。


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

示例1: AddCollisionMsg

void plSimulationMgr::AddCollisionMsg(plKey hitee, plKey hitter, bool enter)
{
    // First, make sure we have no dupes
    for (CollisionVec::iterator it = fCollideMsgs.begin(); it != fCollideMsgs.end(); ++it)
    {
        plCollideMsg* pMsg = *it;

        // Should only ever be one receiver.
        // Oh, it seems we should update the hit status. The latest might be different than the older...
        // Even in the same frame >.<
        if (pMsg->fOtherKey == hitter && pMsg->GetReceiver(0) == hitee)
        {
            pMsg->fEntering = enter;
            DetectorLogRed("DUPLICATE COLLISION: %s hit %s",
                (hitter ? hitter->GetName().c_str() : "(nil)"),
                (hitee ? hitee->GetName().c_str() : "(nil)"));
            return;
        }
    }

    // Still here? Then this must be a unique hit!
    plCollideMsg* pMsg = new plCollideMsg;
    pMsg->AddReceiver(hitee);
    pMsg->fOtherKey = hitter;
    pMsg->fEntering = enter;
    fCollideMsgs.push_back(pMsg);
}
开发者ID:branan,项目名称:Plasma-nobink,代码行数:27,代码来源:plSimulationMgr.cpp

示例2: ISendCollisionMsg

void plSimulationMgr::ISendCollisionMsg(plKey receiver, plKey hitter, bool entering)
{
    DetectorLogYellow("Collision: %s is inside %s. Sending an %s msg", hitter ? hitter->GetName().c_str() : "(nil)",
                      receiver->GetName().c_str(), entering ? "'enter'" : "'exit'");
    plCollideMsg* msg = new plCollideMsg;
    msg->fOtherKey = hitter;
    msg->fEntering = entering;
    msg->AddReceiver(receiver);
    msg->Send();
}
开发者ID:branan,项目名称:Plasma-nobink,代码行数:10,代码来源:plSimulationMgr.cpp

示例3: IResMgrProgressBarCallback

//============================================================================
void plNCAgeJoiner::IResMgrProgressBarCallback (plKey key) {
#ifndef PLASMA_EXTERNAL_RELEASE
    if (s_instance)
        s_instance->progressBar->SetStatusText(key->GetName());
#endif
    if (s_instance)
        s_instance->progressBar->Increment(1);
}
开发者ID:,项目名称:,代码行数:9,代码来源:

示例4: ISaveOrLoad

//
// save or load a key.  return the key.
//
const plKey plSynchedValueBase::ISaveOrLoad(const plKey key, hsBool32 save, hsStream* stream, hsResMgr* mgr)
{
    if (save)
    {   
        if (key)
        {
            stream->WriteByte(1);
            // I need to write a key to MY stream...
#if 0       // DEBUG
            int32_t len = hsStrlen(key->GetName());
            stream->WriteLE32(len);
            stream->Write(len, key->GetName());
#endif
            key->GetUoid().Write(stream);
        }
        else
        {
            stream->WriteByte(0);
        }
        return key;
    }
    else
    {   
        int32_t has=stream->ReadByte();
        if (has)
        {
            // read a key from MY stream
#if 0       // DEBUG
            int32_t len = stream->ReadLE32();
            char tmp[256];
            hsAssert(len<256, "key name overflow");
            stream->Read(len, tmp);
#endif
            plUoid uoid;
            uoid.Read(stream);
            return mgr->FindKey(uoid);
        }
        else
            return (nil);
    }
    return nil;
}
开发者ID:cwalther,项目名称:Plasma-nobink-test,代码行数:45,代码来源:plSynchedValue.cpp

示例5: pfKIListPlayerItem

        pfKIListPlayerItem( plKey key, bool inRange = false ) : pfGUIListText(), fPlayerKey( key ) 
        {   
            static char str[ 256 ];


            if( key == nil )
                SetText( "<Everyone>" );
            else
            {
                const char *name = plNetClientMgr::GetInstance()->GetPlayerName( key );
                if( inRange )
                {
                    sprintf( str, ">%s<", name != nil ? name : key->GetName() );
                    SetText( str );
                }
                else
                    SetText( name != nil ? name : key->GetName() );
            }
            ISetJustify( true );
        }
开发者ID:branan,项目名称:Plasma-nobink,代码行数:20,代码来源:pfKI.cpp

示例6: KeyedObjectProc

void plPageOptimizer::KeyedObjectProc(plKey key)
{
    plString keyName = key->GetName();
    const char* className = plFactory::GetNameOfClass(key->GetUoid().GetClassType());

    // For now, ignore any key that isn't in the location we're looking at.  That means stuff like textures.
    if (fInstance->fLoc != key->GetUoid().GetLocation())
        return;

    KeySet& loadedKeys = fInstance->fLoadedKeys;
    KeyVec& loadOrder = fInstance->fKeyLoadOrder;

    KeySet::iterator it = loadedKeys.lower_bound(key);
    if (it != loadedKeys.end() && *it == key)
    {
        printf("Keyed object %s(%s) loaded more than once\n", keyName.c_str(), className);
    }
    else
    {
        loadedKeys.insert(it, key);
        loadOrder.push_back(key);
    }
}
开发者ID:Asteral,项目名称:Plasma,代码行数:23,代码来源:plPageOptimizer.cpp

示例7: AddRoom

void plNetMsgRoomsList::AddRoom(plKey rmKey)
{
    fRooms.push_back(rmKey->GetUoid().GetLocation());
    fRoomNames.push_back(rmKey->GetName());
}
开发者ID:cwalther,项目名称:Plasma-nobink-test,代码行数:5,代码来源:plNetMessage.cpp


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