Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- PhysicsActor *tempActorPtr = new PhysicsActor(DOUBLE2{ 50, 100 }, 0, BodyType::DYNAMIC);
- tempActorPtr->SetGravityScale(0);
- tempActorPtr->SetName(String("1"));
- tempActorPtr->SetLinearVelocity(DOUBLE2(rand() % 100 + 100, 0));
- tempActorPtr->AddCircleShape(25, DOUBLE2(0, 0), 1);
- m_ActorPtrArr.push_back(tempActorPtr);
- tempActorPtr = new PhysicsActor(DOUBLE2{ 50, 200 }, 0, BodyType::DYNAMIC);
- tempActorPtr->SetGravityScale(0);
- tempActorPtr->SetName(String("2"));
- tempActorPtr->SetLinearVelocity(DOUBLE2(rand() % 100 + 100, 0));
- tempActorPtr->AddCircleShape(25);
- m_ActorPtrArr.push_back(tempActorPtr);
- tempActorPtr = new PhysicsActor(DOUBLE2{ 50, 300 }, 0, BodyType::DYNAMIC);
- tempActorPtr->SetGravityScale(0);
- tempActorPtr->SetName(String("3"));
- tempActorPtr->SetLinearVelocity(DOUBLE2(rand() % 100 + 100, 0));
- tempActorPtr->AddCircleShape(25, DOUBLE2(0, 0), 1);
- m_ActorPtrArr.push_back(tempActorPtr);
- tempActorPtr = new PhysicsActor(DOUBLE2{ 50, 400 }, 0, BodyType::DYNAMIC);
- tempActorPtr->SetGravityScale(0);
- tempActorPtr->SetName(String("4"));
- tempActorPtr->SetLinearVelocity(DOUBLE2(rand() % 100 + 100, 0));
- tempActorPtr->AddCircleShape(25, DOUBLE2(0, 0), 1);
- m_ActorPtrArr.push_back(tempActorPtr);
- std::vector<DOUBLE2> tempDouble2Arr;
- tempDouble2Arr.push_back(DOUBLE2(0, 0));
- tempDouble2Arr.push_back(DOUBLE2(GAME_ENGINE->GetWidth(), 0));
- tempDouble2Arr.push_back(DOUBLE2(GAME_ENGINE->GetWidth(), GAME_ENGINE->GetHeight()));
- tempDouble2Arr.push_back(DOUBLE2(0, GAME_ENGINE->GetHeight()));
- tempActorPtr = new PhysicsActor(DOUBLE2{ 0, 0 }, 0, BodyType::STATIC);
- tempActorPtr->AddChainShape(tempDouble2Arr, true, 1);
- m_ActorPtrArr.push_back(tempActorPtr);
- for (size_t i = 0; i < 3; i++)
- {
- RECT2 temprect(GAME_ENGINE->GetWidth() / 3 * i - 25, 0, GAME_ENGINE->GetWidth() / 3 * i + 25, 15);
- SpotLight *tempSpotLightPtr = new SpotLight(temprect, GAME_ENGINE->GetHeight() - 15, 100);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement