SHARE
TWEET

Untitled

a guest Jan 21st, 2020 62 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. void MainHUD::OnShopClick()
  2.         {
  3.             auto vo = zooField->GetScene()->InstantiateToScene("evolving_building_restoration");
  4.             if (!vo.IsValid())
  5.                 return;
  6.  
  7.             auto node = vo.GetRoot();
  8.             if (!node.IsValid())
  9.                 return;
  10.  
  11.             auto beh = node.GetBehaviour<Game::ICS::ICSControllerBehaviour>();
  12.             if (!beh)
  13.                 return;
  14.  
  15.             _icsFinishSubscription.Reset();
  16.             beh->GetBroadcasterICSEvent().SubscribeForMessage(Game::ICS::ICSEventType::Finished, [vo](auto&&)
  17.             {
  18.                 vo.RemoveFromScene();
  19.             }, _icsFinishSubscription);
  20.  
  21.             beh->Play();
  22.  
  23.             /*MessagePassing::globalBroadcaster->BroadcastMessage(Message("UI.CrossPanel.Shop.Pressed", _openShopWithTutorialMode));
  24.             _openShopWithTutorialMode = false;*/
  25.         }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top