本文整理汇总了C++中pyKey类的典型用法代码示例。如果您正苦于以下问题:C++ pyKey类的具体用法?C++ pyKey怎么用?C++ pyKey使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了pyKey类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: SetSender
void pyNotify::SetSender(pyKey& selfKey)
{
fSenderKey = selfKey.getKey();
fReceivers.Reset();
for (int j = 0; j < selfKey.NotifyListCount(); j++)
fReceivers.Append(selfKey.GetNotifyListItem(j));
}
示例2: addObjPyKey
void pySceneObject::addObjPyKey(pyKey& objkey)
{
if ( objkey.getKey() != nil )
{
fSceneObjects.Append(objkey.getKey());
IAddObjKeyToAll(objkey.getKey());
}
}
示例3: addObjKey
pySceneObject::pySceneObject(pyKey& objkey, pyKey& selfkey)
{
// make sure these are created
fDraw = cyDraw::New();
fPhysics = cyPhysics::New();
fAvatar = cyAvatar::New();
fParticle = cyParticleSys::New();
addObjKey(objkey.getKey());
setSenderKey(selfkey.getKey());
setPyMod(selfkey);
fNetForce = false;
}
示例4:
pyNotify::pyNotify(pyKey& selfkey)
{
fSenderKey = selfkey.getKey();
fNetPropagate = true;
fNetForce = false;
fBuildMsg.fType = plNotifyMsg::kActivator;
fBuildMsg.fState = 0.0f;
fBuildMsg.fID = 0;
// loop though adding the ones that want to be notified of the change
int j;
for ( j=0 ; j<selfkey.NotifyListCount() ; j++ )
fReceivers.Append(selfkey.GetNotifyListItem(j));
}
示例5: PopCutsceneCamera
void pySceneObject::PopCutsceneCamera(pyKey& avKey)
{
if ( fSceneObjects.Count() > 0 )
{
// get the object pointer of just the first one in the list
// (We really can't tell which one the user is thinking of if they are
// referring to multiple objects, so the first one in the list will do.)
plSceneObject* obj = plSceneObject::ConvertNoRef(fSceneObjects[0]->ObjectIsLoaded());
if ( obj )
{
for (int i = 0; i < obj->GetNumModifiers(); i++)
{
const plCameraModifier1* pCam = plCameraModifier1::ConvertNoRef(obj->GetModifier(i));
if (pCam)
{
plCameraMsg* pMsg = new plCameraMsg;
pMsg->SetSender(pCam->GetKey());
pMsg->SetBCastFlag(plMessage::kBCastByType);
// set command to do the transition
pMsg->SetCmd(plCameraMsg::kPythonOverridePop);
// set the new camera
pMsg->SetTriggerer(avKey.getKey());
pMsg->SetNewCam(pCam->GetKey());
plgDispatch::MsgSend( pMsg ); // whoosh... off it goes
return;
}
}
}
}
}
示例6: PopCamera
/////////////////////////////////////////////////////////////////////////////
//
// Function : Pop
// PARAMETERS :
//
// PURPOSE : Restore the state of the virtual camera with a previously saved setting
//
void pySceneObject::PopCamera(pyKey& avKey)
{
plSceneObject* obj = plSceneObject::ConvertNoRef(fSceneObjects[0]->ObjectIsLoaded());
if ( obj )
{
for (int i = 0; i < obj->GetNumModifiers(); i++)
{
const plCameraModifier1* pCam = plCameraModifier1::ConvertNoRef(obj->GetModifier(i));
if (pCam)
{
// create message
plCameraMsg* pMsg = new plCameraMsg;
pMsg->SetSender(pCam->GetKey());
pMsg->SetBCastFlag(plMessage::kBCastByType);
// set command to do the transition
pMsg->SetCmd(plCameraMsg::kRegionPushCamera);
// set the new camera
pMsg->SetTriggerer(avKey.getKey());
pMsg->SetNewCam(pCam->GetKey());
plgDispatch::MsgSend( pMsg ); // whoosh... off it goes
}
}
}
}
示例7: FindAgeHighScores
void pyGameScore::FindAgeHighScores(const ST::string& name, uint32_t maxScores, pyKey& rcvr)
{
if (hsRef<RelVaultNode> ageInfo = VaultGetAgeInfoNode()) {
pfGameScore::FindHighScores(ageInfo->GetNodeId(), maxScores, name, rcvr.getKey());
}
else
hsAssert(false, "Age has no vault... Need to rewrite score python script?");
}
示例8: CreatePlayerScore
void pyGameScore::CreatePlayerScore(const ST::string& name, uint32_t type, int32_t points, pyKey& rcvr)
{
if (hsRef<RelVaultNode> node = VaultGetPlayerInfoNode())
{
uint32_t ownerId = node->GetNodeId();
pfGameScore::Create(ownerId, name, type, points, rcvr.getKey());
} else
hsAssert(false, "No PlayerInfo node... Need to rewrite python script?");
}
示例9: CreateAgeScore
void pyGameScore::CreateAgeScore(const ST::string& name, uint32_t type, int32_t points, pyKey& rcvr)
{
if (hsRef<RelVaultNode> ageInfo = VaultGetAgeInfoNode())
{
uint32_t ownerId = ageInfo->GetNodeId();
pfGameScore::Create(ownerId, name, type, points, rcvr.getKey());
} else
hsAssert(false, "Age has no vault... Need to rewrite score python script?");
}
示例10: setKey
void pyImage::setKey(pyKey& mipmapKey) // only for python glue, do NOT call
{
#ifndef BUILDING_PYPLASMA
if (fMipmap && fMipMapKey)
fMipMapKey->UnRefObject();
fMipmap = nil;
#endif
fMipMapKey = mipmapKey.getKey();
}
示例11: FindAgeScores
void pyGameScore::FindAgeScores(const plString& name, pyKey& rcvr)
{
if (RelVaultNode* ageInfo = VaultGetAgeInfoNodeIncRef())
{
uint32_t ownerId = ageInfo->nodeId;
pfGameScore::Find(ownerId, name, rcvr.getKey());
ageInfo->DecRef();
} else
hsAssert(false, "Age has no vault... Need to rewrite score python script?");
}
示例12: FindPlayerScores
void pyGameScore::FindPlayerScores(const plString& name, pyKey& rcvr)
{
if (RelVaultNode* node = VaultGetPlayerInfoNodeIncRef())
{
uint32_t ownerId = node->nodeId;
pfGameScore::Find(ownerId, name, rcvr.getKey());
node->DecRef();
}
else
hsAssert(false, "No PlayerInfo node.. Need to rewrite python script?");
}
示例13: SetFocus
void pyGUIDialog::SetFocus( pyKey& gcKey )
{
if ( fGCkey )
{
pfGUIDialogMod* pdmod = pfGUIDialogMod::ConvertNoRef(fGCkey->ObjectIsLoaded());
if ( pdmod )
{
pfGUIControlMod* pcontrolmod = pfGUIControlMod::ConvertNoRef(gcKey.getKey()->ObjectIsLoaded());
if ( pcontrolmod )
pdmod->SetFocus(pcontrolmod);
}
}
}
示例14: WhatControlType
uint32_t pyGUIDialog::WhatControlType(pyKey& gckey)
{
// Do the pop-up menu test first, since it's derived from dialog
if ( pyGUIPopUpMenu::IsGUIPopUpMenu(gckey) )
return kPopUpMenu;
else if ( pyGUIDialog::IsGUIDialog(gckey) )
return kDialog;
else if ( pyGUIControlButton::IsGUIControlButton(gckey) )
return kButton;
else if ( pyGUIControlCheckBox::IsGUIControlCheckBox(gckey) )
return kCheckBox;
else if ( pyGUIControlEditBox::IsGUIControlEditBox(gckey) )
return kEditBox;
else if ( pyGUIControlListBox::IsGUIControlListBox(gckey) )
return kListBox;
else if ( pyGUIControlRadioGroup::IsGUIControlRadioGroup(gckey) )
return kRadioGroup;
else if ( pyGUIControlTextBox::IsGUIControlTextBox(gckey) )
return kTextBox;
else if ( pyGUIControlValue::IsGUIControlValue(gckey) )
{
// then see what kind of value control it is
if ( pfGUIKnobCtrl::ConvertNoRef(gckey.getKey()->GetObjectPtr()) )
return kKnob;
else if ( pfGUIUpDownPairMod::ConvertNoRef(gckey.getKey()->GetObjectPtr()) )
return kUpDownPair;
else
return 0;
}
else if ( pyGUIControlDynamicText::IsGUIControlDynamicText( gckey ) )
return kDynamicText;
else if ( pyGUIControlMultiLineEdit::IsGUIControlMultiLineEdit( gckey ) )
return kMultiLineEdit;
else if ( pyGUIControlClickMap::IsGUIControlClickMap( gckey ) )
return kClickMap;
else
return 0;
}
示例15: Pop
/////////////////////////////////////////////////////////////////////////////
//
// Function : Pop
// PARAMETERS :
//
// PURPOSE : Restore the state of the virtual camera with a previously saved setting
//
void cyCamera::Pop(pyKey& oldCamKey)
{
// create message
plCameraMsg* pMsg = new plCameraMsg;
if ( fSender )
pMsg->SetSender(fSender);
// if we're sending to the virtual camera
if ( fTheCam )
pMsg->AddReceiver(fTheCam);
else
// otherwise, broadcast by type
pMsg->SetBCastFlag(plMessage::kBCastByType);
// set command to undo the camera... somehow not saying ResponderTrigger but Push means Pop...whatever
pMsg->SetCmd(plCameraMsg::kRegionPushCamera);
// set the new camera
pMsg->SetNewCam(oldCamKey.getKey());
plgDispatch::MsgSend( pMsg ); // whoosh... off it goes
}