本文整理汇总了C++中Transport::RemoveFromSquad方法的典型用法代码示例。如果您正苦于以下问题:C++ Transport::RemoveFromSquad方法的具体用法?C++ Transport::RemoveFromSquad怎么用?C++ Transport::RemoveFromSquad使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Transport
的用法示例。
在下文中一共展示了Transport::RemoveFromSquad方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: switch
//
// Handle notification
//
void Transport::Manager::Notify(Notification ¬ification)
{
// Is this one of our transports ?
Transport *transport = active.Find(notification.from.DirectId());
switch (notification.message)
{
case 0x61FC2088: // "Unit::MoveCompleted"
if (transport)
{
// If this transport is assigned to a script then
// tell that script the transport has completed its move
if (transport->script)
{
transport->SetFlag();
transport->script->Notify(0x998A995A); // "Transport::Moved"
}
}
case 0x5CA4B1C1: // "Transport::Unloaded"
if (transport)
{
// If this transport is assigned to a script then
// tell that script the transport is unloaded
if (transport->script)
{
transport->SetFlag();
transport->script->Notify(0x5CA4B1C1); // "Transport::Unloaded"
}
}
break;
case 0x11EAEF8E: // "Unit::Died"
// A unit has died, check to see if its one of our transports
if (transport)
{
// If this transport is assigned to a base then remove it
// If this transport is assigned to a squad then
// notify the squad that the transport has died
if (transport->script)
{
transport->RemoveFromSquad(transport->script);
transport->script->Notify(0x38601711); // "Transport::Died"
}
}
break;
}
}
示例2: t
//
// Cleanup all transports
//
void Transport::Manager::CleanUp()
{
// Remove the transports from any scripts they are associated with
NBinTree<Transport>::Iterator t(&active);
Transport *transport;
while ((transport = t++) != NULL)
{
if (transport->script)
{
transport->RemoveFromSquad(transport->script);
}
}
}