本文整理汇总了C++中PlayerCityPtr::cameraPos方法的典型用法代码示例。如果您正苦于以下问题:C++ PlayerCityPtr::cameraPos方法的具体用法?C++ PlayerCityPtr::cameraPos怎么用?C++ PlayerCityPtr::cameraPos使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PlayerCityPtr
的用法示例。
在下文中一共展示了PlayerCityPtr::cameraPos方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: initialize
void Level::initialize()
{
PlayerCityPtr city = _d->game->city();
_d->initRender();
_d->initMainUI();
_d->installHandlers( this );
_d->initSound();
_d->initTabletUI( this );
_d->undoStack.init( city );
//connect elements
//city->tilemap().setFlag( Tilemap::fSvkGround, !KILLSWITCH(oldgfx) );
CONNECT( city, onWarningMessage(), _d.data(), Impl::resolveWarningMessage )
//CONNECT( _d->extMenu, onSelectOverlayType(), _d.data(), Impl::resolveSelectLayer )
CONNECT( city, onDisasterEvent(), &_d->alarmsHolder, AlarmEventHolder::add )
CONNECT( &_d->alarmsHolder, onMoveToAlarm(), _d->renderer.camera(), Camera::setCenter )
CONNECT( &_d->alarmsHolder, onAlarmChange(), _d.data(), Impl::setAlarmEnabled )
CONNECT( _d->renderer.camera(), onPositionChanged(), _d.data(), Impl::saveCameraPos )
CONNECT( _d->renderer.camera(), onDirectionChanged(), _d.data(), Impl::handleDirectionChange )
CONNECT( &_d->renderer, onLayerSwitch(), _d.data(), Impl::layerChangedOut )
CONNECT( &_d->undoStack, onUndoChange(), _d.data(), Impl::resolveUndoChange )
_d->renderer.camera()->setCenter(city->cameraPos());
_d->dhandler.insertTo(_d->game, _d->topMenu);
_d->dhandler.setVisible(false);
events::dispatch<events::ScriptFunc>("OnMissionStart");
}