Advertisement
Guest User

Untitled

a guest
Mar 3rd, 2015
196
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.92 KB | None | 0 0
  1. PhysicsActor *tempActorPtr = new PhysicsActor(DOUBLE2{ 50, 100 }, 0, BodyType::DYNAMIC);
  2.     tempActorPtr->SetGravityScale(0);
  3.     tempActorPtr->SetName(String("1"));
  4.     tempActorPtr->SetLinearVelocity(DOUBLE2(rand() % 100 + 100, 0));
  5.     tempActorPtr->AddCircleShape(25, DOUBLE2(0, 0), 1);
  6.     m_ActorPtrArr.push_back(tempActorPtr);
  7.  
  8.     tempActorPtr = new PhysicsActor(DOUBLE2{ 50, 200 }, 0, BodyType::DYNAMIC);
  9.     tempActorPtr->SetGravityScale(0);
  10.     tempActorPtr->SetName(String("2"));
  11.     tempActorPtr->SetLinearVelocity(DOUBLE2(rand() % 100 + 100, 0));
  12.     tempActorPtr->AddCircleShape(25);
  13.     m_ActorPtrArr.push_back(tempActorPtr);
  14.  
  15.     tempActorPtr = new PhysicsActor(DOUBLE2{ 50, 300 }, 0, BodyType::DYNAMIC);
  16.     tempActorPtr->SetGravityScale(0);
  17.     tempActorPtr->SetName(String("3"));
  18.     tempActorPtr->SetLinearVelocity(DOUBLE2(rand() % 100 + 100, 0));
  19.     tempActorPtr->AddCircleShape(25, DOUBLE2(0, 0), 1);
  20.     m_ActorPtrArr.push_back(tempActorPtr);
  21.  
  22.     tempActorPtr = new PhysicsActor(DOUBLE2{ 50, 400 }, 0, BodyType::DYNAMIC);
  23.     tempActorPtr->SetGravityScale(0);
  24.     tempActorPtr->SetName(String("4"));
  25.     tempActorPtr->SetLinearVelocity(DOUBLE2(rand() % 100 + 100, 0));
  26.     tempActorPtr->AddCircleShape(25, DOUBLE2(0, 0), 1);
  27.     m_ActorPtrArr.push_back(tempActorPtr);
  28.  
  29.     std::vector<DOUBLE2> tempDouble2Arr;
  30.     tempDouble2Arr.push_back(DOUBLE2(0, 0));
  31.     tempDouble2Arr.push_back(DOUBLE2(GAME_ENGINE->GetWidth(), 0));
  32.     tempDouble2Arr.push_back(DOUBLE2(GAME_ENGINE->GetWidth(), GAME_ENGINE->GetHeight()));
  33.     tempDouble2Arr.push_back(DOUBLE2(0, GAME_ENGINE->GetHeight()));
  34.  
  35.     tempActorPtr = new PhysicsActor(DOUBLE2{ 0, 0 }, 0, BodyType::STATIC);
  36.     tempActorPtr->AddChainShape(tempDouble2Arr, true, 1);
  37.     m_ActorPtrArr.push_back(tempActorPtr);
  38.  
  39.  
  40.  
  41.     for (size_t i = 0; i < 3; i++)
  42.     {
  43.         RECT2 temprect(GAME_ENGINE->GetWidth() / 3 * i - 25, 0, GAME_ENGINE->GetWidth() / 3 * i + 25, 15);
  44.         SpotLight *tempSpotLightPtr = new SpotLight(temprect, GAME_ENGINE->GetHeight() - 15, 100);
  45.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement