SHARE
TWEET

Collide Code

a guest Feb 18th, 2016 68 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. CollisionComponent::CollisionComponent(luabridge::LuaRef& componentTable)
  2. {
  3.     if (componentTable["boundingBox"].isTable())
  4.     {
  5.         luabridge::LuaRef boundingBoxTable = componentTable["boundingBox"];
  6.         boundingBox = sf::FloatRect(boundingBoxTable[1], boundingBoxTable[2], boundingBoxTable[3], boundingBoxTable[4]);
  7.     }
  8.  
  9.     if (componentTable["collide"].isFunction())
  10.         didCollide = std::make_shared<luabridge::LuaRef>(componentTable["collide"]);
  11.     else
  12.         didCollide.reset();
  13. }
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