Guest User

ObjectToEntity

a guest
Dec 2nd, 2014
153
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.37 KB | None | 0 0
  1. switch (objectType)
  2. {
  3.     case 1:  // Box
  4.     {
  5.         // Creates the box.
  6.         CEntityTileBox* boxEntity = new CEntityTileBox(object->GetX(), object->GetY());
  7.  
  8.         AddEntity(boxEntity, DYNAMIC_COLLISION, 1);
  9.         break;
  10.     }
  11.     case 2:  // Canon
  12.     {
  13.         CEntityCanon* canonEntity = new CEntityCanon(object->GetX(), object->GetY());
  14.  
  15.         AddEntity(canonEntity, DYNAMIC_COLLISION);
  16.         break;
  17.     }
  18. }
Advertisement
Add Comment
Please, Sign In to add comment